I am an extreme noob to Arduino as well as stepper motors, so please bear with me and use simple words in the replies. I'm currently a Mechanical Engineering student working on an autonomous recycling sorter project for a class. I'm having issues getting my motor to turn both ways. The way I have the code and wiring set up, the motor will currently only turn clockwise but if I switch the polarity of the wiring, it will rotate counter-clockwise. I need it to rotate one direction and then pause for 1 second and rotate back the other direction. Is the issue with my code or with the way I have it wired? I've attached both set ups below. Thanks for the help, I appreciate it.
Here is the link to where we purchased the motor pack: Amazon.com
Here are the motor specifications:
Model No.:17HD48002H-22B
Step Angle: 1.8 deg
Holding Torque: 59Ncm(84 oz.in)
Rated Current/phase: 1.7A
Frame Size: 41 x 41mm
Body Length: 47mm
Shaft Diameter: 5mm
Shaft Length: 22mm
Weight: 380g
I'm using the drv8825 stepper motor driver and a battery pack of 8 alkaline AA batteries giving off 12 V. I can't find out how many amps it gives off, but seems to be somewhere between 2400-3200 mAh.
The arduino is also plugged into my laptop for power.
Thanks for all the help, I've attached my drawing for you.
The DRV8825 is probably going to struggle with a 1.7 amp motor - you may need a heat sink and a cooling fan.
A motor that draws 1.7 amps per coil won't be long depleting some AA batteries. Stepper motors are very inefficient and not suited to battery power - unless you have something the size of a car battery.
Battery pack voltage isn't drooping significantly under load.
Those hookup wires are able to handle the current (some are only rated for signals, not power)
That your dirpin signal is making it onto the DRV8825 board (use a multimeter).
The battery pack voltage is dropping under load, this is an issue but I don't believe the one causing the motor to not rotate both ways. My group is looking into alternative ways to power the motor within the rules of the design project.
I think you may be on to something on the hookup wires, I just got them out of my roommate's electrical pack. I'm going to try to switch up the wires later today and see if anything changes. I will also use a multimeter to check the dirpin signal. Thanks for the help.
Robin2:
The DRV8825 is probably going to struggle with a 1.7 amp motor - you may need a heat sink and a cooling fan.
A motor that draws 1.7 amps per coil won't be long depleting some AA batteries. Stepper motors are very inefficient and not suited to battery power - unless you have something the size of a car battery.
...R
I have a heat sink on the DRV8825, and it seems to be staying at a relatively cool temperature while running. Do you have any recommendations on a different power source? We aren't allowed to use a car battery or an outlet.
brianm4:
Do you have any recommendations on a different power source?
I guess you could use two or more packs of AA cells in parallel.
You may be able to get a high capacity LiPo battery pack but then you need a suitable LiPo charger because they can easily go on fire if mistreated - which included over-discharging them.