Help. Wiring a Potentiometer.

Discussion in 'The Projects Forum' started by KansaiRobot, Jan 15, 2010.

  1. KansaiRobot

    Thread Starter Active Member

    Jan 15, 2010
    Hello. This is my first Post.
    Although I have experience programming, I have almost zero experience with circuits and electronics so any help will be greatly appreciated. Please bear in mind that I am not sure of even the basics [​IMG]

    Anyway, I have been asked to build a new project that has three components: A potentiometer, A microcontroller, and an actuator. I would like to concentrate first on the first: The potentiometer

    I know the theory behind so I would really like to ask about how to wire the potentiometer

    first I thought something very simple:

    Code ( (Unknown Language)):
    1.  Battery(5v)---------3[ Pot   ]1---------Ground
    2.                             2|__________________________ to the A/D
    but then I read somewhere that I will need a "capacitor" (I have no idea what these are for)

    Code ( (Unknown Language)):
    1. Battery(5v)------------------------3[ Pot   ]1---------Ground
    2.                        |               2|__________________________ to the A/D
    3.                        |
    4.                        |
    5.                        |__________________| Capacitor(0.1µF)|-------------Ground
    And then I read the docs on the pot that says:
    and they draw the following

    Code ( (Unknown Language)):
    1. Battery(5v)----------------3[ Pot(R1)   ]1---------Ground
    2.                                    2|
    3.                                     |_____[R2]-----Ground
    4.                                     |                        
    5.                                     |
    6.                                     |_____|capacitor|----Ground
    7.                                     |
    8.                                     |__________________________ to the A/D
    Now they dont even put the values of this R2 and capacitor....I am very confused.

    Can someone teach or point me please to the simplest way to attach a potentiometer to a battery and use the connection 2 as an input to the A/D of the microcontroller.

    Any help will be greatly appreciated.

    Thanks in advance

  2. Art

    Distinguished Member

    Sep 10, 2007
    You don't need an ADC input if you use a resistor and capacitor.
    You can use a digital input this way by timing the discharge of the capacitor through the resistor like your figure 3,
    but the cap would be grounded and the pin input to the pot.

    For your figure 2, I think the cap is used to stabilise the voltage before you use the ADC to take the reading.
  3. beenthere

    Retired Moderator

    Apr 20, 2004
    We are missing important information - does the actuator move under the direct control of the potentiometer?

    If that is the case, and the control is continuous, then the capacitor off the wiper to ground is there as a low impedance path to ground to eliminate electrical noise created by moving the wiper. The idea is to smooth the signal into the A to D converter, and make the actuator motion less jerky.

    The value of the capacitor is a guess, as the value of the pot and the input impedance of the A to D is unknown. If both are very high, then a value as small as 1000 pF may be adequate. As it is unknown, then a capacitance of .1 uF is a better choice. Larger values may work perfectly well, but cause control response to lag.

    R2's utility is questionable. If the voltage source is such that the wiper can't go above the limit for the A to D, then one major effect will be to lower the maximum voltage to the A to D input. That will prevent the actuator from reaching it's maximum extension.
    KansaiRobot likes this.
  4. KansaiRobot

    Thread Starter Active Member

    Jan 15, 2010
    Thank you very much for the replies.
    I guess I will be using a cap then.

    by the way the specs of the pot are

    Voltage 5V
    torque 2mN.m max
    resistance 10kΩ
    resistance tolerance ±30%

    by the way, I will post a second question. If you guys can take a look it will be much appreciated

  5. BillB3857

    Senior Member

    Feb 28, 2009

    As long as the pot has the ability to reach full stroke or rotation, the max voltage to the A/D input will be the full 5V. R2 will, however upset any linearity the pot may have. In order to reduce the max to the A/D input, another resistor would be needed between the wiper of the pot and the junction of R2, the cap, and the A/D input.

    R2 would, however provide a DC path to ground in the even that the wiper of the pot should loose continuity to the resistance element forcing the output to zero.
    KansaiRobot likes this.
  6. KansaiRobot

    Thread Starter Active Member

    Jan 15, 2010
    In the literature of the Pot, it says that it contains a internal "contact Resistance R1", that is set to a high level "because its output is designed to directly connect to the A/D port of the micro"

    so they recommend to use a "connection impedance" R2 of at least 1M ohm to eliminate the influence of R1.

    Can someone explain me this??
  7. BillB3857

    Senior Member

    Feb 28, 2009

    By setting R2 to a very high value as compared to R1, the alteration of linearity will be minimized while still maintaining the ground reference in the event the wiper of the pot becomes open to the internal resistance element.