# Help. Wiring a Potentiometer.

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

1. ### KansaiRobot Thread Starter Active Member

Jan 15, 2010
324
8
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

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:

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

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

3)
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
9.
10.
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.

Kansai

2. ### Art AAC Fanatic!

Sep 10, 2007
805
62
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
15,808
295
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
324
8
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%

http://www.dst-gmbh.de/sensors/rdc40kat.pdf

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

Kansai

5. ### BillB3857 AAC Fanatic!

Feb 28, 2009
2,491
389

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
324
8
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 AAC Fanatic!

Feb 28, 2009
2,491
389

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.