Go Down

Topic: Problem using more analog inputs at a time (Read 1 time) previous topic - next topic



I am trying to do this project where I read a temperature from LM35 on analog pin 0 and an electrical resistance (like a photoresistance or potentiometer) on analog pin 1 and display the values on an LCD.
Everything works fine with a tiny bit of a problem: when I change the value of the potentiometer on pin 1, the temperature changes a little. Do analog inputs influence each other? The LM35 is connected to 3V3 pin of the Arduino (do you have any idea why it displays ten Censius degrees more than normal when I connect it to 5V?). I might be using more analog pins in the future and this is annoying.

Thank you!


the LM35 likes a lot of voltages... 4V to 30V...
but not 3.3V...

can u make a painting of ur cabling?

what if u do 10 analogRead(P)-s from the same pin P with a delay(200) between each?
do the values change then?


1. If I connect the LM35 to 5V, it outputs 37 degrees C instead of 27 and so on, with 10 degrees more than normal;
2. I will draw a schematic and...
3. I will try using delay tomorrow when I'll get to the lab.

Thanks for the answer! Delaying might be the solution for my problem.


maybe u touched the sensor shortly before u read its output? :)
3.3V is definitely not within its normal parameters...

or ur Vref is lower than u think?
what formula do u use?
what program do u use?

did u try another Vref?
with analogReference(INTERNAL)?



My understanding is that there is one analog to digital convert that is switched between the 6 analog inputs. If you switch between two inputs, the second reading can contain a residual from the first, this is what you are seeing. The simplest solution is to make a dummy reading every time you switch to a new analog input i.e.

analogRead(TEMP_INPUT); // dont use this one, its the dummy
int nTemp = analogRead(TEMP_INPUT);

analogRead(POT_INPUT); // dont use this one, its the dummy
int nPotValue = analogRead(POT_INPUT);

Duane B

Read this
then watch this


Go Up