NEW DATABASE - 350 MILLION DATASHEETS FROM 8500 MANUFACTURERS
AN1755 NE555 AN1755/0304 ST72264 SA555 SE555 TS555 - Datasheet Archive
APPLICATION NOTE A HIGH RESOLUTION / PRECISION THERMOMETER USING ST7 AND NE555 INTRODUCTION The goal of this application note is
AN1755 AN1755 APPLICATION NOTE A HIGH RESOLUTION / PRECISION THERMOMETER USING ST7 AND NE555 NE555 INTRODUCTION The goal of this application note is to present a realistic example of a thermometer using an ST7 and an NE555 NE555. The NE555 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 NE555 output is connected to the timer input capture pin. Rev. 1.0 AN1755/0304 AN1755/0304 1/7 1 A HIGH RESOLUTION / PRECISION THERMOMETER USING ST7 AND NE555 NE555 1 DESCRIPTION OF NE555 NE555 The NE555 NE555 monolithic timing circuit is a highly stable controller 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. For a stable operation as an oscillator, the free running frequency and the duty cycle are both accurately controlled with two external resistors and one capacitor. For more details see NE555 NE555 datasheet. 2 ASTABLE OPERATION The circuit is shown in Figure 1. (pin 2 and 6 connected). It triggers itself and operates as a free running multi vibrator. The external capacitor charges through R1 and R2 and discharges through R2. Thus the duty cycle is precisely set by the ratio of these two resistors. In the astable mode of operation, C1 charges and discharges between 1/3 V CC and 2/3 VCC. Due to the self-triggered mode, the charge and discharge times and therefore frequency are independent of the supply voltage. Figure 1. Circuit Diagram of NE555 NE555 in a-stable mode VCC+ = 5V R1 4 Output 8 7 3 R2 NE555 NE555 Control Voltage 6 5 0.01µF 1 The charge time (output HIGH) is given by (1) t1 = 0.693 (R1 + R2) C1 and the discharge time (output LOW) by (2) t2 = 0.693 (R2) C1 Thus the total period T is given by (3) 2/7 2 T = t1 + t2 = 0.693 (R1 + 2R2) C1 2 C1 A HIGH RESOLUTION / PRECISION THERMOMETER USING ST7 AND NE555 NE555 Figure 2. NE555 NE555 Timing Diagram output t1 t2 voltage on C1 3 THEORY OF OPERATION - NE555 NE555 In general we can use the Rntc in place of R1 as well as in place of R2. We assume Rntc in place of R1. The times needed to charge (1) and to discharge (2) the capacitor will be (4) (5) t1 = 0.693 (Rntc + R2) C1 t2 = 0.693 (R2) C1 The result of the measurement should be dependent on the value of Rntc only. For that R2 and C1 should not vary with temperature or age. That is why the capacitor C1 is to be eliminated from the equations.The periods t1 and t2 are measured with the ST7 timer. From formula (4) and (5) we can calculate two variables. Expressing C1 from (5) and putting it in (4) we obtain (6) Rntc = R2 (t1-t2) / t2 The result depends on the precision of the time measuring (t1, t2) and tolerance of R2 only. It depends neither on C1 nor the supply voltage. 4 THEORY OF OPERATION - 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 calculate equation (6) we can use multiples of 125ns for simplicity. 3/7 A HIGH RESOLUTION / PRECISION THERMOMETER USING ST7 AND NE555 NE555 5 DESIGN To design our circuit, we need to choose the right values of R 2 and C1. These two values determine the frequency of the output signal (3). For the given temperature range (0 - 40 °C) and a 10K NTC resistor, the chosen values are 40k for R2 and 100nF for C1. Table 1. Table of theoretical values of designed thermometer Temperature (°C) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 4/7 Rntc () t1 (ms) t2 (ms) t1 (tics) t2 (tics) t1 (tics) 27279 26134 25043 24003 23012 22067 21166 20306 19486 18703 17956 17243 16561 15910 15288 14694 14126 13582 13063 12565 12090 11635 11199 10782 10382 10000 9633 9282 8945 8622 8312 8016 7731 7458 7195 4,662 4,583 4,507 4,435 4,367 4,301 4,239 4,179 4,122 4,068 4,016 3,967 3,920 3,875 3,831 3,790 3,751 3,713 3,677 3,643 3,610 3,578 3,548 3,519 3,491 3,465 3,440 3,415 3,392 3,370 3,348 3,328 3,308 3,289 3,271 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 2,772 37299 36665 36060 35483 34934 34410 33910 33434 32979 32545 32131 31736 31357 30997 30652 30322 30007 29706 29418 29142 28879 28626 28385 28154 27932 27720 27517 27322 27135 26956 26784 26620 26462 26311 26165 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 22176 635 605 577 549 524 500 477 455 434 414 395 378 361 345 329 315 302 288 276 263 252 242 231 222 212 203 195 187 179 172 164 158 151 146 139 A HIGH RESOLUTION / PRECISION THERMOMETER USING ST7 AND NE555 NE555 Temperature (°C) 35 36 37 38 39 40 Rntc () t1 (ms) t2 (ms) t1 (tics) t2 (tics) t1 (tics) 6944 6702 6470 6247 6033 5827 3,253 3,236 3,220 3,205 3,190 3,176 2,772 2,772 2,772 2,772 2,772 2,772 26026 25892 25763 25639 25521 25406 22176 22176 22176 22176 22176 22176 134 129 124 119 114 Table 2. Parameters and their meanings Parameter Rntc () t1, t2 (ms) Comments Value of 10K NTC-Resistor at particular temperature Example: R ntc (25 °C) = 10K Values of the time corresponding to measured temperature, please refer to equations (4), (5). Example: t1 (25°C) = 0.693 * (10 k + 40 k) * 100nF = 3.465 ms t2 (25°C) = 0.693 * 40 k * 100nF = 2.772 ms Values of the time in 125ns timer tics (@8 MHz) Example: t1, t2 (tics) t1 (25°C) = 3.465 ms / 125 ns = 27720 tics t2 (25°C) = 2.772 ms / 125 ns = 22176 tics t1 (tics) 1 tic = Time period of timer Represents achieved resolution. It's the difference of the values per one degree Celsius t1 = t1(n) - t1(n+1). Example: t1 (25°C) = t1 (25°C) - t1 (26°C) = 27720 - 27517 = 203 tics 6 PRACTICAL ISSUES It is possible to implement this algorithm with any ST7 family micro (2K of program memory is required). In general you can choose: s 12-bit autoreload timer allowing configuration to fcpu (~125ns), for ex. ST7LITE @8MHz s 16-bit timer allowing configuration to fcpu/2 (~250ns), for ex. ST72264 ST72264 @8MHz In the second case we are able to do the time measuring in one timer cycle. Averaging of measured results is recommended but not needed. The frequency is quite stable. You can use bipolar SA555 SA555, SE555 SE555 instead of NE555 NE555 (the difference is in the operating temperature range only). Recommended values are 40k for R 2 and 100nF for C 1 . If you use CMOS TS555 TS555 you should redesign the resistor and capacitor values to match its electrical characteristics. 5/7 A HIGH RESOLUTION / PRECISION THERMOMETER USING ST7 AND NE555 NE555 7 CONCLUSION With this method we are able to achieve high resolution temperature measurement. The main advantages are the independence from variations in capacitor C1 and the supply voltage. Only the precision of the used resistor and the NTC affects the final result. 6/7 A HIGH RESOLUTION / PRECISION THERMOMETER USING ST7 AND NE555 NE555 "THE PRESENT NOTE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS 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 implication or otherwise under any patent or patent rights of STMicroelectronics. Specifications mentioned in this publication 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 support devices or systems without express written approval of STMicroelectronics. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners © 2004 STMicroelectronics - All rights reserved STMicroelectronics GROUP OF COMPANIES Australia Belgium - Brazil - Canada - China Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States www.st.com 7/7