Saturday, April 6, 2013

LM35 for Precision Centigrade Temperature Sensors



The LM35 series that is used in this project is a precision centigrade temperature sensor, which has an analog output voltage. It has a range of -55ºC to +150ºC and an accuracy of ±0.5ºC. The output voltage is 10mV/ºC. The output voltage is converted by the AD convertor of the AT Mega8. The temperature is displayed on an LCD module. In this example the thermometer has a range of 0ºC to 40ºC and a resolution of 0.5ºC. If you want to have a read out in Fahrenheit you can use the LM34.



The BASCOM AVR compiler has build in commands for reading out the ADC port of an AVR microcontroller. The result is displayed on a LCD module in a discrete value of the temperature and in a bar-graph. The AT Mega8 has a A/D converter which can give an output of 210 = 1024 discrete values. When a 5V supply is used you have a resolution of 5000mV/1024 = 4.8mV. Because the LM35 has an output of 10mV/C the resolution of the thermometer is 10mV/4.8mV ~ 0.5ºC. The LCD module has 20 columns. In the scale of 0ºC to 40ºC every column represents 2ºC.



The LM35 can be applied easily in the same way as other integrated-circuit temperature sensors. It can be glued or cemented to a surface and its temperature will be within about 0.01°C of the surface temperature. This presumes that the ambient air temperature is almost the same as the surface temperature; if the air temperature were much higher or lower than the surface temperature, the actual temperature of the LM35 die would be at an intermediate temperature between the surface temperature and the air temperature. This is especially true for the TO-92 plastic package, where the copper leads are the principal thermal path to carry heat into the device, so its temperature might be closer to the air temperature than to the surface temperature.

To minimize this problem, be sure that the wiring to the LM35, as it leaves the device, is held at the same temperature as the surface of interest. The easiest way to do this is to cover up these wires with a bead of epoxy which will insure that the leads and wires are all at the same temperature as the surface, and that the LM35 die’s temperature will not be affected by the air temperature.



The TO-46 metal package can also be soldered to a metal surface or pipe without damage. Of course, in that case the V− terminal of the circuit will be grounded to that metal. Alternatively, the LM35 can be mounted inside a sealed-end metal tube, and can then be dipped into a bath or screwed into a threaded hole in a tank. As with any IC, the LM35 and accompanying wiring and circuits must be kept insulated and dry, to avoid leakage and corrosion. This is especially true if the circuit may operate at cold temperatures where condensation can occur. Printed-circuit coatings and varnishes such as Humiseal and epoxy paints or dips are often used to insure that moisture cannot corrode the LM35 or its connections. These devices are sometimes soldered to a small light-weight heat fin, to decrease the thermal time constant and speed up the response in slowly-moving air. On the other hand, a small thermal mass may be added to the sensor, to give the steadiest reading despite small deviations in the air temperature.