Log in

View Full Version : Potentiometer issues


nathanww
06-02-2010, 16:56
Our team was trying to wire up a potentiometer to our control system so that we can use it to control the force of our kicking mechanism. The problem we're having is in reading the value from the potentiometer--we are reading the value using the GetValue method of AnalogChannel, but instead of registering a static value, the value continually either climbs up or climbs down. We're resetting the accumulator on the channel after each read that we do, so we know that it's just that we're reading an accumulated value. We've had problems simil;ar to this in the past, and I vaguely suspect that it is related to the wiring of the pot. Has anyone had this problem or know how to resolve it?

360skier
06-02-2010, 18:35
I believe accumulators are only present on the first 2 channels of Analog Module 1. So if you plug in to channel 3 it should work. Also something you may want to consider is setting up the averaging engine, as it will allow you to get the calibrated voltage from the analog input. I'd recommend having a look at the gyro source code

I know we've been using potentiometer-like sensors on the analog breakout and they've worked fine.

nathanww
07-02-2010, 01:48
We tried moving it to Analog 3, and it still just counts up. incidentally, it exhibits the same behavior when unplugged, and we've tested all possible permutations of pot wiring and gotten the same result.

Al Skierkiewicz
07-02-2010, 10:37
Nathan,
If you wire the pot so that one outside terminal is connected to five volts and the other outside terminal is connected to zero volts, then the wiper will vary between almost 5 volts and zero volts as the pot moves through it's rotation.

Joe Ross
07-02-2010, 14:17
We tried moving it to Analog 3, and it still just counts up. incidentally, it exhibits the same behavior when unplugged, and we've tested all possible permutations of pot wiring and gotten the same result.

If you really did test all possible permutations of pot wiring, you probably shorted power and ground at some point. I wouldn't be surprised if either the pot or the analog breakout are damaged.

Do you have an electrical mentor who can check your wiring? There's only so much that descriptions from the Internet can help in this situation.