Pages: [1]   Go Down
Author Topic: Using capacitor to stabilize 2-pin rotary potentiometer?  (Read 772 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 505
Posts: 31343
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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....
« Last Edit: August 13, 2011, 12:23:20 pm by aetenos » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 505
Posts: 31343
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

CO, USA
Offline Offline
God Member
*****
Karma: 4
Posts: 710
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does this help? What this is, is making a variable voltage divider. Any reason why you can't just use a potentiometer?



* var_r_div.jpg (21.37 KB, 559x427 - viewed 13 times.)
Logged

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

Pages: [1]   Go Up
Jump to: