Académique Documents
Professionnel Documents
Culture Documents
EGR 214-905
April 13th, 2012
Abstract
In this paper, the design and implementation of a temperature sensor with
indicator lights for increasing temperature levels was designed and implemented. The
circuit will trigger a single LED at 80 F, 85 F, 90 F, and 95 F based on the output of a
temperature sensor. This paper covers the initial design process of the circuit,
computer simulations in order to verify functionality, and laboratory measurements of
the finished circuit. An effective circuit was designed and the circuit was successfully
implemented.
1.0 Introduction
It is often useful to have a sensor to monitor temperatures in a circuit element.
The circuit described in this paper indicates four distinct temperature levels (80 F, 85
F, 90 F, and 95 F) via the use of LEDs. A temperature sensor that output a specific
voltage per temperature was used in conjunction with a quad op amp in a voltage
comparator configuration in order to act as a switch for each LED. The circuit was
powered by a 9 V battery, and a zener diode was employed to prevent unwanted
voltage drops in important elements as the 9 V battery drained during use.
This paper is organized as follows. Section 2.0 discusses general design and
theoretical analysis of the temperature sensor circuit. Computer simulations were
performed, and results are presented in Section 3.0. Construction of the circuit and
laboratory measurements are presented in Section 4.0. Results of the built circuit are
compared to the analytical and simulated results in Section 5.0. Section 6.0 will present
the conclusions drawn from this paper.
temperature sensor output. An LM324 quad op amp was chosen for use in the circuit.
This op amp had common VCC+ and VCC terminals, but four sets of inputs and outputs.
A resistive network was designed in order to generate the VIN node voltages found in
Table 2.3.2.
Table 2.3.2: VIN Node Voltages
Node
V1in
V2in
V3in
V4in
Voltage (mV)
800
850
900
950
Output from the temperature sensor VTEMP was fed directly into each of the VIN+
inputs on the quad op amp. VCC+ and VCC were set to 9 V and ground, respectively.
Figure 2.3.2 depicts the values for the 80 F voltage comparator.
0.80 V, and the voltage comparator would switch from outputting 0 V to outputting 9 V
(minus some internal resistance), which would then turn that respective indicator LED
on. Similar configurations were used for 85 F, 90 F, and 95 F, with VIN values found
in Table 2.3.2.
2.4 Zener Diode
In order to prevent unwanted voltage drops at the VIN nodes as the battery that
powered the circuit drained, a zener diode was placed in parallel with the resistive
network, as seen in Figure 2.4.1. The forward voltage (Vz) of the zener diode was
equal to 5.1 V. In order to limit the current through the diode, resistor R1 was placed in
the circuit prior to the diode. Kirchhoffs Voltage Law provides Equation 1 in order to
determine V1.
V1+Vz = 9 V
(1)
Value ()
56
56
56
900
4668
V2
R
(2)
where V is the voltage across the resistor R.
A 100 resistor was selected to ensure that the resistor would heat to at least
95 F by dissipating 0.81 W.
2.8 Summary of Design
Figure 2.8.1 depicts the final design of the temperature sensor circuit. A
summary of the calculated voltages drops for the temperature sensor circuit is
presented in Table 2.8.1.
Table 2.8.2 contains calculated node voltages required at stated nodes in order
for each LED to turn on at its designated temperature. Table 2.8.4 contains a summary
of nominal resistor values selected for the circuit.
Vz
5.1
V1
3.9
Vpot
4.15
V2in
0.85
V3in
0.90
V4in
0.95
10
Value ()
100
4668
56
56
56
900
220
220
220
220
100
3.0 Simulation
3.1 LTSpice Simulation
A computer simulation using LTSpice was run in order to verify the analytical
results presented in Section 2 of this paper. Figure 3.1.1 depicts the circuit that was
simulated. Five different configurations were simulated by changing the value of the
voltage source V2, which stood in for the temperature sensor in the simulations.
Results for each simulation can be found in the following tables.
11
12
Vin
798 mV
847 mV
897 mV
947 mV
Vtemp
750 mV
750 mV
750 mV
750 mV
Vout
16.4 V
12.4 V
11.4 V
11.2 V
Vin
798 mV
847 mV
897 mV
947 mV
Vtemp
800 mV
800 mV
800 mV
800 mV
Vout
6.28 V
16.4 V
12.4 V
11.4 V
Table 3.1.3, Table 3.1.4, and Table 3.1.5 contain results for subsequent
temperature levels. It is clear from the values found in each table that the voltage
comparator was designed effectively, and that proper voltages were supplied at the
correct times in order to power each LED at the desired temperature level.
Table 3.1.3: Simulation of 85 F
Comparator
80 F
85 F
90 F
95 F
Vin
798 mV
847 mV
897 mV
947 mV
Vtemp
850 mV
850 mV
850 mV
850 mV
Vout
6.28 V
6.28 V
16.5 V
12.4 V
13
Vin
798 mV
847 mV
897 mV
947 mV
Vtemp
900 mV
900 mV
900 mV
900 mV
Vout
6.28 V
6.28 V
6.28 V
16.6 V
Vin
798 mV
847 mV
897 mV
947 mV
Vtemp
950 mV
950 mV
950 mV
950 mV
Vout
6.28 V
6.28 V
6.28 V
6.28 V
14
V1 (V)
4.0025
3.0054
2.1020
1.1852
Vz (V)
5.0367
5.0026
4.9625
4.8813
Vpot (V)
4.0911
4.0646
4.0306
3.9645
15
Table 4.1.2 contains measured node voltage values for nodes V1in through V4in
as Vs was varied from 9 V to 6 V in 1 V increments. Node voltages stayed relatively
constant when compared to the reduction in Vs.
Table 4.1.2: Measured Node Voltages
Vs (V)
9.045
8.016
7.067
6.068
V1in (V)
0.8027
0.7958
0.7882
0.7745
V2in (V)
0.8516
0.8449
0.8370
0.8224
V3in (V)
0.9015
0.8941
0.8857
0.8703
V4in (V)
0.9508
0.9428
0.9341
0.9179
Value (mA)
38.73
0.887
39.48
Calculated (mV)
800
850
900
950
Simulated (mV)
798
847
897
947
Percent Error
0.000625%
0.000830%
0.000741%
0.000665%
16
The values in Table 5.1.2 depict voltage drops across the state elements. The
relatively low percent error values show that the required voltage drops for the LEDs to
be triggered at the correct temperatures were able to be achieved in the laboratory.
Table 5.1.2: Calculated and Measured Voltages
Vs
Vz
V1
Vpot
Calculated (V)
9.00
5.10
3.90
4.15
Measured (V)
9.045
5.0367
4.0025
4.0911
Percent Error
0.06%
0.24%
0.67%
0.34%
The values found in Table 5.1.3 were the voltages being supplied to the Vin
terminals of the quad op amp. The suitably low percent error values in Table 5.1.3 show
that when using a 9 V source, the circuit proved to be accurate when compared to the
intended design.
Table 5.1.3: Node Voltages With 9 V Source
V1in
V2in
V3in
V4in
Calculated
0.80
0.85
0.90
0.95
Measured
0.8027
0.8516
0.9015
0.9508
Percent Error
0.42%
0.22%
0.19%
0.09%
Table 5.1.4 and Error! Reference source not found.Table 5.1.6 depict the
results from the laboratory simulation of battery drain. In order to simulate a reasonable
voltage drop due to battery drain, Vs was reduced by 12.06% to 8.016 V, and each VIN
node voltage dropped by roughly 0.8%. In a slightly more extreme case, Vs was
reduced by 39.40% to 6.069 V, yet the node voltages at the respective VIN terminals
dropped by roughly 3.5% each. It is clear from the relatively low percent difference
values at the various VIN nodes that the zener diode was effective.
17
Voltage (V)
9.045
0.8027
0.8516
0.9015
0.9508
Voltage (V)
8.016
0.7958
0.8449
0.8941
0.9428
Percent Difference
12.06%
0.86%
0.79%
0.82%
0.84%
Voltage (V)
9.045
0.8027
0.8516
0.9015
0.9508
Voltage (V)
6.068
0.7745
0.8224
0.8703
0.9179
Percent Difference
39.40%
3.58%
3.49%
3.52%
3.52%
6.0 Conclusion
The circuit presented in this paper has been demonstrated to be an effective
design for the implementation of a temperature sensor circuit via the use of a voltage
comparator configuration. Analytical results agreed closely with simulated results, and
laboratory measurements confirmed that the design function as desired. When using a
9 V source, it was demonstrated that all 4 LEDs were triggered at the desired
temperatures. While a constant Vs value would be preferable for some applications, the
relatively low node voltage drops when varying Vs show that the implementation of the
zener diode was effect for applications requiring the portability afforded by battery power
and when great amounts of accuracy in temperature measurements are not important.
18