Code to run 2 x stepper motors with motor shield

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
thomasfnewell
 
Posts: 15
Joined: Mon Nov 24, 2014 12:55 pm

Re: Code to run 2 x stepper motors with motor shield

Post by thomasfnewell »

Ok cool, will try that. 1.4A wont be too much for the shield will it??
Thanks
T*

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

Re: Code to run 2 x stepper motors with motor shield

Post by adafruit_support_bill »

1.4A wont be too much for the shield will it??
The current is determined by the load, not the supply. The shield can handle 1.2A per channel. Your motors only need 350mA, so there is not a problem.

User avatar
thomasfnewell
 
Posts: 15
Joined: Mon Nov 24, 2014 12:55 pm

Re: Code to run 2 x stepper motors with motor shield

Post by thomasfnewell »

hi. everything is running nicely, looks great. thanks again for all your help, real star!**
do you have an email that i can post a video to?
Big thanks once again, till next time, hehe, merry xmas and happy new year!
tom

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

Re: Code to run 2 x stepper motors with motor shield

Post by adafruit_support_bill »

Great to hear it's all working!
If the video is hosted on YouTube or a similar service, you can just post the link here. Otherwise, you can send it to [email protected] with a link to this thread.

User avatar
thomasfnewell
 
Posts: 15
Joined: Mon Nov 24, 2014 12:55 pm

Re: Code to run 2 x stepper motors with motor shield

Post by thomasfnewell »

hi Bill, i am back.
One quick question, sorry i had to reply here as the forum would not let me post a new thread for some reason, there is no place to click on for new post, if that makes sense.
Making more moving blinds, using same shield and arduino etc but this time i am using two of these motors:
http://www.dfrobot.com/index.php?route= ... ct_id=1082
I think they will work with the adafruit shield but i just wanted to double check and whether i needed a special library to run the motors?
Any info/help would as ever be greatly appreciated.
Kindest regards
Tom

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

Re: Code to run 2 x stepper motors with motor shield

Post by adafruit_support_bill »

That's a nice price on a geared stepper! I may have to pick up a few for myself.

Unfortunately, these do not look like a good match for the V2 motor shield. In particular, the winding resistance is very low:
Winding resistance: 1.5 Ω
To keep within the 1.2A rating of the motor shield, you would have to run them at 1.8v.

These motor specs indicate that the motor was designed for use with a constant-current "chopper" drive like one of the Synthetos boards.
https://learn.adafruit.com/all-about-st ... he-stepper

User avatar
thomasfnewell
 
Posts: 15
Joined: Mon Nov 24, 2014 12:55 pm

Re: Code to run 2 x stepper motors with motor shield

Post by thomasfnewell »

hi bill thanks for getting back to me. this is a shame that they will not work, when you say run them at 1.8v, is that the power supply for the motors or voltage from the shield, can you explain a little further.
I am going to test whilst i purchase a different shield, can you recommend one that would be best?
Many thanks once again.
T*

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

Re: Code to run 2 x stepper motors with motor shield

Post by adafruit_support_bill »

Since the shield delivers a constant voltage, the maximum current draw of the motor is determined by the winding resistance and Ohm's Law. The maximum current draw will occur when the motor is stationary. When stepping, the winding inductance will reduce the current draw as explained in the link above. To avoid overloading the shield, you would need to keep the voltage at the motor to 1.8V or less. There is a small voltage drop through the shield itself, so an external power supply of about 2v or less would probably be OK. However, at those voltage levels, torque would suffer.

The Synthetos gShield has current limiting and would be a suitable driver for these motors. http://www.adafruit.com/product/1750
www.pololu.com also has a selection of current limiting stepper drivers.

User avatar
thomasfnewell
 
Posts: 15
Joined: Mon Nov 24, 2014 12:55 pm

Re: Code to run 2 x stepper motors with motor shield

Post by thomasfnewell »

This is as i thought, the resistance x current is asking for small voltage and the torque will suffer massively.
I think this one might work, what do you think?
https://digitalmeans.co.uk/shop/dual_bi ... uino-a4988
My other option is to get the adafruit motors again, hopefully they have enough torque.
Please advise on link as will have to order asap. Additionally can i use the original code i have for the other blind or is it a complete rebuild of code.
thanks!
T*

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

Re: Code to run 2 x stepper motors with motor shield

Post by adafruit_support_bill »

The DFRobot controller looks like it will handle those motors well.

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

Return to “Arduino Shields from Adafruit”