Stepper Motor Working Principles

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.

Motor s****pecifications
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.

Microstep
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.

Acceleration

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.

Position f****eedback

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.

SPAMMY LINKS REMOVED !

Change "about 2 amps" to "at most 1A and 1.5A respectively" for more realistic limits for the A4988/DRV8825 tiny modules. The datasheet specs assume much more heatsinking or are pulse ratings, not continuous.

You've forgotten the cheap TB6600 based drivers (which aren't very efficient and have large heatsinks,
but can handle 3A or so IIRC).

Thank you MarkT. :slight_smile:
When the user actually uses it, there will be a misunderstanding of the setting. The current value on the drive sometimes corresponds to the rated current value of the stepper motor, and sometimes corresponds to the peak value of the stepper motor current. The relationship between these two currents is 1.4 times. Current will cause different effects when used, and also affect the life of stepper motors and drivers. So when under some light load and discontinuous working conditions, A4988 and DRV8825 can drive a stepper motor with a rated current of 2A.

When the operating conditions of the stepper motor are high, it is recommended to use an industrial level driver.

As for the TB6600, some products on the market now have poor component selection due to low prices. Therefore, the failure rate of the TB6600 is high, and I have not recommended it.

I've only ever seen stepper driver chips that use the peak current as the nominal current, which
makes sense as that's the value you can use to compute dissipation in the motor windings.

mikebrown:
So when under some light load and discontinuous working conditions, A4988 and DRV8825 can drive a stepper motor with a rated current of 2A.

But steppers are by definition a continous load... So these chips cannot handle those current levels in
the real world, especially on tiny pcb modules without enough copper area to spread the heat.
1A and 1.5A are reasonable working maximums for those modules - to suggest anything more will
lead to people frying the modules and being frustrated.

Agree with your point, the cheap stepper driver chip maximizes the driving and current processing capabilities, and the design margin is small or no, so it affects the driving capability, driving stability and life of the driver chip. Therefore, it is recommended to use in small load or non-continuous working situations. However, if the continuous working time is long, or the load is large, or to verify the performance of other parts of the equipment, it is recommended to use an industrial-grade driver. Recommend an industrial grade driver, the perfect substitute driver.