Eee-305 Temperature Box Report
Eee-305 Temperature Box Report
Eee-305 Temperature Box Report
Report on:
THE TEMPERATURE BOX
An introductory Control System
Submitted by:
Kasshaf Ahmad
ID: 18121082
EEE 305
Section: 02
Submitted to:
Dr. A.K.M Abdul Malek Azad
Professor
Department of Electrical and Electronics
Engineering, BRAC University, Dhaka,
Bangladesh.
Abstract:
In this paper, the “Temperature Box” experiment is presented. This experiment involves the
design and implementation of a feedback temperature control system. At the BRAC University,
the Temperature Box is used to motivate the material in an introductory system engineering
course.
Objective:
The main objective of this experiment is to construct a closed loop control system that regulates
the temperature inside a box. Comparator compress to feedback to the pre-defined temperature
level and gives output accordingly.
Block Diagram:
In this experiment, the temperature within box is controlled by turning the hair dryer on and off
or stays unchanged. The temperature comparison is implemented using op-amps and digital
logic. A relay switch is used to regulate the power supply to the hair dryer based on the outcome
of this comparison.
Scale and shift:
The scale and shift circuit is used to increase the sensitivity as a higher voltage range to work
properly and easily with the comparator circuit. This is because the output voltage of the
temperature sensor is very low and this could lead to a high error as the gaps between the values
are very small.
Comparator Circuit:
the digital logic circuit is used to implement the comparison circuit values A and B and sends
the data to the relay. This digital logic circuit is consists with two NAND gates, one clock
generator and a D Flip-Flop.
ANALOG CONTROLLER
Using AD22100
An LED was used to indicate whether the hairdryer would turned on or off.
Using LM35
Although the schematics for AD22100 and LM 35 are same, there are minor discrepancies. For
example, sensor would be LM35, which is found in the library of proteus. Moreover, the resistor
value in the scale and shift circuit will be different
To calculate the resistors, we had to take sample Vs for different
temperatures and generate a graph of the T V/s Vs graph
The slope of the graph is, m= (0.341925-0.211619)/(93.2-69.8)
= 5.568*10^-3
The Graph gives an Equation
Vs = 0.005568Tf – 0.179298
At 21ºC, Vs= 0.211619 and Vt= 0.270861
At 35ºC, Vs= 0.351948 and Vt=4.27895
Using the equation,
Vt = α+ β Vs
α = -5.53
β = 28.5
Using Equations,
𝑅 𝑅
β = 𝑅1 α =-5𝑅2
Taking, R= 100 kΩ
Therefore,
R1 = R3 = 3.38 kΩ
R2 = R4 = 81.43 kΩ
RESULT
AD22100
The reference voltages Vh=3.75V and Vl= 2.2V represent the temperature 35 degree Celsius and
29 degree Celsius.
While simulating it was seen that, the relay would turn on, switching the LED on whenever the
temperature is below 29 degree Celsius and would stay on until it crosses 35 degree Celsius. The
light would be off when it crosses 35 and it would stay off until it again goes below 29 degree
Celsius.
LM 35
The adjusted reference voltages Vh=4 V and Vl= 2.2V represent the temperature 35 degree
Celsius and 29 degree Celsius.
To operate an Arduino, a code is needed. Thus the Arduino allows the data from the sensor to be
sent to the relay to turn it on or off, giving a simpler and precise way to control the temperature.
Code:
const int input = A1;
int output = 2;
int prev = 0;
float v;
float v1;
float vt;
void setup()
pinMode(input, INPUT);
pinMode(output, OUTPUT);
Serial.begin(9600);
void loop()
v = analogRead (input);
vt = v1;
if (vt >=216 )
prev = 0 ;
if (prev == 1)
{
digitalWrite(output , HIGH);
prev = 1;
else
prev = 0;
else
prev = 1;
delay (1500);
}
Using LM 35
The schematic is similar to the AD22100 sensor circuit except the use of LM 35 sensor instead
of AD22100
Code:
const int input = A1;
int output = 2;
int prev = 0;
float celcius;
float farenheit;
float vout;
void setup()
{
pinMode(input, INPUT);
pinMode(output, OUTPUT);
Serial.begin(9600);
void loop()
vs = analogRead(input);
vs = (vs*500) / 1023 ;
c = vs ;
f = (c*1.8)+32 ;
if (f >= 95)
prev = 0 ;
if (prev == 1)
digitalWrite(output , HIGH);
prev = 1;
else
prev = 0;
}
else
prev = 1;
delay (1500);
RESULT
AD22100
For both the Digital Controllers, while simulating it was seen that, the relay would turn on,
switching the MOTOR on whenever the temperature is below 29 degree Celsius and would stay
on until it crosses 35 degree Celsius. The motor would be off when it crosses 35 and it would
stay off until it again goes below 29 degree Celsius.
Comparison
Data Deviation
Looking at the data found, it can be said for AD22100 sensor circuit the practical
data is very close to the theoretical data. On the other hand, for LM 35 sensor
circuit the deviation in the practical data is noticeable, although the result shows
the device works perfectly.
Price Comparison
Analog Circuit with AD22100
COMPONENTS PRICE
OP Amp 4 x 25 = 100TK
Resistors 15TK
NAND Gate 20TK
D Flipflop 30TK
AD22100 Sensor 180TK
Potentiometer 15TK
Relay 25TK
Total 385TK
Analog Circuit with LM35
COMPONENTS PRICE
LM 35 70TK
ARDUINO 450TK
RELAY 85TK
TOTAL 605TK
COMPONENTS PRICE
According to my opinion,
The Analog Circuit with LM35 is the most optimal circuit. Since, LM 35 is readily
available and it costs the least among all the other circuit designs. Moreover, the
values of the circuit is pretty much accurate.
Conclusion:
The ‘Temperature Box’ project gives a closer look on closed loop configuration
and feedback systems. It can be said, that Project Based Learning is better than
traditional subject based learning. The project work has put us in a position of real
life problem solving situation in which we needed to research and come up with
solutions to ease up the constraint. Although, the whole project was simulation
based it has helped a lot in better understanding course related material.