Arduino UNO Analog pins acting strange

I own an Arduino UNO Rev3 and recently i have run the 'ReadAnalogVoltage' example code. Since the code has output to the serial monitor, i checked the values and it went from 2.61 all the way down to 1.5, then from there it was very slowly decreasing. I find that to be weird, because i have a 1.5V battery connected to the analog pin. Can someone tell me what's wrong, and how i can fix it? :confused:

Luxray5474: I own an Arduino UNO Rev3 and recently i have run the 'ReadAnalogVoltage' example code. Since the code has output to the serial monitor, i checked the values and it went from 2.61 all the way down to 1.5, then from there it was very slowly decreasing. I find that to be weird, because i have a 1.5V battery connected to the analog pin. Can someone tell me what's wrong, and how i can fix it? :confused:

So you've brought us the symptoms but not the patient. That makes it hard to diagnose the disease. Please show us HOW you connected that battery to the Arduino. Did you connect the grounds?

Yes ofcourse. I had the battery connected to ground. Latre on, I also tried another 1.5V battery, but got the same results. I checked both batteries with my multimeter and their voltages are nothing like indicated by the arduino.

I'm confused about what you actually did here. You mean with a 1.5V battery on the analog pin, the reading starts at 2.6 then goes to 1.5 then decreases, and during that you had 1.5V applied constantly to the pin?

edit... and you say pins plural in the title: do they all behave the same?

What type of battery ? Initial surge and resting voltage is applicable to some.

kenwood120s: I'm confused about what you actually did here. You mean with a 1.5V battery on the analog pin, the reading starts at 2.6 then goes to 1.5 then decreases, and during that you had 1.5V applied constantly to the pin?

edit... and you say pins plural in the title: do they all behave the same?

Yep. Going from 2.6 all the way to 1.5, then all the way down to 1.2 or lower. Does it on all pins.

I just grabbed an AA, measured 1.3V on my meter and used the sketch to measure it on A5 and A4. Got 1.3V consistently on both pins.

Only change was to add a delay(1000) so I could read the screen.

If I really wanted help figuring this out I would:

  1. State what type of battery
  2. Show a picture of how it is wired up.

You're still just giving us a list of symptoms without letting us see the patient.