Pages: [1]   Go Down
Author Topic: Potentiometer reading question  (Read 459 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 29
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I am making a motor controller with an arduino and using the pot as the throttle reading.  Quick question that is confusing me.  So ideally I want to read between 0 to max resistance and map that to the PWM out of another pin.  So ideally I should use a pull down resistor on the pot input signal to keep it low if for some reason the pot is disconnected.  For an example lets use an 10K pot.  It should be hooked up as follows.

5V--------Pot---------Gnd
               |
               -----Resistor----GND
               |
             Analog in

Would this work or am I just setting a new lower limit for the analog in value?  What should the proper way be to use a pull down resistor for a pot?  What is the resistance for the pull down resistor?

Please let me know when you get a moment.  I always think I have it then I just confuse myself.
Logged

Offline Offline
Sr. Member
****
Karma: 6
Posts: 427
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://sound.westhost.com/pots.htm

Scroll down to "Changing the Law of a Pot" at the bottom of the page.
Logged

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11672
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If the pot is say 5K and the safety resistor is 1M it will minimum disruption of the linearity...  However it won't protect you as much as you think - if the ground side of the pot becomes open circuit the wiper will jump to 5V and you don't want this.

You have to add a fault-detection circuit.  For instance say the pot is 5k, you connect the positive end of the track to 5V via a 1k resistor.  That junction is fed to another analog pin which you always read to check its at 4.16V - if either end of the pot track goes open circuit this junction will jump to 5V.  If the +ve end of the track is shorted to ground you'll see that immediately.  Combine this with a 1M resistor (and probably a 100nF cap) on the wiper pin you'll have a pretty robust fault-detection set-up.
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: