Arduino / Love-O-Meter : wrong temperature read when LEDs are on

by Vinz   Last Updated August 13, 2019 20:25 PM - source

I tried the Love-O-Meter example given in the Startup kit of Arduino. The example is available here. The temperature sensor is the TMP36 given with the kit.

If the three LEDs are off (e.g. when writing LOW in the code, comment the corresponding lines or unplug them), there is no problem: the real temperature in the room is given and the sensor gives a value around 150.

However, if one or more LEDs are on, then the temperature increases to around 10°C for each LED (the sensor gives 215 when the three LEDS are on).

The conversion from the sensor value to the temperature works well. Also, I measure a correct voltage by using a multimeter.

Any idea?

Tags : arduino sensor

Answers 1

Run a separate ground connection for the temperature sensor.

The way it is shown in the picture of the link, The LEDs are sharing the ground connection, and this is causing a slight ground reference shift (voltage drop), which is causing the output voltage to be shifted with respect to the A2D ground reference.

August 13, 2019 19:54 PM

Related Questions

Termite detection using radar system

Updated December 24, 2018 05:25 AM

Repurposing/Reusing camera modules from smartphones

Updated September 20, 2017 23:25 PM