0

controlling motor shield with potentiometer
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

controlling motor shield with potentiometer

by johndavid400 on Wed Feb 25, 2009 1:38 pm

hello, I have an Arduino Duemilanove and a motor shield kit. I have no problems driving stepper motors or dc motors, however, I am very new to the idea of controlling a motor with an analog signal. I have read quite a bit on the motor shield website and links, as well as finding another write up (motor knob) about how to control a stepper motor with a potentiometer straight off the arduino. I did not want to do this, since my stepper motors draw 1.2 amps, I don't want to kill the arduino. I have been unsuccessful in re-working these 2 sketches (which are based on different libraries) so that I can use the motor shield to drive 2 steppers, while controlling them with 2 potentiometers on analog ports 1 and 2.

For a better mental picture, I have a 2 axis drawing machine that I built and would like to use an old joystick to control the motion of the 2 axis'. I feel confident that if I can get a standard potentiometer to control a motor, I will be good to go from there.

the motorshield sketch:
http://www.ladyada.net/make/mshield/use.html

and the built in arduino example:
http://arduino.cc/en/Tutorial/MotorKnob

If anyone can give me some insight on how to setup the potentiometers to control the motors, I would be very appreciative!

thanks
~jd
johndavid400
 
Posts: 7
Joined: Wed Feb 25, 2009 1:16 pm

Re: controlling motor shield with potentiometer

by adafruit on Sun Mar 01, 2009 8:16 pm

get your arduino reading the potentiometers through the analog ports
THEN
get your arduino running the motors
THEN
combine the two sketches

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Please be positive and constructive with your questions and comments.