Log in

View Full Version : Help wiring potentiometer-to-Analog port


kylehager
17-01-2008, 04:57
I picked up a 10k pot cheap at an electronics shop (for testing only) and am trying to connect it to the Analog port. The pot is a slider-style and has no markings on it. If anyone can help me figure out how to wire it I would be very appreciative.

There are 3 posts on this slider.
On one end there is a silver post (call it "A")
On the other end there is a silver post (say "B") and a gold post (call it "C").

Kind of like this (I'll try to "draw" it - pretend the dashes aren't there and that's space between the legs)

|----------------------------|-------|
|----------------------------|-------|
A--------------------------- C-------B
slvr------------------------gold-----slvr


A and B are on one side ("front" as pictured above) and C is on the other side ("back").

When I put a meter from A to B I get about 10k ohms regardless of the position of the handle.
When I put a meter from A to C I get close to 0 ohms when the handle is on the left and nearly 10k ohms when the handle is on the right (and about 5k ohms when it's in the middle)
When I put a meter from C to B I get nearly 10k ohms when the handle is on the left and close to zero ohms when the handle is on the right (just the opposite of the A to C measurement)

The way I read the diagram I should wire A & B to Red & Black (+5V & Ground) and wire C to White. Switching A & B around will only change which end of the pot gives me +5V vs. 0V. Is this right?

Can anyone verify or correct this?

Thanks

windell747
17-01-2008, 06:04
Hi, This potentiometer acts as a variable voltage divider. So if A=0V and B=5V then if the slider is nearest A then C will give a reading near 0V. If the slider is nearest B then C will give a reading near 5V. If the polarities were switched such that A=5V and B=0V then C will give 5V when it is nearest A and 0V whereas it would read 5V if it is nearest B. Of course anywhere in between you will get a reading at C between 0V and 5V. Hope this helps!

Al Skierkiewicz
17-01-2008, 07:57
As Windell has pointed out, the wiper or the moving contact is labeled C. Depending on how you connect to A & B will determine if the voltage goes from 0 to 5 or from 5 to 0 as you move the handle. The diagram you need to follow of course, is the IFI RC Ref Guide which can be found on the IFI website.
In referring to the section of the RC ref guide, p. 8, terminal C would go the analog input at the top and terminals A & B would go to the +5 and ground pins using a PWM cable connected to the one of the analog inputs.

tseres
17-01-2008, 08:20
....
then in your code you would put:

variable=Get_Analog_Value(<analog input pins>);

mneary
17-01-2008, 17:28
Can anyone verify or correct this?You are correct.