The article is presented under several different headings and there is quite a bit of overlap and cross-referencing of ideas.
This note is intended to provide guidance for the Arduino user who is new to stepper motors.
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.
Datasheets normally quote the coil current, coil resistance, nominal voltage and holding torque and steps per revolution. For example, for the stepper motor parameters are 2 Amps, 1.1 Ohms, 45 Ncm and 200 Steps/Rev.
The important parameter is the rated current (2 Amps ).
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 torque curves showing how the torque varies with motor speed.
Stepper motor driver
The stepper motor driver boards are designed to control stepper motors conveniently and efficiently. The driver board A4988 is a typical example that is often used with Arduino.
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 for better high speed performance.
And they all usually have the ability to do microstep. The A4988 can do 1/2, 1/4, 1/8 and 1/16 microstep. It defaults to full steps. I believe the Easydriver which uses the same A4988 chip defaults to 1/16 microstep mode.
Choosing stepper motor and driver
The important specification is the torque of the motor. Generally speaking the holding torque is quoted. For the torque value of the motor mentioned above is 45 Ncm. The available useful torque will decline as the speed increases and at no-load maximum speed it will be zero. Some motor manufactures provide torque curve.
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.
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 1 amps and 2 amps of current. If your motor requires more than that, you will need to get one of the more expensive industrial level stepper drivers (Motiongoo DM542T).
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.
Most (but certainly not all) stepper motors do 200 full steps per revolution. By appropriately managing the current in the coils it is possible to make the motor move in smaller steps.
The main advantage of microstep is to reduce the roughness of the motion. The only fully accurate positions are the full-step positions. The motor will not be able to hold a stationary position at one of the intermediate positions with the same position accuracy or with the same holding torque as at the full step positions.
Stepper m****otor speed
Typical speeds might be 1000 to 4000 steps per second and for a 200 step motor that would represent 5 to 20 rps (300 to 1200 rpm).
Generally speaking the motors with low coil resistance and high currents will be most suitable for higher speeds. A high voltage will also be needed for high speed.
If the stepper motor is required to move a heavy load it will normally be necessary to start the movement slowly (as with any motor) and accelerate to the desired speed and, equally, to decelerate when it is necessary to stop.
If you try to start or stop a stepper motor too quickly it will simply skip steps with no damage to motor.
For this reason, it is essential to choose a motor with sufficient torque for the job and to use acceleration and deceleration when necessary.
Stepper motors do not have the ability to tell the controller what position they are at, nor do they have the ability to go to a particular position. All they can do is move N steps from where they are now.
If it is essential to have position feedback a rotary encoder can be attached to the motor shaft.
Controller(Arduino) pulse width m****odulation (PWM)
Arduino PWM using analogWrite() has nothing to do with controlling stepper motors. To control a stepper motor though a specialized stepper motor driver the Arduino just needs to provide step and direction signals using digitalWrite().
PWM may be used within the stepper motor driver to limit the current in the motor coils.