# How the stepper motor works

How does it work?  The pole pieces are arranged in a triangle, with the ‘bottom’ pole pieces being the ends of the driver coils and the top pole piece being formed from the top end of the coils bending back to the rotor.  This means that when the coils are driven with opposite polarity, the north and south poles cancel out and the top pole piece is magnetically neutral.

Let’s assume the coils are energised such that the left-hand coil becomes a north pole and the right hand coil becomes a south pole. This requires the left-hand coil to be energised in direction 10, and the right-hand coil to be energised in the direction 01.  Magnetic force attracts the opposite poles of the rotor causing it to turn so that its south pole faces the north pole of the stator and its north pole faces the south pole of the stator.  The top pole is neutral at this point.

Pulse 2 makes both pole pieces into north poles, at the same time making the top pole piece into a South. This attracts the N of the rotor and repels the S of the rotor, causing the rotor to turn anticlockwise ¼ of a turn.   On Pulse 3, the left-hand coil now becomes an S and attracts the N of the rotor, whilst the S of the rotor is attracted to the N of coil 2.  On Pulse 4, both pole pieces are S, attracting the N of the rotor, whilst the top pole piece becomes an N and attracts the S of the rotor.  The next pulse is the same as Pulse 1 and we are back to the starting position.

It is clear that if the rotor is left in, say, position 3, and the pulsing sequence starts at 1, the rotor could turn either way to get to position 1. In either case, this would cause a positioning error.  To avoid this, the driver either needs to remember its position in the pulse sequence or it should always be driven a multiple of 4 pulses (one revolution) so that it is always at the appropriate starting position.

###### Using an H-bridge driver

The stepping sequence shown in the diagram is that of a typical H-bridge driver. The setting 1001 indicates the polarity of the two coils, with coil 1 being energised with polarity 10 and coil 2 by polarity 01 (i.e. the opposite polarity).  The direction of rotation will be reversed by changing the pulse sequence.  Thus, starting from position 1001, if the next step is 0101 (rather than 1010) the direction will be anticlockwise.  Some H-bridge drivers, such as The DRV8834 Stepper Motor Driver have a ‘direction’ pin that alters the pulse sequence accordingly.  They also remember the last step as long as they remain energised and ‘awake’.

By altering the relative current through the coils, it is possible to achieve coil positions intermediate to the main steps shown above.  The motor shown in this example works well at quarter steps but may not have as much starting torque.  Moreover, it is necessary to keep the coils energised in order to maintain an intermediate position.  The data sheet advises that the driver should be designed to accelerate and decelerate the pulse rate at the start and end of travel to ensure accurate stepping.

Clearly, it is worth using a H-bridge driver for non-trivial implementations.

This site uses Akismet to reduce spam. Learn how your comment data is processed.