Temperature Contoller
ECE425L
*
Prepared By:
Name:
*
Introduction and Idea
Using Analog-to-Digital Converter (ADC), the temperature is read from temperature sensor.
If the temperature is > Set value, the cooling fan speed is increased.
If the temperature is < Set value, the cooling fan speed is decreased.
It is a continuous operation
ECE425L
*
ECE425L
In this project, a temperature controller system is designed using LPC2148. It is a continuous loop.
At first, the temperature is read from temperature sensor by using Analog-to-Digital Converter (ADC).
Then the temperature is compared with the temperature settings of the AC Remote controller or Temperature knob.
If the temperature is greater than set value, the cooling fan speed is increased. and
if the temperature is less than set value, the cooling fan speed is decreased.
*
Analog-to-Digital converter ADC
Temperature sensor generates analog voltage proportional to temperature.
ADC of LPC2148 reads that analog voltage and store to a memory location.
*
Program:
Use the memory location
To read the data
Ad0.0
Ad0.1
Ad0.2
Ad0.3
Ad0.4
Temp sensor0
ADC
This is the ADC interface with temperature sensor. In this design, the LM35 temperature sensor is connected to the P0.28 pin. The ADC reading operation
reads the temperature value and store to the memory location assigned for it.
*
Flow Diagram
ECE425L
*
ECE425L
This is the flow diagram of the system. The temperature setting is read from the temperature control or control knob.
Then, the temperature is read from temperature sensor by using Analog-to-Digital Converter (ADC). This value is from 0 to 1023.. Using a formula
This value is converted to the Fahrenheit. Finally, the temperature is compared with the temperature settings of the AC Remote controller or Temperature knob.
If the temperature is greater than set value, the cooling fan speed is increased. and
if the temperature is less than set value, the cooling fan speed is decreased.
*
Code
Variable definition
ECE425L
*
ECE425L
This is the variable definition used in this project. R2 reads the temperature value. A LM35 Temperature sensor is
placed at P0.28 (ADC0). It is 10-bit ADC. So value is from 0 to 1023.
R3 converts the temperature reading of ADC to Fahrenheit. The value from ADC is from 0 -1023.
It converts to Fahrenheit using F = 5 x ADC_VALUE -32.
R6 contains the temperature set value from AC remote or Temperature knob.
R3 is compared with r6. This is the temperature comparison.
r5 the control value of cooling speed. If temperature is higher (r3>r6) r5= r5+1
If temperature is lower (r3
*
ECE425L
*
ECE425L
This is code of the continuous loop. The temperature setting is read from the temperature control or control knob.
Then, the temperature is read from temperature sensor by using Analog-to-Digital Converter (ADC). This value is from 0 to 1023.. Using a formula
This value is converted to the Fahrenheit. Finally, the temperature is compared with the temperature settings of the AC Remote controller or Temperature knob.
If the temperature is greater than set value, the cooling fan speed is increased. and
if the temperature is less than set value, the cooling fan speed is decreased.
*
Conclusion
Temperature is read by a LM35 sensor.
The sensor output is analog voltage which is continuously read by the ADC of LPC2148 and stored at a memory location.
The temperature reading is always compared with set value.
If temperature is higher, fan speed is increased by 1.
If lower, decrease by 1.
ECE425L
*
ECE425L
Temperature is read by a LM35 sensor.
The sensor output is analog voltage which is continuously read by the ADC of LPC2148 and stored at a memory location.
The temperature reading is always compared with set value.
If temperature is higher, fan speed is increased by 1.
If lower, decrease by 1.
*
StartRead the set value from the remote control/ Control KnobRead the analog voltage from the memory stored by temperature sensorConvert to Fahrenheit valueF = 5*x -32F> Set Value ?YESIncrease Fan Speed by 1Decrease Fan Speed by 1NO