123Views6Replies

Author Options:

more than two stepper motors using Adafruit Motor Shield, possible? Answered

Hello,
I have three stepper motors (Sparkfun ROB-10848) that I wanted to control.
I have already had an Arduino Mega 2560 and an AdaFruit Motor Shield V2: How could I connect all these steppers so to control them using Arduino Mega?
Thank you,
Karim

6 Replies

user
mpilchfamily (author)2014-03-18

Buy a second motor shield and stack them. The shield is desinged to be stacked so you can control more than 2 motors. Check the Adafruit site for details.

Select as Best AnswerUndo Best Answer

user
behzadjk (author)mpilchfamily2014-03-19

sure that makes sense. But for now I took out the shield and connected the stepper directly to the Arduino. Now, It was working for a while; but I am not sure if it was the correct operation. And then stopped after a while. I am using the setup as below:

http://arduino.cc/en/uploads/Tutorial/bipolarKnob_...

http://arduino.cc/en/uploads/Tutorial/bipolarKnob_...

I then re-powered the board and then started playing with the potentiometer; and it seems like the motor started working again. Could you tell me what the issue may be?

Thanks.

Select as Best AnswerUndo Best Answer

user
mpilchfamily (author)behzadjk2014-03-19

If your using an h-bridge it's not connected directly to the arduino. In this case you've made your own controller.

If you've double checked your wiring then the problem is in your code.

Select as Best AnswerUndo Best Answer

user
behzadjk (author)mpilchfamily2014-03-21

Hello, and Thank you

it actually worked...basically using the pot as a knob

but now I would like to change the application to make the stepper sweeping back and forth, am I able to do this using the same setup? I know that the pot and h-bridge are probably not needed for sweeping. but if I want to control each stepper independently I need to remove the connections from H-bridge and directly connect them to Arduino, am i correct? to which pins though?

thank you.

Select as Best AnswerUndo Best Answer

user
mpilchfamily (author)behzadjk2014-03-21

You will still need the H-bridge but you'll need one per stepper. If you take this much further your just going to be making another motor shield like the one you already have.

Select as Best AnswerUndo Best Answer

user
karim_bj (author)mpilchfamily2014-03-21

OK, now if you have three H-Bridges with the Arduino, how would you connect them? which pins do you use?

And would there be a sample code for that available?

Thank you,

Karim.

Select as Best AnswerUndo Best Answer