Temperature Controlled Fan Using Micro controller 8051/8052 ( C Program)
I have recently made a temperature controlled DC fan whose speed increases with the rise in temperature and decrease as the temperature falls ! It has got a lot of practical usage as it does not require to manually operated and it turns off as the temperature falls below a certain threshold ! and the temperatures on which you want to change the speed or turn off the fan are completely user defined !!
The components required are:
1.AT89S51/AT89S52
2.ADC0804
3.LM35
4.L293D
LM 35:
Temperature sensor whose output voltage varies with the change in the temperature. The output voltage increases by 10mV for 1 degree rise in temperature.
ADC 0804:
It is an analogue to digital converter who converts the provided analogue signal into corresponding digital signal. It uses the provided reference voltage to provide digital output from analogue input.
AT89S52:
It is an ATMEL 8 bit microcontroller with 8kb of programmable flash memory. Its operating voltage range is from 4v to 5.5 v.it has 32 programmable I/O lines.
L293D:
It is a current driver used for the purpose of driving motors.it has four inputs and four outputs. If the voltage at input 1 and input 2 is same then the motor connected between output2 will not run. If input 1 is greater than input 2 then the motor will move in the direction opposite to the direction in the case when input 2 is greater than input 1.
WORKING:
The circuit works on the feedback principle. The speed of the fan varies with the variation in the temperature. The speed of the fan increases if the temperature is increased and the speed of the fan decreases with the decrease in the temperature.
LM35 produces its output voltage corresponding to the temperature. The temperature is given to ADC0804 who converts the analogue variation in the voltage into the digital form. When the Vref is properly selected (1V in this case) then the temperature value appears on the output pins of the ADC 0804 in the binary form. This output is given as input to the port 1 of the 8052 microcontroller. The input is compared in the microcontroller and the required output is produced.
SPEED CONTROLLER:
To control the speed of the fan a PWM (pulse width modulation) is used
.
PWM (PULSE WIDTH MODULATION):
In pulse width modulation the power delivered to the load is varied by changing the duty cycle of the output voltage.
1. To deliver high power duty cycle is kept high
2. To deliver less power duty cycle is kept low
reference;
http://electriclubs.blogspot2011/08/temp...micro.html