Go Down

Topic: LM35 interference with LCD or light sensor (Read 2505 times) previous topic - next topic

Jun 12, 2012, 03:09 am Last Edit: Jun 12, 2012, 03:19 am by danielcugler Reason: 1
Hi,

I am using a LM35 sensor in an arduino atmega 1280. It is working properly, until I connect a LCD (12864J-4 v2.1).
Since I connect the LCD in my arduino, the LM35 sensor starts to return values that vary too much. For example, if temperature is 23 C degrees, for each second, the sensor returns values from about 20 to 25 degrees.

I've just realized that if I also connect LM35 and a light sensor in the arduino, then the LM35 also doesn't work well.

What is going wrong? Why does the sensor doesn't work after I connect the LCD or the light sensor in the arduino?

Thanks.

lax123

Well maybe same reason as here:

"Problems you may encounter with multiple sensors...


If, when adding more sensors, you find that the temperature is inconsistant, this indicates that the sensors are interfering with each other when switching the analog reading circuit from one pin to the other. You can fix this by doing two delayed readings and tossing out the first one


http://www.ladyada.net/learn/sensors/tmp36.html"

luxxtek

Do you use the 3.3 V as external reference voltage (AREF) for the analog inputs ?
I have a sketch running using 4 times LM35 and all readings are very stable.
I think you use the internal voltage as reference voltage for the ADC of the analog input and if that reference value varies (talking about milliVolts here !) with the power supply voltage when connecting an LCD or other load, your temperture readings accuracy will deteriorate.

I had this problem and using AREF solved it.


 

Hi luxxtek and lax123.

I was using 5v internal reference voltage. Your answers solved my doubt. Now I can understand the reason of my problem.
Soon I will perform a new test and then post the results here.

Thanks for your responses.

luxxtek

#4
Jun 18, 2012, 01:49 pm Last Edit: Feb 21, 2014, 12:49 pm by luxxtek Reason: 1
After experimenting with the LM35 if found out that is it rather critical to use long wires between the arduino and the sensor (more than about 3 meters)

replacing the LM35 with the LM335 solved this problem.

slightly changes the code but way more stable than a LM35 when using long wires.

Calibrate for 2.982V at 25°C at the analog input and you're finished (or any other temperature adjusting the voltage with 10mV/K)

see this temperature log based on LM335 temp sensors, refreshes every 30 seconds

http://www.caluwaerts.info/grafieken/

Good luck

Hi folks,

I have added a delay before and after the LM35 reading. The readings became more stable, but not too much. So, I changed the power supply from USB cable to an external font. Afterwards, the readings became stable.
Thank you so much for your help.

Go Up