Sunteți pe pagina 1din 7

VI.

Temperature Sensor SubsystemDesign


ECE 250 Lab 6
Temperature Sensor Subsystem Design
In this lab we will design a temperature sensor using the building blocks you have studied in class or have
had in previous classes. You will be using a comparator and a logic gate. If you are not familiar with these items,
you should review notes from your earlier classes. The sensor subsystem is shown in Figure VI -!
D 3
L E D
7 4 X X 0 0
0
+
-
V c c
D C = 1 5
V d d
C o m p _ O u t
0
V c c
0
0
+
-
V 3
D C = 5
+
R 2
+
R 1
1 k
D 1
D 1 N 4 0 0 4
V e e
+
R 6
V c c
+
R 5
L i m i t
0
+
R 3
T e m p
V e e
+
C 1
0 1 u
+
-
V e e
D C = 1 5
! 1
! 2 N 3 " 0 4
V d d
+
C 2
0 1 u
V d d
D 2
V c c
L o # i c _ O u t
T $ i p
0
% 2 &
1
2
3
'
1
4
V c c
+
R 4
1 0 k
0
% 1 &
L ( 3 2 4
1
3
2
4
1
1
O % T
+
-
V
+
V
-
Figure VI-1 Temperature Sensor Cir!uit
This circuit should turn the "#$ on if the ambient temperature is above %& ' and turn the "#$ off if the
temperature is below %& '.
VI.". #re-Lab Design an$ System %peration
For the prelab, we will discuss the operation of each block and choose components and values. You are
re(uired to specify values for the resistors that do not have a value displayed in the schematic, and you are re(uired
to choose a part number for $).
VI.*.. Temperature +ensor
The temperature sensor is composed of a diode and a resistor as shown in Figure VI -)!

0
V c c
0
+
R 1
1 k
D 1
D 1 N 4 0 0 4
T e m p
+
C 1
0 1 u
Figure VI-2 Dio$e Temperature Sensor
From class, we know that if the current through the diode is constant, the diode voltage decreases by appro,imately
) mV for every degree centigrade increase in temperature. In this circuit, the diode current is appro,imately
constant because the diode current is

R
V V
I
D CC
D

