Introduction
I find myself repeatedly typing similar replies to similar questions about the basics of stepper motors and I thought it would be useful to write this note as it will be a little more comprehensive than any individual reply.
The information is presented under several different headings and there is quite a bit of overlap and cross-referencing of ideas so I suggest that you should read all of the note at least once. I think it would be possible to miss some important info if you only read the bit that immediately interests you.
Throughout this note I have referenced Pololu products. I have no connection with the company apart from being a satisfied user of their A4988 stepper driver boards.
This note is intended to provide guidance for the Arduino user who is new to stepper motors. It is not intended to be an expert dissertation on the subject.
Please be aware that this text continues into the next Post
Types of stepper motor
Broadly speaking there are two types of stepper motor - unipolar and bipolar.
Bipolar motors have 4 wires connecting to the two separate coils inside the motor - one pair for each coil.
There are also two types of unipolar motor - those with 5 wires and those with 6 wires.
The 6-wire motors can also be referred to as hybrid motors. They are similar to the 4-wire bipolar motors and just have an extra wire connected to the centre of each of the coils. If you want to use a 6-wire motor in bipolar mode just ignore the wires that connect to the centres of the coils.
The 5-wire motors cannot be driven by a driver designed for a bipolar motor. An example of a 5-wire motor is the small 28BYJ-48 motor which can be seen in many Arduino projects and usually uses a ULN2003 chip as its driver.
This note only relates to bipolar motors and does NOT apply to 5-wire motors or the ULN2003 driver.
Motor Specifications
Datasheets normally quote the coil current, coil resistance, nominal voltage and holding torque and steps per revolution. For example, for this motor the values are 1 Amp, 2.7 Ohms, 2.7volts, 1.4Kg-cm and 200 steps/rev.
The nominal voltage is irrelevant for all practical purposes. The important figure is the rated current.
The rated current is normally the current per-coil and when currents are quoted for stepper motor driver boards that is normally also a per-coil figure.
The holding torque is the torque available to resist rotation while the motor is stationary. The available torque will decline as speed increases.
Some manufactures provide graphs showing how the torque varies with speed.
Operating Voltage
Stepper motors are very different from regular DC motors.
With a DC motor you control the current in order to control the speed of the motor. The usual way to control the current is to vary the voltage - perhaps using the Arduino analogWrite() function to control a Pulse Width Modulated power supply to the motor.
Stepper motors pretty much draw their full current all the time, even when they are stationary - that is how they resist being moved from their present position. This means they are very inefficient.
For all practical purposes the nominal voltage of a stepper motor is irrelevant. It is the voltage which would drive the rated current through the coil when the motor is stationary based on Ohms law e.g. 2.7v = 1A * 2.7 Ohms. However, as soon as the motor starts moving the combination of the inductance of the coils and the back-emf generated by the movement will prevent the nominal voltage from producing the rated current.
For this reason stepper motors are normally driven with a much higher voltage. This, in turn, means that a specialized stepper motor driver board is needed which can limit the current to whatever the motor can take. If the current is not limited the high voltage would quickly destroy the motor.
Stepper Motor Driver Boards
These are specialized components designed to control stepper motors conveniently and efficiently. The Pololu A4988 is a typical example that is often used with Arduinos.
Generally speaking specialized stepper motor driver boards only require two connections (plus GND) to the Arduino for step and direction signals.
Normally specialized stepper motor driver boards have the ability to limit the current in the motor which allows them to drive the motor with a high voltage (up to 35v for the Pololu A4988) for better high speed performance.
And they all usually have the ability to do microstepping. The Pololu A4988 can do 1/2, 1/4, 1/8 and 1/16 microsteps. It defaults to full steps. I believe the BigEasydriver which uses the same A4988 chip defaults to 1/16 microstepping mode.
H-bridge driver - e.g. LN298
These can be made to control a stepper motor but they are a very poor choice - mainly because they have no method for limiting the current and therefore cannot use high voltages. They are also more trouble to connect to an Arduino (they require more pins) and more trouble to control with an Arduino (more calculations for the Arduino to do).
Choosing a motor and motor driver
First choose the motor
The important specification is the torque of the motor. Generally speaking the holding torque is quoted. For the motor I linked to above it is 1.4Kg-cm. The available useful torque will decline as the speed increases and at no-load maximum speed it will be zero. Some (probably the more expensive) motor manufactures provide graphs showing how the torque varies with speed.
To figure out what motor you need you will have to measure or estimate the torque required. It would be a good idea to choose a motor with a good margin of surplus torque.
It is not too difficult to make a rough measurement of the torque required but it is beyond the scope of this note.
Edit 17 Feb 2015 See Reply #29 for a suggestion
Then choose the stepper motor driver
When you have selected a motor and know what current it requires you can choose a stepper motor driver that can comfortably supply the required current.
You should be aware that the economical single-chip stepper drivers (such as the A4988 and the DRV8825) can only supply about 2 amps. If your motor requires more than that, you will need to get one of the more expensive commercial stepper drivers. However the working principle will be practically identical to the A4988.
NEMA 17 and 23
These standards only define the size of the front face of the motor and the location and size of the mounting screw holes. They say nothing about the power of the motor. The 17 is an abbreviation of 1.7 inches.
...... continued in next Post
...R