Resistance Range for Arduino?

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
jdoscher
 
Posts: 124
Joined: Tue Jul 22, 2008 12:36 pm

Resistance Range for Arduino?

Post by jdoscher »

I've got a linear actuator that has a built in pot for position sensing. For reasons not relevant I need to connect this to the Arduino and measure the resistance there. Using a multimeter I see the low end of the resistance of the pot is 456 ohms, and the upper range is 8.72 kohms. I need about 100 different steps of position in this range. Can I connect this directly to the Arduino, or is there a circuit that is required?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Resistance Range for Arduino?

Post by adafruit_support_bill »

the low end of the resistance of the pot is 456 ohms, and the upper range is 8.72 kohms.
Connect one end to +5 and the other end to GND. Then connect the middle 'wiper' pin to the analog input.
analogRead() will give you a number between 0 and 1024. You can use the 'map()' function to map that to whatever range you need. http://www.arduino.cc/es/Reference/Map

jdoscher
 
Posts: 124
Joined: Tue Jul 22, 2008 12:36 pm

Re: Resistance Range for Arduino?

Post by jdoscher »

adafruit_support wrote:
the low end of the resistance of the pot is 456 ohms, and the upper range is 8.72 kohms.
Connect one end to +5 and the other end to GND. Then connect the middle 'wiper' pin to the analog input.
analogRead() will give you a number between 0 and 1024. You can use the 'map()' function to map that to whatever range you need. http://www.arduino.cc/es/Reference/Map
That's awesome- it works great. Thanks!

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”