There are several ways to make a Stepper Motor run, and the best way will depend on the application, the motor and the electronics available. For running a stepper motor from an Arduino these are the main ways to go

1. A ULN2003 Darlington driver board. Typically sold with small geared steppers this requires four digital pins and the Arduino sketch needs to directly drive each coil

2. A driver board/shield with a constant voltage driver, such as the Adafruit Motor Shield. This runs over SPI (so only needs two pins) and can run many kinds of steppers and normal motors fine, unfortunately it couldn't run my steppers.

3. A 'chopper' driver that will vary the voltage to keep a constant current, such as the A4988 or the DRV8825 chip, either direct or via a board/shield such as the Stepstick or Pololu.

This instructable covers the third method, running one or more steppers via an A4988 IC on a StepStick board.

Step 1: A Little About Stepper Motors

There's lots of great resources out there about Stepper Motors, how they work and what kinds are available, I'd recommend

Stepper Motor on Wikipedia

About Steppers on Adafruit Learn

Stepper motor page on RepRap wiki

I had acquired some Stepper Motors from Ebay, that didn't work well with the Adafruit Motor Shield. Looking at the specs the problem here was the resistance/current/voltage rating;

Rated Current/phase2.0A

Phase Resistance1.4ohms


So, for Stepper motors, the resistance per phase is a constant. The Rated current is the MAXIMUM current the motor will take before bad things happen, and the voltage is the calculated voltage that will give a constant current at the rated current, for the motors resistance (V = I x R, V = 2.0A x 1.4Ohm = 2.8V).

The Adafruit stepper motor shield cant supply 2A,and has trouble with voltages below about 5V, so couldn't properly run my motors (they jittered but didn't smoothly move).

So, I got some stepsticks and decided to wire them up to my Arduino.

Other Materials

For this I also used;

An Arduino Uno, but any Arduino compatible should do

A Stepstick, or compatible stepper driver using a A4988 or DRV8825

A 12V power supply

A breadboard

Some hookup wire, I used solid Cat5 strands.

I also used a couple of LEDs and some 220Ohm resistors

<p>PS would it not make sense to have your primary image showing what you are using rather than an apparently random pick of one of the many combos of motor/driver you aren't using? </p>
<p>Thanks for a concise summary. </p><p>You didn't mention that it is entirely possible to run motors at much higher voltage/ current combos it it's not continuous, eg if you switch off between steps using the enable pin (which you accidently left off your fritzing diagram - you mentioned connecting pin 6 in the text).</p><p>Also the higher the voltage the faster/ more accurate the step and generally I found it a good idea to use the highest possible voltage and correspondingly decrease the current to avoid burning out the motor. Thus it should have been entirely possible to use your adafruit driver with your stated specs.</p><p>Finally I've never calculated current and measured voltage at the stepstick, always just turned the pot down low then manually adjusted the current up to get reliable function.</p><p>Also microstepping seems to help the motor run quieter/cooler (but I don't know why)</p>
<p>Hai,</p><p>Thanks for sharing this</p><p>I have a question, I want a two stepper motors rotate adjustable after the first stepper gives made 360 degrees hi stop ,starts the second stepper motor to also rotate 360 degrees, stop and first put back his thing etc.</p><p>I'm not a great programmer, can you could help me with it</p><p>The whole purpose is to build a 3D scanner</p>
<p>Paul,</p><p>You mention that for a second stepper the same Pins/logic voltage is to be applied, but I'm not sure how to implement in the code. I've read elsewhere that steppers cannot execute steps simultaneously and they must step one at a time. I'm running a second A4988, that is wired according to your diagram, but, how might I run step exclusive to one stepper or another. </p><p>Please let me know. Thanks for the tut.</p>
<p>Hi</p><p>How to stop the stepper .. I want to move it 200 steps then stop it </p>
if i connect an unipolar motor to the driver with the common pin connect to the power supply gnd will it work
<p>Hey, thanks for the tutorial. However, I think I fried my arduino uno attempting this. Would someone be able to tell my why it fried? Basically I connected everything except the motor power supply and then I plugged a 12V power supply into the arduino, and then it fried. I posted the question here </p><p><a href="http://electronics.stackexchange.com/questions/209004/im-pretty-sure-i-fried-my-arduino-uno-given-my-setup-what-caused-it-to-be-fri" rel="nofollow">http://electronics.stackexchange.com/questions/209...</a></p><p>with more detail. Of course, feel free to respond in the comments of this instructable if you want.</p>
<p>NOTE: I did not have reset wired to sleep, however. </p>
<p>Can I get away with using a 2.8amp 2.5 volt motor or will this overload the stepstick?</p>
<p>AFAIK The stepstick will supply as much current as it is able, until it gets too hot and shuts down, so depending on which driver is on the stepstick means a limit of around 2A (A4988) or 2.2A (DRV8825) with sufficient cooling. Your 2.8A motors would run with this current, but not at their rated strength/speed.</p>
<p>2 Amp 1.4 Ohms per coil are actually really good stepper motors. They would maintain torque at higher RPM. It is the drivers you're using that are weak.</p>
<p>well explained</p>
<p>Great info, thank you.</p>

About This Instructable




More by paulhurleyuk:Drive a Stepper Motor with an Arduino and a A4988 Stepstick/Pololu driver 
Add instructable to: