Go Down

Topic: turning two stepper motors synchronously in opposite direction (Read 3047 times) previous topic - next topic

shameet1

I am student and trying to so some project and still learning
I have two stepper motors of these
http://www.eminebea.com/en/product/rotary/steppingmotor/pm/highspeed/smw42s-48.shtml

I have connected them on both the ends of a steel rod which is 5 mm diameter of length 50 cm Now i want turn the rod 45 degrees( 1/4 turn) when given a signal and back on signal

I am using this adafruit motor shield

http://www.adafruit.com/products/81

Adafruit Motor/Stepper/Servo Shield for Arduino kit - v1.2
Can some one help me with the code and the external power requirement for motor shield.

Robin2

I don't have any experience with that motor shield. It is not the ideal thing for controlling stepper motors. Something like the Pololu A4988 would be better and probably easier to program for.

Can the motor shield control 2 stepper motors?

That said, the first thing you should do is disconnect one of the motors from the rod and learn how to make it do what you want on its own. It should then be fairly obvious how to make the second one work.

Have you studied the Adafruit tutorials?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

MarkT

You can reverse a stepper motor by reversing the connections on one of the windings.  You will
have to get the phase right by manual adjustment of the gear on the axle of one of the motors.

Never do this powered up, it will almost certainly blow up the motor driver....
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

polymorph

I think specifically MarkT meant, don't reverse the connection to the windings with the power on.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

polymorph

I agree that the motor shield you have is not easy to use in this way, because of the way the library for it works, it is difficult to send drive pulses syncronized.

You could connect both steppers to one output, paralleled. But since it is made for a maximum of 600mA and the steppers are rated at 24V @ 400mA each, you'll have to run at a lower voltage to keep the current down. Then just have one winding on one stepper connected backwards as MarkT suggests. One goes CW, the other CCW. Steps syncronized.

Alternately, get a couple of A4988 based Pololu stepper drivers. Connect the Step from both to the same Arduino pin, and the Dir from both to another Arduino pin. Again, wire one up with one winding reversed.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

Robin2

If you have two A4988 boards just give one a fwd "dir" and the other a rev "dir". I would probably drive them on two separate step pins as well.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

polymorph


If you have two A4988 boards just give one a fwd "dir" and the other a rev "dir". I would probably drive them on two separate step pins as well.


Why? They'll always move in sync, as they are physically attached to the same shaft. But if the Arduino feeds one a Step pulse slightly before the other, they are fighting each other. Probably not enough of a difference in timing to matter, but why make it slightly more complicated for no purpose?
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

shameet1

I have successfully blown up one motor with the adafruit shield  :(
I am going to buy two A4988 drivers, and one replacement  motor,
1.Do I have to connect external powers supply?
if so,
1.I have 24 v 5 amps SMPS with me
2.I have 18 V Transformer 1 amp
3.12 V 3 amp Transformer
what will you suggest ?
Thanks for quick responses !!!

Go Up