Saturday, January 18, 2014

Temperature based device Control system

A temperature based device control system which uses AT89s52 and LM35 temperature sensor is an embedded system which controls external devices(mainly an household appliances heater,fan,coolers and many more) by monitoring the temperature obtained from temperature sensor.

This project called temperature based device control system can be a good selection of project for a newbie in embedded system because this project can help an ECE engineering student to learn a bit about the hardware component used, to take input and process them to give required output and to interface a sensor which requires a knowledge of interfacing adc.

Before going on this topic, readers are requested to read Interfacing LM35 with AT89s52.

By now, you must already have known how to interface LM35 temperature sensor with AT89s52 MCU.In this project, we will first read the temperature obtained from the sensor. Then after, the obtained temperature is compared with two limit temperature which represents corresponding temperature of summer and winter. If the temperature obtained from LM35 is greater than the temperature representing summer limit, then we will turn on fan and if the temperature is less than the temperature representing winter limit, then we will turn on the heater. If the temperature is between these two limit, then both the device are turned off. Or You can program the microcontroller as your need and for as many number of external devices which can be attached to the controller.

The circuit diagram of temperature based device control system is shown below in figure a.


Circuit diagram of temperature based device control system using lm35 temperature sensor
fig a:- schematic of temperature based device control system
In the schematic shown above pin 1^6 and 1^7 is connected to the resistor attached in transistor Q2 and Q3 respectively.

Since, this project is especially designed to control external devices like fans, heaters, coolers etc which mostly use ac power for operation. To control these devices through microcontroller relays are used as shown in figure a(two in left side of schematic).Also the currents from ports of microcontoller are unable to drive the relays, an relay driver circuit is required which is shown in figure below.

off state of relay
fig b:- relay not energized
on state of relay
fig c: relay energized
As we can see in above figures, when button switch is open which means when the transistor is off or not active the relay is not energized but when the button switch is closed the transistor is on and the relay is energized which in turn changes the position of contact of relay (relay contact is shown in sky blue color in above figures).

This is all for now.The source code written in C along with proteus simulation file can be downloaded by clicking here.

You may also like to read:

No comments: