Potentiometer Help!

Hi,
We have a potentiometer wired to p3_x (port 3, x value) on the OI. It is a 100K Ohms, 3/4 turn POt; Used mostly in audio systems. We have wires connected to the middle and one of the outside terminals on the POT. We were getting a range of 231-254 at first, however after our programmers did some bitshifting on the values we had a range of 112-228, however we noticed that the numbers are jumping by 4. Meaning the values go 112,116,120 e.t.c. Is there a way to obtain more resolution from these POTS.

My second question is how do i wire the POT to the RC and if it will be able to work with the GYRO and Navigation Code ( I heard that the Nav code only allows analog input from the gyro). Any help will be much appreciated.

Audio systems selom use a linear taper pot…

One thing that you should be aware of is that the Operator Interface analog inputs give you 8 bits while the Robot Controllers give you 10 bits of data.

This difference is extremely important when you deal with things like potentiometers. If you were using a joystick to make an arm go to a specific pot angle, then you should multiply the OI’s value by 4 to get 10 bits.

This made our arm go haywire last year at regionals and set us back a lot as my team members debugged the problem, and eventually it was just completely disabled.

I’m not sure why they would have such a small range. Perhaps they are not rotating their full range. I have no clue what could be wrong.

To wire the pot to the RC, I would assume that you take input power from the 5V center pin, ground from the black pin closest to the edge, and the output data to the pin closest to the middle labeled white/yellow. You could probably just use a PWM cable and soldier the pots to the leads at the end to get a nice connector.

[quote=thoughtful]Hi,
We have a potentiometer wired to p3_x (port 3, x value) on the OI. It is a 100K Ohms, 3/4 turn POt; Used mostly in audio systems. We have wires connected to the middle and one of the outside terminals on the POT. We were getting a range of 231-254 at first, however after our programmers did some bitshifting on the values we had a range of 112-228, however we noticed that the numbers are jumping by 4. Meaning the values go 112,116,120 e.t.c. Is there a way to obtain more resolution from these POTS.

QUOTE]
Bit shifting is causing your pot to jump by fours. A single Bit shift results in either a multiply or divide by 2 of the original value. In your case the programmers bit shifted twice to give you a factor of four. The 112 was originally 112/4 or 1124. The 116 was originally 116/4 or 1164, etc.

It is my understanding that audio systems potentiometers are typically
non-linear (tapered) and you will have much more success by purchasing
a single-turn, linear pot from Digikey or mouser.com.[/quote]

It is easy enough. In programming you enter
pot= (unsigned char) (Get_Analog_Value(rc_ana_01) >> 2);

Something like that. The >>2 reduces it to a 8-bit. It is even there in last years programming manual.

-Bharat