Pages: [1]   Go Down
Author Topic: Do I need a resistor for a 50k potentiometer?  (Read 2328 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's my question, may be stupid but humor me......

My entire goal for workng with Arduino is to control servos using potentiometers.  So far so good no problems but I had one question.

If I am using a 50k potentiometer, do I need to use a resistor to interface with the servo?

Thanks in advance.
Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Servos don't need a resistor; you can connect the servo signal line directly to an Arduino pin.

50k potentiometers will work but the datasheet recommends 10k or 20k for best performance.
Logged

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

Thanks for the response.  Can you give me a quick explanation as to why 10-20k works better than the 50?

Thanks
Logged

Bristol, UK
Offline Offline
Edison Member
*
Karma: 1
Posts: 1197
Exhibitor at UK Maker Faire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There's a very small, but non-zero, current drawn from the pot by the analog input pin.  This small current ca affect the accuracy of the readings, and more so for higher resistance pots (think about Ohm's Law).  But it's a very small effect, so you may not find it a problem.

You don't need a fixed resistor if you want to connect pot(s) to an Arduino's analog input(s).  Wire the track of the pot from 5V to Ground, and connect the wiper to the analog input pin.
Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The analog to digital converter uses a capacitor to 'sample and hold' the input voltage to ensure it is stable while it is being measured. The circuit is optimized for 10k (or less) and higher values take longer to charge the sample and hold capacitor. I would expect that your project would work fine with the 50k pots but if you have not yet purchased them, 10k would be the optimal choice.
« Last Edit: May 18, 2009, 07:02:47 am by mem » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
scratch an apple
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone Im having trouble with a project. Can i connect a potentiometer (any kind?) in digital in(s)?
I dont have more analog pins available for what Im working.

I hope you can help me

Thanks!
Logged

B0100111001000011, USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1503
I'm confused.  Wait, maybe not..
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Hi everyone Im having trouble with a project. Can i connect a potentiometer (any kind?) in digital in(s)?

No.  Digital pins read only HIGH or LOW (1 or 0).  They cannot read the variation of 0-1023 that you get with analog pins.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
scratch an apple
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your help!! I'll save an analog pin for the pot.

And is it possible get a pulse (0 or 1)  in an analog pin?
I mean to connect a button in an pin.

Thanks!
Logged

B0100111001000011, USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1503
I'm confused.  Wait, maybe not..
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
And is it possible get a pulse (0 or 1)  in an analog pin?
I mean to connect a button in an pin.

Do you mean use an analog pin for digital reading?  I'm not sure if you can call digitalRead() on those pins, but you could analogRead() and check to see if the value is greater than 100 or so (using a pull down resistor).
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
scratch an apple
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is 1 Kohm ok?

Do u mean Like this but going to an analog in? Is there any risk of doing it?



Im very new at programing, Im controlling a patch I made in Max and if that's  possible  I can use more buttons and have more fun!

Thanks for your help  
Logged

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

Quote
'm not sure if you can call digitalRead() on those pins,

Yes you can. If you refer to the pins as pin 14 for analogue 0, pin 15 for analogue 1 and so on.
Then they act just like the digital pins.
Logged

Pages: [1]   Go Up
Jump to: