Go Down

### Topic: Using capacitor to stabilize 2-pin rotary potentiometer? (Read 1 time)previous topic - next topic

#### aetenos

##### Aug 12, 2011, 04:29 am
I am trying to use a 2-pin rotary potentiometer but there is so much noise in the signal, it is impossible to read. I have found that decoupling can help with this kind of problem, but haven't been able to figure out how to wire it effectively. I read that putting a capacitor between the input and ground helps, but this potentiometer seems to only have an input and a read pin. I have also tried placing resistors before the input and between the read pin and AnalogIn, to no avail...

So basically, how do I smooth the signal of a 2-pin pot?

Thanks!

#### Grumpy_Mike

#1
##### Aug 12, 2011, 04:46 am
First off if it only has 2 pins it is not a pot but a variable resistor. You will not get the full range out of this. Put a 1K from +5 to the analogue input, then put your variable resistor between input and ground. Finally put the capacitor from input to ground.
However I suspect you will not need a capacitor once you wire it up correctly because without that top resistor you will not get stable results.

#### aetenos

#2
##### Aug 13, 2011, 07:28 amLast Edit: Aug 13, 2011, 07:23 pm by aetenos Reason: 1
I'm still confused...I imagine 'analog input' is the destination of the current on the arduino board and 'input' is the +5? what does the current going out of the variable resistor connect to before going to analog input? I'm fresh to electronics, so it may help if I could understand it in terms of: the current goes from a to b to c....

Edit:

Ok, I put a resistor between +5 and the var res' input. Then I connected the wiper to analogIn. It only works when I also connect an LED from the wiper to ground (and, as you said, the capacitor on +5 and ground does nothing). The significance of the LED I do not understand at all. And, like you said, I do not get the full range, only about 3450-7109 (at the very end of the var res' range it just jumps rapidly haha).
> Can anything be done to get the full range? If not, I'll try to map the logarithmic output to a linear scale and see if that works....

#### Grumpy_Mike

#3
##### Aug 13, 2011, 09:13 pm
Quote
Can anything be done to get the full range?

No not with a variable resistor, you really need a pot.

Quote
I imagine 'analog input' is the destination of the current on the arduino board and 'input' is the +5?

No, input is the analogue input. You need a resistor between that and +5V.
THEN your two wire thing goes between the analogue input and the GROUND.
Finally the capacitor is wired between the two connections of your two wire thing.

Quote
The significance of the LED I do not understand at all

The LED is acting as a pull down, if you wire it as I say you will not need it.

#### justjed

#4
##### Aug 13, 2011, 11:50 pm
Does this help? What this is, is making a variable voltage divider. Any reason why you can't just use a potentiometer?

... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier

Go Up