Resistance Range for Arduino?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 124
- Joined: Tue Jul 22, 2008 12:36 pm
Resistance Range for Arduino?
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?
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: Resistance Range for Arduino?
Connect one end to +5 and the other end to GND. Then connect the middle 'wiper' pin to the analog input.the low end of the resistance of the pot is 456 ohms, and the upper range is 8.72 kohms.
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
-
- Posts: 124
- Joined: Tue Jul 22, 2008 12:36 pm
Re: Resistance Range for Arduino?
That's awesome- it works great. Thanks!adafruit_support wrote:Connect one end to +5 and the other end to GND. Then connect the middle 'wiper' pin to the analog input.the low end of the resistance of the pot is 456 ohms, and the upper range is 8.72 kohms.
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
Please be positive and constructive with your questions and comments.