Lm35 output differs while changing the power

arduino

For room temperature 21*C LM35 showing,

  1. 23 *C while powered by CPU USB port.
  2. 18 *C While powered by a 7amph
    12V SLA.

My controller consist of Arduino, adruino wifi shild, and ATMEGA32. ATMEGA32 is attached to the 4 redundant lm35. regulated 5V and GND Power rail are interconnected for all controller.

a. The lm35 are designed as unit gain and double gain by a LM324.
b. AREF of ATMEGA32 are controlled by a LM4040.
enter image description here

enter image description here


I want to share some of my observation:

  1. If I do another Analogue read on ground as the same manner That I do for data,
    e.g. For this observation I an using gain=3 for both data and ground, and taking the difference, the result become far better.
  2. When the power is only Battery and no connection with CPU/AC Main line, there is no apparent disturbance on the output.
  3. In the given figure the room temperature are noted for around,

    a. 1 Hr for Battery and

    b. 45 min for USB USB power. Data are communicated over USB serial cable.

enter image description here

Best Answer

It seems as though you're running both the 5V USB and 12V battery through the same linear regulator. Since 5V doesn't have enough excess voltage to regulate to...5V, it is being dropped to 4.5V (per comments in question)

I suspect that you are seeing a change in the ADC reference voltage (AVCC or AREF) that causes the absolute output of the temperature sensor to be interpreted differently.

You should either make better provisions for creating a stable reference voltage, or use the internal 2.56 reference of the ATMega32.