You are on page 1of 9

The Temperature Box

4/6/2016 Introduction to the control System project

Submitted By:
1. Md. Mamunur rahaman 13321051
2. Benazir Mustafa- 13321026
3. MD. Toufiq Hasan Anik 13121157
4. Farzana Nayeem- 13321047
5. Sumaiya Mustafa- 13221044
6. Mahmudul Islam- 13121133

Submitted to:

Dr. A.K.M Abdul Malek Azad


Professor
Department of Electrical and Electronics
Engineering, BRAC University, Dhaka,
Bangladesh.
Abstract:
There is a heightened awareness in the academic controls community about the need to attract
the best and brightest students to the discipline. To achieve this end, change is needed in the
standard approaches to educating, recruiting and training students. 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.

The Temperature Box Experiment:

High Temperature

Temperature
Low Temperature

Comparison circuit Logic Gates Relay, Bulb and Plant

Scale and Shift circuit Sensor

Figure: Block diagram of the Temperature Box.


The Temperature sensor:
We use LM35 temperature sensor which gives the Calibration directly in Celsius
(Centigrade).Output of this sensor varies by 0.01V per degree Celsius. It can sense from -55 to
150 degree Celsius. The relationship between temperature and voltage is linear for a wide range
of temperatures and is given by
Vs=0.01*Tc
First we Place a bulb near the sensor and increase the temperature. Then corresponding
temperature and voltage readings were collected using thermometer and multi-meter
respectively. We see the linear relationship between temperature and voltage. The readings
were then tabulated and a best fit line was plotted using MS EXCEL
Temperature(oC) 22 24 26 28 30 32 34 36 40
Input Voltage(V) 0.22 0.24 0.27 0.28 0.31 0.32 0.35 0.36 0.40

0.5

0.4
voltage(Vs)

0.3

0.2
V VS T
0.1

0
0 5 10 15 20 25 30 35 40 45
temperature(Tc)

Graph 1: Shows the voltage vs. temperature linear relationship

Scale and shift


As earlier we saw that the output of the temperature sensor is very low and it is very difficult
to use this values as on comparator circuit. So on this scale and shift circuit our main objective
was to increase the sensitivity as a higher voltage range to work properly and easily with the
comparator circuit. So we wanted to increase the gain as about 11 times as early stage.
This circuit first Scale and shift the input to output. This circuit is also called adder circuit.
As we know, VT= α+βVs
So, At 28 Degree Vs=0.28v and VT=2.9v so, 2.9=α+0.28β……(1)
At 35 Degree Vs=0.35v and VT=3.72v so, 3.72=α+0.35β…… (2)
From equation (1) and (2)
We got α=-0.3785 and β=11.71
So, α=-0.378=-5*R/R2 and β=11.71=R/R1

We took, R=10KΩ So, R1=.85 KΩ and R2= 132.1K Ω


We used Variable resistance Pot as resistors.
This same thing can be done by using proportional controller. Which will just increase the gain
by varying resistance.

Comparator Circuit:
This circuit is used to compare shift and scale circuit output voltage, VT with higher
temperature voltage VH and lower temperature voltage VL. To make decision whether A and
B is active or inactive to turn the relay on and off.
PROCEDURE:
1. Set higher voltage VH and lower voltage VL using pot

2. Higher voltage and lower voltage acts as reference.

3. Scale and shift output voltage compared with reference.

4. A and B output obtained and make decision which situation A and B active or inactive

CONDITION:
VT<VL<VH A=1, Active B=0, inactive

VT>VH>VL A=0 , inactive B=1 ,inactive

VL<VT<VH A=1 active B=1 active

ANALYSIS:

VH(35’C) VT VL(28’C) A B

3.72 2.2 2.9 1 0

3.72 4.5 2.9 0 1

3.72 3.1 2.9 1 1

