Stepper Motors

A stepper motor is a special type of brushless DC motor.  Electromagnetic coils are arranged around the outside of the motor.  The center of the motor contains an iron or magnetic core attached to a shaft.  By sequencing the voltage of the coils precise rotational control can be achieved at relatively low cost. The drawback is, the control is generally open loop, so the system does not know if the motor stalls or gets out of sync with the controller.

By creating toothed shaped coil assemblies and toothed/gear shaped rotors, very high steps counts per rotation of 200 to 400 can be achieved.

Current and Voltages

Stepper motors have a rated voltage and current.  A typical stepper motor like our NEMA 17 might have a rated voltage of 2.8 Volts and a maximum current of 1.68 Amps.  This basically means if you hook it up to 2.8 Volts it will draw 1.68 Amps.  If you try to run it at a higher voltage it will draw more current and get excessively hot.  Most people don’t hook motors straight to a voltage source.  They use a stepper motor driver.  Stepper motor drivers regulate the current.  If you hook it up to to 12V, for example, the motor while attempt to draw more current, but the stepper motor driver will not allow that to happen and use high frequency pulses to limit the average current to the desired maximum value.

Stepper motors are designed to work this way and it is safe to run the motors at up to 20 times the rated voltage.  You will actually get better performance by running at a higher voltage than the rated voltage.

Stepper motors can safely run run quite hot even when running under correct parameters.  It won’t hurt the motor, but you should also be concerned with personal safety from burns or heat damage to your machine.  Test the settings in your machine and set the current at a reasonable value.
Stepper motors draw power even when they are not moving, so they are generally not very power efficient.  They would be a poor choice for a battery powered toy car, for example.  The motors would always be drawing full power and quickly drain the battery.  A standard brushed DC motor does not draw any power when not spinning and would be a better choice.

Stepper Drivers

Most stepper drivers have a means to set the maximum current.  It is usually done by setting a voltage at a control pin or from an on board potentiometer.  The stepper driver’s maximum current assumes you are adequately cooling the driver.  It is often hard, even with heatsinks to fully cool the drivers at the maximum current setting.  Check your temperatures while using the machine.

Most drivers have a thermal protection feature that disables the driver for a brief period of time to allow it to cool.  If you are loosing steps or hear a ticking or pulsing sound from your motors, it could be due to thermal shutdown.  Try lowering the current.

If your driver is rated for less current than the motor, that is fine.  You just won’t get full performance from the motor.  If the driver is rated for more than the motor, you must reduce the current to the motors maximum current.

It is never a good idea to disconnect a stepper motor wire from a driver with the system powered.  Many drivers are not protected from this and will be permanently destroyed.

Motor Connections and Wiring.

Stepper motor drivers have 4 wire connections for the motors, but steppers motors can have 4, 6 and 8 wire versions.  The 6 and 8 wire motors can be used on 4 terminal drivers via special connection methods.  These connection methods allow you to choose methods that are more suitable to the electrical and speed requirements of your system.

4 Wire Motors.
4 wire motors are the simplest to connect.  You just wire them 1:1 to the driver.

6 Wire Motors
6 wire motors have a wire attached to the center of the coils.  This allows you to use the full coil or only half of the coil.  The image below shows how to connect in the two modes.

8 wire motors.
8 wire motors have two coils per phase. The coils can be run in series, parallel or half coil mode.

If you don’t know what wires go to what coils, there are a few quick ways to figure it out.  The first way is by measuring the resistance between the wires.  Pick any two wires.  Use a meter to read the resistance between them.  The resistance is generally less than 10 ohms.  If you see a resistance near that amount, those two wires belong to the same coil.  If the resistance is higher, move one of the probes to a new wire until you do find a low resistance.

If you do not have a meter try this trick.  Make sure no two wires are touching each other and spin the shaft.  The motor should have a little detent torque, but spin relatively freely.  Now start touching a pair of wires and turning the shaft.  If it gets harder to turn, those two wires are on the same coil.  The resistance goes up because you are creating an electrical  generator into a high load.

If your motor spins backwards from what you expected, just swap the connections of any two wires on the same coil.  Do not switch wires from both coils.  The motor direction will change.  Most software or firmware interfacing to the stepper drivers have ways to change the direction too.  That is usually easier than changing the wiring.

Stepper Motor Sizes

Most stepper motors used these days conform to NEMA (National Electrical Manufactures Association) sizes.  This basically defines the mounting face size of the motor.  Below is a chart of the most popular sizes.  The smaller motors have threaded mounting holes and the larger sizes have threaded holes with a space behind the mounting flange for a nut.  The shafts may or may not have flats and single or dual shaft (both ends) versions are available.  The length of the motor is not covered by the NEMA specification.  The face of the motors often have a round boss.  Your mounting surface should be designed to accommodate this.  Be sure to check the drawing for your motor.

Stepper Motor Torque Ratings

Stepper motor torque ratings are given as holding torque.  Stepper motors have highest torque at rest or slow speeds as the speed increases torque will start to fall off.  This is primarily due to the inductance of the coils.  This acts like a resistance and limits the speed at switch the coil reaches full strength.  At high step rates the coil will not reach full power before the voltage reverses.  Eventually the power will fall low enough that the motor cannot even spin itself.  Higher voltages help with this, so you can get higher speed with higher voltages.

Motor Speed

Stepper motors do not a specified speed because it is very dependant on the application.  Differences in load and voltage will affect top speed.  As said above, the torque will drop with speed and eventually you will stall.  The driver will not know the motor has stalled and will continue to raise the step rate.  You will hear a loud buzzing noise as the motor is vibrating rather than spinning.  In general, stepper motors only run in the hundreds of RPMs rather than the thousands of RPMs from a normal DC motor.

Accuracy / Resolution / Microstepping

The primary specification for motor resolution is the motor’s steps per revolution or angular degrees per step.  Most motors are 1.8 degrees per step (200 steps/rev) or 0.9 degrees per step (400 steps/rev).

Stepper drivers can also do microstepping.  Microstepping allows the motor to move to positions between the normal steps by applying partial currents to each coil.  This can increase the resolution of the motor and can also smooth the motion.  At some point the microstep level is below the accuracy of the motors and other parts of the system.  Increasing the microstepping level will not actually increase the accuracy of the machine after that point.

Just for fun

A stepper motor can also be used as a generator. If you hook it up to another stepper motor of similar size you can hook them together for a truly useless machine.


Jason Fehr said...

I'm a little confused by the description of current in this article. If I have four 2a motors would it be better to run them off of a 6.5v power supply or a 10v power supply?

Jason Fehr said...

I'm a little confused by the description of current in this article. If I have four 2a motors would it be better to run them off of a 6.5v power supply or a 10v power supply?

simon derwent said...

Hi have u any suggetions how i can set 2 stepper motors to run wirelessly, i.e i move one and the other one moves. I have been experimenting with arduino nano but stuck with setup, power and code, any ideas.

Matt Tucci said...

Of the 27 different articles I have read on steppers, this is by and far the best.