The goal of this application note is to present a realistic example of a thermometer using an
ST7 and an NE555.
The NE555 is operating in the a-stable mode. Its frequency is controlled by the resistance
changes of a NTC-thermistor. The frequency, as well as the duty cycle, are measured by the
ST7 timer. The NE555 output is connected to the tim e r input capture pi n.
Rev. 1.0
AN1755/03041/7
1
A HIGH RESOLUTION / PRECISION THERMOMETER USING ST7 AND NE555
1 DESCRIPTION OF NE 55 5
The NE555 monolithic timing circui t is a hi ghly stable controll er capable of producing accurate
time delays or oscillation. In the time delay mode of operation, the time is precisely controlled
by one external resistor and capacitor. F or a stable operation as an oscil lator , the free runni ng
frequency and the duty cycle are both accurately controlled with two external resistors and
one capacitor. For more details see NE555 datasheet.
2 ASTABLE OPERATION
The circuit is sho wn in Figure 1. (pin 2 and 6 connect ed). I t triggers itself and operates as a
free running multi vibrator. The external capacitor charges through R
through R
stable mode of operation, C
. Thus the duty cycle is precisely set by the ratio of the se two resistor s. In the a-
2
charges and di scharges betw ee n 1/3 VCC and 2/3 VCC. Due to
1
the self-triggered mode, the charge and discharge times and therefore frequency are independent of the supply voltage.
Figure 1. Circuit Diagram of NE 555 in a-stable mode
and R2 and discharges
1
+
V
= 5V
CC
Output
Control
Voltage
0.01µF
3
5
12
The charge time (output HIGH) is given by
(1)t
= 0.693 (R1 + R2) C
1
1
and the discharge time (output LOW) by
4
NE555
R
1
8
7
R
2
6
C
1
(2)t
= 0.693 (R2) C
2
1
Thus the total period T is given by
(3)T = t
2/7
+ t2 = 0.693 (R1 + 2R2) C
1
2
1
A HIGH RESOLUTION / PRECISION THERMOMETER USING ST7 AND NE555
Figure 2. NE555 Timing Diagram
output
t
1
t
2
voltage on
C
1
3 THEORY OF OPERATION - NE555
In general we can use the R
of R
. The times needed to charge (1) and to discharge (2) the capacitor will be
1
(4)t
= 0.693 (R
1
(5)t2 = 0.693 (R2) C
The result of the measurement should be dependent on the value of R
C
should not v ary with tem pera ture or age. That is why the capac itor C1 is to be eliminated
1
from the equations.The peri ods t
and (5) we can calculate two variables.
Expressing C
(6)R
from (5) and putting it in (4) we obtain
1
= R2 (t1-t2) / t
ntc
The result depends on the precision of the time measuring (t1, t2) and tolerance of R2 only. It
depends neither on C
nor the supply voltage.
1
in place of R1 as well as in place of R2. We assume R
ntc
+ R2) C
ntc
1
1
ntc
and t2 are measured with the ST7 ti mer. F rom form ula (4)
1
2
in place
ntc
only. For that R2 and
4 THEORY OF OP ERATION - ST7
The rising and falling edges of the input signal are captured by the micro and periods t1, t2 are
measured with the built-in timer. The timer resolution (125 ns @ 8MHz) is sufficient to capture
these edges.
Note: To c alc ulate equation (6) we can use multiples of 125ns for simplicity.
3/7
A HIGH RESOLUTION / PRECISION THERMOMETER USING ST7 AND NE555
5 DESIGN
To design our circuit, we need to choose the right values of R2 and C1. These two values determine the frequency of the output sign al (3).
For the given temperature range (0 - 40 °C) and a 10KΩ NTC resistor, the chosen values are
40kΩ for R
Table 1. Table of theoretical values of designed thermometer
It is possible to implement this algorithm with any ST7 family micro (2K of program memory is
required). In general you can choose:
■
12-bit autoreload timer allowing configuration to f
■
16-bit timer allowing configuration to f
(~250ns), for ex. ST72264 @8MH z
cpu/2
In the second case we are able to do the time measuring in one timer cycle.
Averaging of measured results is recomme nded bu t not n eeded. The frequenc y is qui te
stable.
You can use bipolar SA555, SE555 instead of NE555 (the difference is in the operating temperature range only). Recommended values are 40k for R
CMOS TS555 you should redesign the resistor and capacitor values to match its electrical
characteristics.
(~125ns), for ex. ST7LITE @8MHz
cpu
and 100nF for C1. If you use
2
5/7
A HIGH RESOLUTION / PRECISION THERMOMETER USING ST7 AND NE555
7 CONCLUSION
With this method we are able to achieve high resolution temperature measurement. The main
advantages are the independence from variations in capacit or C
the precision of the used resistor and the NTC affects the final result.
and the supply voltage. Only
1
6/7
A HIGH RESOLUTION / PRECISION THERMOMETER USING ST7 AND NE555
“THE PRESENT NOTE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH INFORMATION
REGARDING THE IR PRO DUCT S IN OR DER FO R THEM TO SAV E TIME . AS A RES ULT, STMIC ROEL ECTR ONI CS
SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO
ANY CLAIMS ARISING FROM THE CONTENT OF SUCH A NOTE AND/OR THE USE MADE BY CUSTOMERS OF
THE INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.”
Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences
of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted
by implic ation or oth erwise unde r any patent or patent r i ghts of STMi croelectroni cs. Speci fications me ntioned in this publicat i on are subject
to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products are not
authorized for use as critical components in life su pport device s or systems without express written approval of STMicroelectronics.
The ST logo is a register ed t rademark of ST M i croelectroni c s.
All other nam es are the pro perty of their respective ow ners