Potentiometer Theory

I just want to make sure I get the basic theory correct. Inside a linear taper potentiomter, the circuit looks like this:

|--------------------- <- 5 V, I Amps
|
/
\ Unknown length X
/ Wiper
---------------------- -> Analog Input V, I1
/ Total length Xt
\ Resistor
/ Total resistance Rt
\
|
|---------------------- -> Ground, Voltage Vg, I2
Effective Resistance R = (X/Xt) * Rt
Analog Input V = I * R
Vg = 5 - V (???)
Do I have it right so far? And if I do, does anyone know the currents I1 and I2?

The current out the wiper is essentially zero.

The current through the pot is 5V/100,000Ohms = 0.00005 amps = 50 microAmps = 0.05 milliAmps

The voltage Vg is zero because that is what the “g” is supposed to stand for “ground.”

The wiper lead is going to a high impedance input to an ADC (Analog to Digital Converter). This is what turns the 0-5V to the 0-255 number that you use in your Pbasic code.

Hope this helps.

Joe J.

Ok, I understand now how Vg = 0(I have a sophomoric understanding of circuits). But… what is I1 and I2? It’s Kirchoff’s loop rule or something. I’m just curious.

*Originally posted by Ulibrium *
**Ok, I understand now how Vg = 0(I have a sophomoric understanding of circuits). But… what is I1 and I2? It’s Kirchoff’s loop rule or something. I’m just curious. **

Just follow the circuit (electrical flow, not physical): The electrons ome from +5V and go through the first part of the poti. Then they are at a “junction”: they can go either through the connected circuit, in this case the analog input of the controller, or through the second part of the poti to ground. This way you get two different currents: I1 through the controller and I2 to ground. Because of the knot rule, they add up to the current that enters the circuit, I. Thus, I1 + I2 = I.
You get the different voltages because of Ohm’s Law. Look at the resistance in the upper part (X) as R1 and the resistance in the lower part (1/( (1/(R-X)) + (1/R_controller) )) as R2 (because R_controller is pretty high, 1/R_controller is about 0 and thus, R2 is about R-X). Because the same current flows through both resistors (no knots), you can calculate the voltages over the top and the bottom part via Ohm’s Law, U = R * I. This way you get U1 = R1 * I, U2 = R2 * I. Now, solving for I you get U1 / R1 = I = U2 / R2. Multiplying by R1 / U2 you get U1 / U2 = R1 / R2. Because R1 equals X and R2 equals approximately (R - X), you get (approximately):


U2   R2       U2     X                     X
-- = --  <=> ---- = ---  <=>  U2 = (U-U2)*----  <=>
U1   R1      U-U2   R-X                   R-X


        X        X           /     X  \       X
U2 = U*--- - U2*---  <=> U2*( 1 + ---  ) = U*---  <=>
       R-X      R-X          \    R-X /      R-X


    / R-X    X  \       X            R       X
U2*(  --- + ---  ) = U*---  <=>  U2*--- = U*---  <=>
    \ R-X   R-X /      R-X          R-X     R-X


       X
U2 = U*-
       R

I would advise you to verify that, but that is what I remembered from Physics; I hope I didn’t make a mistake. I hope that helps you a bit.

I completely forgot two things:
1.) Unlike you, I refer with “X” to the resistance of the upper part of the poti, not the length and to the total resistance not as Rt but as R
2.) Because R=sl/A where s is the specific resistant (constant for same material), l the length of the piece and A its area, ad because A and s are constant within the poti, you get R ~ l. Let’s define a constant c so that R = cl. Now R_total=cl_total and X=cl_X, so that


            X            c * l_X           l_X
U2 = U * ------- = U * ----------- = U * -------
         R_total       c * l_total       l_total

and thus, the voltage over the controller behaves to the total voltage as the length of the poti section parallel to the poti to the total length of the poti.

P.S.: poti should mean potentiometer

Ok, I get it pretty much now. Basically, the Robot Controller is a fancy voltmeter hooked up in a parallel to the post-wiper section of the resistor. Just one more question… which end produces a 0 V value and which end produces a 5 V one? I believe the analog input voltage tapers off as I move the wiper from the positive end to the ground… am I correct?

If you want your numbers to go from 0-255 put 5V one way. If you want your numbers to go the other way 255-0 put your 5V the other way.

You get to pick.

I try to make my pots run a way that makes sense for me. If I am wiring a motor that turns that pot (through a drive train of course), then I try to have 254 (full forward on the motor) tend to move the pot in the direction of 255 on the pot. This makes sense to me, higher motor outputs makes for higher pot values – it is very nice for feedback loops as well.

Joe J.