Go Down

Topic: 10k potentiometer analog read outputs seemingly random numbers (Read 3782 times) previous topic - next topic


I am the n00bist of n00bs please excuse me if this is stupid. I have scoured forums and can't find anything.

As a stepping stone to a more complicated project, I'm trying to set up a 10k potentiometer with my UNO rev 3 as specified in the AnalogRead/serial write tutorial, which is here:


I have the two outer pins connected to +5 and GND respectively, and the wiper connected to analog 0. When I execute the code and view the serial read in the IDE, the numbers displayed jump around randomly and never stay the same for two consecutive reads. Unless there is some crazy algorithm going on, it looks like turning the knob on the pot has zero impact whatsoever on the serial read. Any suggestions? I'm at a loss. I haven't found my problem anywhere online.

Thanks a ton. And sorry if I'm being lame. Please call me out if I could have found the answer somewhere else.


Quite simply you have not wired it up like the tutorial said. It sounds like the wiper is not making contact. That is what happens when you read a pin with nothing attached. This is called a floating input.


Aug 14, 2012, 11:26 pm Last Edit: Aug 14, 2012, 11:29 pm by pito Reason: 1
jumping +/- 1 to 2 around a value is normal, try to connect a 100nF capacitor from the middle to ground, it may help..


Do you have a multimeter? Check what it says about the parts youre using.

That the values jump a bit is normal but they should increase/decrease generally if you connected it right.

Check this example out:
Generally what you need is in the middle of the page under the header:
"Reading from a Potentiometer: Analog Input Reading"


As far as a connection issue, that was my initial thought, but I don't see how that could be. I soldered 22 gauge wire to the pins on the pot and I'm having the same issue. I also tried both a 10k slide potentiometer (the one I need to use in my final project) in addition to a cheapo RadioShack pot to no avail. I also tried multiple analog inputs (changing the code appropriately, of course). The issue is persisting.

The read is jumping around a few hundred at a time, not just a couple that I could attribute to noise.

I could pick up a capacitor, but I assume it should be able to work without one at least to some extent, right?

The next step is definitely a multimeter. Mine is at home. I'll check back in when I can test that way.

Is there any way to verify that the analog inputs on my board are working without having a known-working potentiometer?


Is there any way to verify that the analog inputs on my board are working without having a known-working potentiometer?

Connect it to 5V, it should read 1023, connect to ground it should read 0.
Connect to the 3V3 pin and it should read about 675.

Go Up