Analog Readings When Pins Open

I was trying to get my potentiometer to work when I realized I was getting weird analog input readings. So I made a test program to output multiple analog pins with 100ms between each pin reading, in a loop.

With all of the pins open and holding the arduino in the air, and for multiple arduinos (2 unos and 1 mega) I get readings on all of the pins of around 250-300.

When I connect A0 to GRND I get A0 = 0, A1 ~= 90, A2 ~= 170, A3 ~= 210, A4 ~= 250.

When I connect A1 to GRND I get A0 ~- 250, A1 = 0, A2 ~= 90, A3 ~= 170, A4 ~= 210.

When I put a wire in A1 but leave the other end of the wire open (in the air), I get A0 = 150-300, A1 = 100-700, A2 = 150-500, A3 = 170-400, A4 = 200-300

Can anyone make any sense of these readings?

FWIW, I have been unable to get the potentiometer to work = turning the knob produces no correlated change in readings.

Thanks!
-- Ben

Reading unconnected, floating, high impedance input pins will only get you floating values. The readings mean nothing until you connect something.

How is the potentiometer connected? What is its resistance value?

Maybe Arduino - Read Analog Voltage might be of help to wire the potentiometer.

Hi All,

Thanks for the quick replies!

Good to know about "floating" pins.

As for the pot, it's 10k (verified with my multimeter) and connected like https://www.arduino.cc/en/tutorial/potentiometer (outsides power/grnd and inside on analog 0). I played with both 3V and 5V. Voltage wise, the power source seemed stable according to my multimeter.