You Are Here: Home » AVR ATmega Projects » Temperature Measurement Projects » Intelligent temperature monitoring and control system using AVR microcontroller

Intelligent temperature monitoring and control system using AVR microcontroller




Controlling temperature has been a prime objective in various applications including refrigerators, air conditioners, air coolers, heaters, industrial temperature conditioning and so on. Temperature controllers vary in their complexities and algorithms. Some of these use simple control techniques like simple on-off control while others use complex Proportional Integral Derivative (PID) or fuzzy logic algorithms. In this project I’m going to discuss about a simple control algorithm and utilize it intelligently unlike analogue controllers. Here are the features of our controller:

  1. Audio-visual setup for setting temperature limits.
  2. Fault detection and evasive action.
  3. Temperature monitoring and display.
  4. Audio-visual warning.
  5. System status.
  6. Settable time frame.
  7. Data retention with internal EEPROM memory.
Intelligent temperature monitoring and control system using AVR microcontroller

Intelligent temperature controller

For this design I used an ATMega32L AVR microcontroller with an internal clock frequency of 8MHz, a 4×20 LCD for presenting data visually, a 4-button input interface, a tiny piezo sounder for audible indications and some LEDs for showing faults and simulating real-life devices like heater and coolers. I used MikroC for AVR compiler from Mikroelektronika to develop the firmware for this controller.

Hardware

The hardware consists of a four-button interface, four LEDs, a piezo tweeter or sounder, a 4×20 LCD, a LM35 temperature sensor, an AVR ATMega32L microcontroller and some other passive parts. Two LEDs connected to PORTD0 and PORTD1 pins simulate on and off operation of relay switches that are actually present in actual applications to control a heater and an air conditioner. The hardware is powered by a 5V source preferably with a 5V regulator like 7805. If relays are used then a 12/24V source will also be needed to power the relays. The AVR micro’s AVREF and AVCC pins should be both connected to the 5V source. The distance between the LM35 sensor and the AVRs ADC pin must not be greater than 10-12cm for proper temperature reading. Though I did this project in a prototyping board made with a strip board, a PCB version is more preferred. Two additional LEDs connected to PD2 and PD3 indicates the failure or malfunctioning status of the air conditioner and the heater.

Schematic Intelligent temperature monitoring and control system using AVR microcontroller

Microcontroller and display circuit

Firmware

The entire firmware relies on logical decisions at every step. I wrote the code in a way that the complete code is divided into understandable small functional blocks or functions. Each of these functions is doing specific tasks.

Starting from the top of the code, I declared some definitions of port pins, LCD pins and EEPROM locations. Next I declared global variables and function prototypes.

For more Detail: Intelligent temperature monitoring and control system using AVR microcontroller

 

 

Leave a Comment

You must be logged in to post a comment.

Read previous post:
Tiny Lisp Computer
Tiny Lisp Computer

This article describes a self-contained computer with its own display and keyboard, based on an ATmega328, that you can program...

Close
Scroll to top