Subscribe

LM35 to ADC

Posted by Circuit Labs on Thursday, November 13, 2008

Author: Uwe Reiser

030190-2ukThe circuit described here is designed to be used with the ‘LED Thermometer’ (elsewhere in this issue), but can also be used as a signal conditioner for connection to any analog-to-digital converter (ADC). The circuit is sufficiently interesting in itself that we have decided to describe it separately.

The familiar and popular LM35 temperature sensor produces an output voltage that varies by 10 mV per Kelvin over a temperature range of –55 °C to+150 °C. This is not suitable for driving an ordinary unipolar input of an analog- to-digital converter with an input range of 0 V to 5 V: we need to add an offset to the sensor voltage and then amplify it.

That covers the two main parts of the circuit diagram shown in Figure 1. The circuit is designed to allow a measurement range of –24 °C to +84 °C. Over this range, the output voltage of the sensor varies from –240 mV to +840 mV. Both these values must be shifted by a further 0.5 K (or 5 mV) to allow for an extra half a degree at either end of the range. This gives a total voltage range of 1090 mV, and hence a necessary gain of A = 5000 mV / 1090mV = 4.587. Amplification is done by IC2.B, whose gain is given by A = R7 /R6 + 1. The voltage offset is generated by IC2.A, which shifts the ground of the LM35, to which its output is referred, to a potential of 245 mV × 4.587 = 1124 mV relative to the circuit ground. Overall, this means that the voltage at the output of IC2.B is exactly 0 V at a temperature of  –24 °C and 5 V at +84 °C.

030190-2uk[3]

Figure 1 – Circuit diagram

These two formulae can be used to select component values for any desired temperature range. Calculating suitable values for the voltage divider formed by R1, P1 and R2 is straightforward. Jumper JP1 allows the circuit to be calibrated: connecting the output of the offset opamp IC2.A directly to the input of amplifier IC2.B simulates the condition of being at the lower extreme of the temperature range.

The circuit is powered from a mains adaptor with an output of 9 V to 12 V (either AC or DC). Although the current consumption is only around 50 mA, a 1 A fixed voltage regulator is used to produce a stable 5 V supply, since no heatsink is then required. The regulator directly supplies the voltage divider for IC2.A and can also provide power for a connected ADC circuit. The supply for the sensor is decoupled from the rest of the circuit by R3 and C7 to reduce interference. Diode D1 operates either as a rectifier (when an AC supply is used) or as protection against reverse polarity (when a DC supply is used). To avoid the need to use rail-to-rail opamps, diode D2 is used to lift the circuit ground to approximately 0.7 V above the IC’s negative supply.

030190-2uk[5] 030190-2uk[7]

Figure 2 – PCB layout

 

The sensor electronics can be built on the small printed circuit board shown in Figure 2. There is a single wire link, between C3 and IC2. It is worth pointing out that not only the sensor, but also all the other components, must be capable of operating over the desired temperature range. The ‘C’-suffix versions of the sensor are specified to work from –40°C to +110 °C, while the ‘D’ versions are specified to work from 0 °C to +100 °C. The overall accuracy of the thermometer is highly dependent on the precision of the components used. In particular, R6 and R7 should be as close as possible to their calculated values. The output voltage of the regulator is also important if it is used as the reference voltage for the A/D converter. Deviations from nominal values will result in an expansion or a compression of the overall temperature scale.

COMPONENT LIST

Resistors
R1 = 3kΩ9
R2 = 820Ω
R3,R4 = 100Ω
R5 = 27kΩ
R6 = 1kΩ3
R7 = 4kΩ7
R8 = 330Ω
P1 = 250Ω preset

Capacitors
C1 = 470μF 25V
C2,C5,C6,C9 = 100nF
C3,C4,C7 = 100μF, 25V
C8 = 100μF, 25V

Semiconductors
D1,D2 = 1N4002
IC1 = 7805
IC2 = TLC272
IC3 = LM35CZ

Miscellaneous
K1 = 2 solder pins
K2,JP2 = 3-way pinheader
1 Jumper

 (Elektor Electronics Magazine – 07-08/2006)



Download this article (#030190-2uk.pdf)

0 comments:

Subscribe to: Post Comments (Atom)