Here, we noticed that when we set shift and scale output voltage 2.2(VT<VL) then we got A
active and B inactive. It means that relay is on. On the other hand, when we put VT
4.5(VT>VH) then we got A inactive and B active. It means that relay is off. We got both active
and relay unchanged when VT was set (VL<VT<VH).
D Flip-Flop:
D stands for data. This type of flip-flop stores the data that is on the data line. It captures the
value of D- input at a definite portion of the clock cycle and it becomes the output Q.
From the comparison circuit we get the value of A and B. We used the digital logic circuit to
implement the comparison circuit. This digital logic circuit is consists with two NAND gates,
one clock generator and a D Flip-Flop.
The Karnaugh map for comparison circuit is given below-
AB\𝑅𝑘 0 1

0 0 X X
0 1 0 0
1 1 0 1
1 0 1 1

From this we can get a logical expression, 𝑅𝑘+1 = B’+A𝑅𝑘


⇒ 𝑅𝑘+1 = (B (A𝑅𝑘 )’)’ [DeMorgan’s Law]
Where 𝑅𝑘 and 𝑅𝑘+1 represents the present state and next state respectively.
This logical expression is implemented using two NAND gates, one D Flip-Flop and a clock.

Fig: sequential digital logic for comparison block

The truth table of D Flip-Flop is given below-

Clock:
A clock generator circuit produces the time signal. The D Flip-Flop tries to follow the input
D but it cannot make the transitions unless it is enabled by the clock. We get the clock signal
from the signal generator.
Where, frequency =1 KHz; Amplitude = 5V and the pulse input is square wave.
BJT(Bipolar Junction Transistor):
Bipolar transistors consists of either p-n-p or n-p-n semiconductor. The three parts of BJT are
emitter, base and collector. In this circuit we used a n-p-n transistor.
The output we get from the D Flip-Flop is passed through a BJT to the relay. We used a BJT
here because if the output from a D Flip-Flop is less than 6V it cannot turn the relay ON and
the light will be in OFF state. As we get 4.1V output from the D Flip-Flop it is not possible to
turn on the light.
For this reason we connected a BJT here. When the voltage is 0.7 or greater than that the emitter
and the collector get shorted and then the relay will be ON.
After connecting the BJT with the output Q, we get 0.8 V in base. As a result the relay will be
ON and the light as well.
In this circuit we connected the base of the BJT with the output of the D Flip-Flop through a
10K resistor, the collector with the relay and grounded the emitter.

RELAY CONNECTION:

A relay is basically a switch that operates electrically which contains a sensing unit, the electric
coil, which is powered by AC or DC current. When the applied current or voltage exceeds a
threshold value, the coil activates the armature, which operates either to close the open contacts
or to open the closed contacts. In general, the current flowing in one circuit causes the opening
or closing of another circuit

.
Figure: Circuit Diagram of a Relay

In our project, the relay is used to switch on or off a bulb for a particular range of temperature.
The relay is turned on when the D flip-flop provides 5 volts to the relay and it is turned off
when it gets 0 volt from the D flip-flop. Here, the important point is that the relay switching
should be based on 3 rules discussed in the comparison circuit section and they are: (1) VT <=
VL < VH (Relay turns on) (2) VT >= VH > VL (Relay turns off) (3) VL < VT < VH (Relay state
unchanged)

The complete relay circuit is given below:

Figure: Relay Circuit with internal connections

Another important thing is that the connection between BJT and the relay. As the BJT is
connected with the D flip-flop, it carries the voltage to the relay and acts as a switching device.
To control a load, first it is needed to know what sort of load is used. In our case it is a 6 volt
relay. From the datasheet given below, we can acquire the resistance of the relay's solenoid
which is 400 Ohms for the 6 volt version that we use. We can calculate the current that flows
through the solenoid (coil) of the relay using Ohm’s Law, I = V / R => I = 6 / 400 => I = 0.015
A = 15 mA. The transistor must be able to provide enough current for the relay load which is
15 mA. Besides, the transistor must be able to switch 6 volts of voltage across its collector-
emitter leads.

Figure 1: Datasheet

Conclusion:

The ‘Temperature Box’ project gives an insight on closed loop configuration and feedback
systems which has enhanced the understanding of the course material. It can be said that PBL
(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 discussions,
improvisations and most importantly group work to complete it.

Referance:
Richard T. O’Brien , Jr . and John M. Watkins , Conference on Decision & control , Phoenix,
Arizona USA.December 1999

You might also like