=
+ince V'' is & V and V$ only changes a few millivolts with temperature, the current through $ is appro,imately
constant. Thus, the only change in the diode voltage will be due to the change in ambient temperature.
The purpose of ' is to remove any noise that may be present at the Temp node. -emember that a capacitor
is an open circuit to $' voltages. Thus, in the ideal case, ' does nothing. .owever, noise is always present in
circuits and always contains high fre(uency components. * capacitor is a low impedance to high fre(uencies, so the
purpose of ' is to remove any high fre(uency noise at the Temp node.
#&EL"' +imulate the circuit of Figure VI -) with /+pice and display how the diode voltage changes with
temperature. To do this, specify an analysis type of $' +weep, and then choose to sweep the temperature from 0
' to &0 '. You should obtain a plot similar to the one shown below!
TEMP
10 15 20 25 30 35 40 45 50
V(Temp)
670mV
680mV
690mV
700mV
710mV
720mV
730mV
740mV
Figure VI-( Dio$e )o*tage as a +un!tion o+ temperature.
1se the cursors to obtain the diode voltage at )& ' and %& '.
)
VI.*.). Voltage Trip /oint
2e would like our temperature sensor to flip at appro,imately %& '. To do this, we need to create a stable
voltage reference e(ual in magnitude to the diode voltage at %& '. 2e will do this using the voltage divider of
Figure VI -3!
+
R 2
+
R 3
+
C 2
0 1 u
T $ i p
V c c
0
Figure VI-, Vo*tage re+eren!e.
This reference is dependent on the values of -) and -%, and on the supply voltage V''. 4ote that the resistance
values of -) and -% are temperature dependent. Thus, our voltage reference is itself temperature dependent, and
this is not good. The design of an accurate, low noise, temperature independent, supply independent voltage
reference is very difficult. For our circuit, we will use the resistive divider.
2e will impose three constraints on this divider. The first is that we would like the voltage at node Trip to
be e(ual to the diode voltage at %& '. The second is that we do not want the resistive divider to waste a lot of
power. Thus, we will impose the constraint that the sum of -) and -% be greater than 0 k. The last constraint is
that -) and -% must be standard &5 resistors you can obtain in the lab. /otentiometers are e,pensive, and we do
not want to use them in our design. Thus, we will use standard &5 resistors, and we will choose the values of -)
and -% so that the voltage at node Trip is as close to the desired voltage as possible. 2e will not be able to make the
voltage at node Trip e,actly what we want, but we can come close.
#&EL"'
'alculate and choose standard &5 resistors for -) and -%.
For your chosen values, calculate the voltage at node Trip and find the corresponding diode temperature
using the plot of Figure VI -%. This is the temperature you e,pect the circuit to trip.
VI.*.%. 'omparator 6peration
6ur circuit contains a comparator. In case you are not familiar with the operation of the comparator, we
will summari7e it here.
C o m p _ O u t
V e e
V c c
T e m p
T $ i p
% 1 &
L ( 3 2 4
1
3
2
4
1
1
O % T
+
-
V
+
V
-
Figure VI-5 L- (2, .ire$ as a !omparator.
*n "8 %)3 6/*8/ can be used as either an amplifier or as a comparator. This circuit has no negative feedback,
so it is being used as a comparator. *s a comparator, the output can only be one of two values, e(ual to or close to
the value of the supplies. The supplies are connected to the V9 and V- terminals. In our circuit, V9 is connected to
V'' which is 9&V, and V- is connected to Vee which is -&V. Thus, our supplies are &V. For an ideal
comparator, the output would be either 9&V or -&V. For an "8%)3, the output cannot (uite reach the supply rails
and is limited to about %.&V.
%
For a comparator, when the voltage at the :9; terminal is greater than the voltage at the :-; terminal, the
output goes to the ma, positive output, or about %.& V for the "8%)3. 2hen the voltage at the :-; terminal is
greater than the voltage at the :9; terminal, the output goes to the ma, negative output, or about -%.& V for the
"8%)3. 2e can summari7e the comparator operation by the e(uations!
V Output then if
V Output then if
& . % ; : ; :
& . % ; : ; :
= +
= +
For our circuit, the voltage at the :9; terminal is the Temperature signal and the voltage at the :-; terminal is the
Trip voltage. Thus, for our circuit!
V Output then Temp V Trip V if
V Output then Trip V Temp V if
& . % ; : ; :
& . % ; : ; :
=
=
+ince we are using the diode to sense the ambient temperature and the diode voltage goes down as temperature
increases, we can interpret the operation of the comparator as!
V Output then T T if
V Output then T T if
Trip ambient
Trip ambient
& . %
& . %
+ =
=
#&EL"' 1nderstand the operation of the comparator. -un a simulation of the circuit of Figure VI -< and show
that the comparator flips when the temperature goes past the trip point. +pecify an analysis type of $' +weep, and
then choose to sweep the temperature from 0 ' to &0 '. /lot the output of the comparator. This will generate a
plot of the comparator output versus temperature.
VI.*.3. Voltage "imiter
2e would like to take the output of our comparator and use the information in a digital circuit. The only
problem is that the comparator output ranges between %.&V. * typical logic circuit re(uires 0 to & volts. To
interface the comparator to a logic gate, we need to use a =ener clamp!
C o m p _ O u t L i m i t
0
D 2
+
R 4
1 0 k
Figure VI-6 /ener !*amp.
The purpose of this clamp is to limit the input signal to the logic gate to safe logic voltage levels. * typical gate can
tolerate voltage levels of -0.> to & volts depending on the logic family.
#&EL"' 'hoose an appropriate =ener to accomplish the stated function of the limiting circuit.
VI.*.&. "ogic ?ate
?ate 1)* in Figure VI - is a TT" 4*4$ gate wired as an inverter. Its only purpose is to give you
e,perience in interfacing digital and analog circuits. The gate is wired as an inverter. Thus, if the input is a logic
the output of the gate will be a logic 0. If the input is a logic 0, the output will be a logic . In circuit reali7ations of
TT" logic gates, a logic is a voltage greater than about %.& volts and less that or e(ual to about & volts. * logic 0
is a voltage less than about 0.@ volts and greater than 0 volts.
#&EL"' 1nderstand the operation of the inverter.
VI.*.@. "#$ $river
* standard logic gate cannot drive a & m* load and thus we need a high current driver. $esign the circuit
of Figure VI -> to drive & m* of current through the "#$ when the output of the logic gate is high. 2hen the
output of the logic gate is high, the "#$ should illuminate.
3
D 3
L E D
0
+
R 6
+
R 5
! 1
! 2 N 3 " 0 4
V d d
L o # i c _ O u t
Figure VI-0 LED $ri)er.
*ssume a "#$ diode forward voltage of .< volts. :I do not know what the specifications are for the "#$s
available in the lab.; 'hoose -@ to limit the "#$ current to & m*. 2hen choosing -&, make sure that the current
drawn from the logic output is less than m*.
#&EL"' 'hoose standard values of -& and -@.
VI.'. Laboratory -easurements
This is a large circuit with blocks that function independently. You will need to build the circuit a block at a
time and verify each blockAs operation. $o not wire the circuit up all at once. Instead, wire up a block at a time and
verify each blockAs operation.
You will also need to make your wiring as neat as possible. * few bad connections will drive you cra7y
when debugging your circuit and cause you to spend hours in the lab.
VI.B.. $iode Temperature +ensor 8easurements
2ire up the circuit of Figure VI -) and use the $' multimeter to measure the diode voltage. 6bserve that
the voltage changes as the diode is heated or cooled. 2hen you are satisfied that the diode voltage is a function of
temperature, keep the power to the circuit turned on and allow the diode voltage to stabili7e. #ventually the diode
will reach room temperature and the voltage will stabili7e. -ecord this diode voltage and compare it to the value
predicted by /+pice.
I+ your $io$e )o*tage is too +ar a.ay +rom t1e )o*tage pre$i!te$ by #Spi!e2 you .i** nee$ to
re!a*!u*ate )a*ues +or &2 an$ &(. 3ou may .ant to use a 1air $ryer or a 1eat gun to .arm up your $io$e
.1en testing. I+ you 1a)e a 1air $ryer2 you may .ant to bring it to t1e *ab .1en testing t1is !ir!uit. I+ you use
t1e 1eat gun a)ai*ab*e +rom t1e *ab2 be !are+u* t1at you $o not me*t your boar$.
VI.B.). Voltage -eference
2ire up the voltage reference of Figure VI -3 and measure the voltage using a multimeter. 'ompare the
measured value of the reference to the e,pected value and to the measured diode voltage. If the voltage of the
reference is greater than the diode voltage at room temperature, your circuit will not work. 2hyC *t room
temperature, the diode voltage must be greater than the reference voltage. 2hyC If necessary, adDust the values of
-) and -% so that the reference voltage is 0 to )0 mV less than the diode voltage at room temperature.
VI.B.%. 'omparator 'ircuit
*dd the comparator as shown in Figure VI -<!
&
0
C o m p _ O u t
V c c
0
+
R 2
+
R 1
1 k
D 1
D 1 N 4 0 0 4
V e e
V c c
T e m p
+
R 3
+
C 1
0 1 u
+
C 2
0 1 u
T $ i p
V c c
0
% 1 &
L ( 3 2 4
1
3
2
4
1
1
O % T
+
-
V
+
V
-
Figure VI-4 Comparator test !ir!uit.
Verify the operation of the circuit as follows.
*t room temperature measure the voltages at the Temp and Trip nodes. They should be unchanged from the
previous section. If not find the problem.
If the Temp and Trip node voltages are correct, measure the output of the comparator with the multimeter.
*t room temperature, the output should be at the positive ma,imum. *s the diode temperature sensor
warms up, the output of the comparator should flip to the ma,imum negative output.
If the comparator appears to work, move on to the ne,t part.
VI.B.3. Voltage "imiter
*dd the voltage limiter to the circuit as shown in Figure VI -E!
0
C o m p _ O u t
V c c
0
+
R 2
+
R 1
1 k
D 1
D 1 N 4 0 0 4
V e e
V c c
L i m i t
T e m p
0
+
R 3
+
C 1
0 1 u
+
C 2
0 1 u
D 2
T $ i p
V c c
+
R 4
1 0 k
0
% 1 &
L ( 3 2 4
1
3
2
4
1
1
O % T
+
-
V
+
V
-
Figure VI-5 Vo*tage *imiter test !ir!uit.
The purpose of this circuit is to limit the %.& volt output of the "8%)3 to about 9& volts and -0.> volts. Verify
the operation of the circuit as follows.
*t room temperature measure the voltages at the Temp and Trip nodes. They should be unchanged from the
previous section. If not find the problem.
@
If the node voltages are correct, measure the output of the comparator with the multimeter. *t room
temperature, the output should be at the positive ma,imum. *s the sensor warms up, the output of the
comparator should flip to the ma,imum negative output. If the comparator output is incorrect, measure the
output of the previous stages and find the error. You know the function of all of the stages, so you should be
able to locate the problem.
If the output of the comparator is correct, measure the output of the limiter. *t room temperature, the
output should be about & V. *s the sensor warms up, the output of the limiter should flip to about -0.>.
If everything appears to work, move on to the ne,t part.
VI.B.&. "ogic ?ate
*dd the 4*4$ gate as shown in Figure VI -0!
7 4 X X 0 0
0
C o m p _ O u t
V c c
0
0
+
R 2
+
R 1
1 k
D 1
D 1 N 4 0 0 4
V e e
V c c
L i m i t
T e m p
0
+
R 3
+
C 1
0 1 u
V d d
+
C 2
0 1 u
D 2
L o # i c _ O u t
T $ i p
% 2 &
1
2
3
'
1
4
V c c
+
R 4
1 0 k
0
% 1 &
L ( 3 2 4
1
3
2
4
1
1
O % T
+
-
V
+
V
-
Figure VI-10 Logi! gate test !ir!uit.
The output of the logic gate should be a logic or 0. 2ith no load, a logic is close to & V and a logic 0 is close to
0 V. Verify the operation of the circuit as follows.
8easure the output of the limiter. *t room temperature, the output should be about & V. *s the sensor
warms up, the output of the limiter should flip to about -0.>. If the limiter output is incorrect, measure the
output of the previous stages and find the error. You know the function of all of the stages, so you should be
able to locate the problem.
If the output of the limiter is correct, measure the output of the 4*4$ gate. *t room temperature, the
output should be a logic 0. *s the sensor warms up, the output of the gate should flip to a logic .
If everything appears to work, move on to the ne,t part.
VI.B.@. 'omplete 'ircuit Test
2ire up the "#$ driver. You should now have the complete circuit constructed as shown in Figure VI -.
2e must now test the operation of the "#$ driver. 1se the following steps.
8easure the output of the 4*4$ gate. *t room temperature, the output should be about 0 V. *s
the sensor warms up, the output of the gate should flip to a logic . If the 4*4$ gate output is
incorrect, measure the output of the previous stages and find the error.
8easure the voltage at the collector terminal of the BFT. 2hen the output of the 4*4$ gate is
high, the BFT should be saturated and the collector voltage should be low. *lso, when the output of
the 4*4$ gate is high, the "#$ should be on. 2hen the output of the B*4$ gate is low, the
collector voltage should be pulled up to & V, and the "#$ should be off.
Demonstrate t1e operation o+ t1e !omp*ete !ir!uit to me.
>

S-ar putea să vă placă și