Room Temperature Controller

The temperature controlling system maintains a user programmable room temperature where air conditioner is not available. For this project we need a cooler and a heater & need to switch them in a specific manner. Cooler is used for decreasing temperature and heater is used for increasing temperature. This project also shows the temperature in real time in degree centigrade. It can be used in any season.

There are two optocoupler with triac outputs for AC supply to connect cooler and heater. Two buttons(up and down) are used to set a suitable temperature called as ‘preset’. We can assume three cases to turn these triacs in order to maintain the temperature for the user suitable temperature.

Case 1 : If the actual temperature is equal to this preset value, both triac remain OFF as the temperature is under-control.

Case 2 : When temperature rises above the preset value, the cooler turns ON and heater turns OFF to decrease the temperature.

Case 3: When temperature fall down below the preset value, the heater turns ON and cooler turns OFF  in order to increase the temperature.

 

Here are the required components:

  • MCU AT89S52
  • EEPROM IC AT24C02
  • Temperature Sensor DS1820
  • IC MOC3011 X 2
  • Triac BT136 X 2
  • Crystal 12MHz
  • 16×2 LCD
  • NPN Transistor BC548 X 2
  • Capacitor 1uF/16V
  • Capacitor 33pF X 2
  • Variable Resistor 10kΩ X 2
  • Resistor 4.7kΩ
  • Resistor 10kΩ X 4
  • Resistor 470Ω X 2
  • Resistor 330Ω X 2
  • Resistor 56kΩ
  • Push Button X 2

The MCU(AT89S52) is brain of the circuit. It reads the temperature from sensor(DS1820) using one wire protocol. This temperature is compared with the preset temperature value inside the microcontroller and then switches the required function. Two toggle buttons are used to increase/decrease the preset temperature value. This value is saved in the eeprom chip(24C02), hence no effect of power failure. In the LCD connections there are two variable resistors of 10kΩ used to set contrast & brightness.

The firmware is written in C and compiled using “mikroC Pro for 8051“.

Download the complete source code. Burn the HEX file into the target microcontroller.

Leave a Reply

Your email address will not be published. Required fields are marked *