![]() |
Help wiring potentiometer-to-Analog port
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 |
Re: Help wiring potentiometer-to-Analog port
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!
|
Re: Help wiring potentiometer-to-Analog port
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. |
Re: Help wiring potentiometer-to-Analog port
....
then in your code you would put: variable=Get_Analog_Value(<analog input pins>); |
Re: Help wiring potentiometer-to-Analog port
Quote:
|
| All times are GMT -5. The time now is 12:40. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi