LM335 with peltier element - unstable measurement


I use an LM335 to control the temperature of a peltier element. I used thermally conductive paste to pin the LM335 onto the peltier element. I calibrate the sensor with a potentiometer via the adj Pin. So far so good.

I thought I could take quite exact measurements but the sensor seems to deliver quite random values - sometimes ranging from +/- 3 degrees from the actual temperature. (??) How can I get an exact measurement of the temperature? Or should I use another TempSensor?

... the wires to connect the sensor are about 10 cm long.

Thanks for your help!

can you post your code? you might need to average multiple readings to get rid of noise, what do you use to power the system? When the peltier heats up you might get a small power drop which influences the analog read.

  1. Have you connected the ground side of the LM335 to a dedicated ground pin on the Arduino? You should not share that ground pin with anything else, except other analog sensors.

  2. Are you powering the Arduino from USB and using the default +5V analog reference? USB power is not stable, and if used as the voltage reference it will cause fluctuations in the analog readings. You can use the 3.3V pin as the analog reference instead (as long as your LM335 temperature won't go above 330degK).

Could be a swing problem of the LM35. I had the same once and wrote a post in my blog about this. If interested, look at:


Thanks very much guys for your recommendations! I wrote a small smoothing algorithm that takes the average of 15 values and now it seems to be quite stable.

Good to hear, from performance point of view you might better take 8 or 16 samples to average as dividing by a power of 2 is much faster (bitshift) than dividing by 15.

I would give 8 samples a try.

The fact that you had +/-3 variations in count originally indicates that there are noise, grounding or power supply issues affecting the readings. These effects won't necessarily always average out over a number of multiple readings.