Working principles of several stepper motors (bipolar, unipolar, reluctance and can-stack)


A stepper motor is an electric motor that divides its movement into a number of equal steps. This video will cover the working principle of several stepper motors. The virtual motor shown here operates on the reaction between the bar shaped permanent magnet forming the rotor and the field created by four electromagnets forming the stator. The two white marked coils arranged on the horizontal line are switched in series, thus they are organized in one group called a “phase”. Same is true for the two magenta colored coils arranged on the vertical line that form the second phase of the motor. The motor has four terminals in total, two for each phase. As shown in a previous video about brushed DC motors, the electromagnetic field is caused by the movement of charged particles. As soon as the vertically aligned coils are connected to a DC voltage source, the blue painted electrons start flowing through the wire of the coils from the negative to the positive terminal. Note that the upper end of the wire – which is terminal number 1 of the motor – is connected to the cathode of the voltage source, while the lower end – which is terminal number 2 of the motor – is connected to the anode. If you wrap your left hand around the wire of the solenoid with your fingers in the direction of electron movement, your thumb points towards the magnetic north pole created by the electromagnet. As you can see, the north pole points to the top of your screen. Due to the field produced by the electromagnets, forces are acting on the horizontally aligned permanent magnet. The north pole of the permanent magnet is pulled to the top right, the south pole to the bottom left. The resulting torque points clockwise. Thus, as soon as released, the permanent magnet starts rotating clockwise. After some overshooting caused by inertia, the bar magnet comes to rest with a rotational movement of 90 degrees compared to the initial state. The shaft of the motor has moved by one step. As long as the magenta colored electromagnets are connected to the voltage source, the permanent magnet will keep that stable position. To make the rotor spin clockwise by another 90 degrees, the horizontally aligned electromagnets have to be energized with a polarity that creates a magnetic field whose north pole points to the right. As soon as the horizontally aligned coils are connected to the voltage source, the vertically aligned coils are disconnected from the electric power. The cathode is connected to terminal number 3 of the motor, the anode to terminal number 4 which is the lower end of the wire. The thumb of your left hand points indeed to the right when wrapping your hand around the coil with your fingers pointing into the direction of electron movement. As soon as the bar magnet is released, the motor shaft spins another 90 degrees, doing a second step. Next, the horizontally aligned electromagnets have to be disabled while the vertically aligned electromagnets have to be enabled again. To make the permanent magnet continue spinning clockwise, the north poles of those electromagnets must now point to the bottom of your screen. To achieve that, the positive terminal of the voltage source has to be connected to the upper end of the wire, thus to terminal 1 of the motor. The polarity of the magenta colored coils is reversed in comparison to step number one. If the polarity of the horizontally aligned electromagnets is reversed in comparison to step number 2, the permanent magnet will spin clockwise by another 90 degrees. The positive terminal is now connected to the upper end of the wire, thus to terminal number 3 of the motor. As soon as the rotor comes to rest after that fourth step, the shaft of the motor has done a full turn. The table lists the polarity of the motor terminals for each step. To make the motor continue spinning clockwise, you have to go back to column 1 of the table: The cathode of the voltage source has to be connected to terminal number 1 of the motor, the anode to terminal number 2. Follow that scheme from left to right to make the motor spin another 360 degrees. As the windings are energized in sequence, the bar magnet synchronizes with the consequent stator magnetic field. Note that the polarity at the terminals of both electromagnets is swapped during movement. That’s why this type of stepper motor is called “bipolar stepper motor”. How can we make the motor spin counterclockwise? Well, you simply have to go through the columns of the table from right to left. Go from column number four to three,… …from three to two and so on. Whenever the rotor has completed one step, the rotational direction of the next step depends on the polarity of the voltage applied to the stepper motor’s terminals. A step is defined as the angular rotation produced by the output shaft each time the configuration of the voltage at the motor terminals is changed to a nearby column in the table. The step angle represents the rotation of the output shaft caused by each step, measured in degrees. We get a step angle of 90 for the motor shown here. The position of the motor shaft can be commanded to move and hold at any of those four steps without a feedback sensor. The rotational direction between two steps can be either clockwise or counterclockwise. The bar shaped magnet can be replaced by a cylinder made of any solid material with two permanent magnets at it’s ends. The north pole of one magnet and the south pole of the other permanent magnet faces the stator. The motor shaft still rotates by 90 degrees with each step. To get a higher angular resolution per step and thus a lower step angle, the rotor can be made of six permanent magnets. The magnets are arranged on the rotor in such a way that by turns their north respectively south pole points to the stator. The terminals of the motor are enabled using the sequence listed in the table that was also used to command the previous motor. Note that the motor turns counterclockwise when going from left to right trough the columns of the table. With each step, the motor shaft rotates just 30 degrees. Consequently, after four steps, the motor shaft has moved 120 degrees which is just one third of the rotor movement done by the previous motor having two permanent magnets on it’s rotor. That’s because the number of “poles” on the rotor of this stepper motor is three times larger. Go back to column 1 of the table to continue with the counterclockwise movement of the motor. 6 Steps are needed for a half turn of the rotor, thus 12 steps for a 360 degree turn. The rotational direction changes if you go from right to left through the columns of the table. Now, that motor spins clockwise. A simple way of doubling the angular resolution of this stepper motor without changing the hardware is using half stepping: Let’s start with the horizontal electromagnets being energized. To make this motor spin clockwise by a full step, the vertical electromagnets have to be enabled with terminal number 1 of the motor connected to the anode, while at the same time the horizontal electromagnets are disabled. In half step mode, the horizontal electromagnets are not disabled, thus both phases are now “on”. The torque generated by the white marked electromagnets is zero, since the forces acting on the nearby permanent magnets point along the horizontal axis. The torque on all other permanent magnets is canceled out. The magenta colored coils instead produce a torque pointing clockwise. As soon as the rotor moves clockwise a couple degrees following the torque of the magenta electromagnets, the white electromagnets cause a torque on the rotor that points counterclockwise. After a rotation of 15 degrees, the torque produced by the white electromagnets counterbalances the torque of the magenta colored electromagnets. The rotor stops at this stable position as long as both phases are “on”. As soon as the horizontal electromagnets are disabled, the torque produced by the vertical electromagnets cause a rotation of another 15 degrees. The full step has been divided into two half steps by turning both phases “on” before turning “off” the first phase. By inserting half steps between all full steps in the command sequence of the table, we get 8 steps for a rotational movement of 120 degrees. The angular resolution is doubled, the step angle halved. Using half step mode, this motor divides a full rotation into 24 equal steps. Same as before, the rotational direction of the rotor shaft changes when going from left to right through the columns of the table. Now, the rotor spins counterclockwise. In half step mode, the drive alternates between two phases “on” and a single phase “on”. When deleting the columns with just one phase “on” in the table, this stepper motor still rotates clockwise when going from right to left through the command sequence. This operating mode of a stepper motor is called “two-phase on, full step excitation”. In that mode, both phases are always “on” and from one step to another, the polarity of one of the phases is changed. The rotational movement is 30 degrees per step which is equal to the normal full step mode. The advantage of keeping both phases enabled is the higher torque produced by all four electromagnets during motor operation. The disadvantage is the doubled current flowing through the motor compared to the single-phase full step mode. Let’s change the winding arrangements for the electromagnetic coils in the two phase stepper motor: The coil shown here, has one winding with a center tap that is connected to the positive terminal of the supply voltage. Whenever the right end of the coil is connected to the negative terminal, a current flows through the right half of the electromagnet. With your left hand you can determine that the magnetic north pole points to the right end of the coil. If the left end of the wire is connected to the negative terminal, the current only flows through the left half of the coil. At the front side of the coil, the electrons move from top to bottom through the windings, thus the thumb of your left hand will point to the left end of the coil which is the place of the magnetic north pole. With the center tap, the magnetic pole of the electromagnet can be reversed without swapping the polarity at a pair of terminals. Enabling both halves of the coil simultaneously makes no sense: The magnetic south poles are facing each other. The magnetic field is (nearly) canceled out since the electrons run in opposite directions at the front side of the coil. In the motor shown here, each winding of the electromagnets has a center tap. All center taps are joined and connected to the positive terminal of the supply voltage. Once more, the white marked electromagnets are grouped to a phase. To achieve this, the wire end at terminal 1a is joined to 1b, as well as 2a to 2b. Same is true for the magenta colored electromagnets. Terminals 3a and 3b as well as 4a and 4b are also joined. In total we get 5 terminals coming out of the motor. Let’s command that motor to process clockwise rotation: To process step number one, the horizontally arranged electromagnets have to be disabled. The magnetic north of the vertical electromagnets must point to the bottom of the screen, thus terminal 4 has to be connected to the cathode of the supply voltage. Disabling the vertical electromagnet and connecting terminal 2 of the motor to the cathode is needed to process step number two. To swap the magnetic polarity of the vertical electromagnet compared to step number one, terminal 3 has to be connected to the cathode of the supply voltage. Terminal 2 is disconnected from the power supply to reach step number 3. Finally, terminal 1 is connected to the cathode and terminal 3 is disconnected from the power source to process step number 4. The enabling sequence is: 4, 2, 3, 1 with terminal 5 – the center taps – being always connected to the anode of the voltage source. One end of each winding is connected to the cathode once in every four steps of the motor shaft. The rotational movement is commanded without swapping the polarity at one of the terminals, which is why this motor is called “unipolar stepper motor”. This motor can also be commanded in half step mode. Even in this mode no more than 50% of the windings are energized at the same time during operation. Unipolar stepper motors only utilize half of the coil length, so less torque is available to magnetically move or hold the rotor in place. To get (nearly) the same torque as with the bipolar type, twice the number of windings is needed which is why unipolar stepper motors are usually larger. Another type of unipolar stepper motors is the variable reluctance stepper motor. The motor shown here is made of three pairs of electromagnets, thus 6 electromagnets in total are arranged on the stator with an angle of 60 degrees between two coils. The left ends of the three phases are connected to the anode of the voltage source. The right ends of the coil wires are connected temporarily to the cathode to make the motor turn. The rotor is made of a soft iron bar. Let’s have a closer look at the working principle: At the initial state, terminal 2 of the motor is connected to the negative terminal of the voltage source. The ends of the iron bar are attracted by the enabled electromagnets. Since the iron cylinder is aligned horizontally, the forces are pointing along the center line of the rotor, thus no torque is generated. As soon as phase two is disabled and phase three gets energized, the resulting torque points clockwise. The rotor follows that torque until the iron bar is arranged in line to the center axis of the two enabled, light blue electromagnets. Phase number one must be enabled and phase number 3 disabled to make the rotor spin clockwise by another 60 degrees. When disabling phase number one and enabling phase number 2 again, the rotor has turned by 180 degrees compared to the initial state Note that the polarity of the horizontal electromagnets is identical to that of the initial state. The phase switching sequence for the 180 degree rotation was: 3, 1, 2. When running that sequence for a second time, the motor spins another 180 degrees. 6 steps are needed for a full turn of the rotor with terminal 4 of the motor being always connected to the anode of the voltage source. The direction of rotation changes when going through that sequence in reverse order: The rotor spins counterclockwise if the stator coils are enabled in a counterclockwise sequence. Let’s modify the stepper motor slightly: Now, two iron cylinders with an angle of 90 degrees between both bars form the rotor. Same as in the last animation sequence, the phases at the stator are activated counterclockwise: Phase 2 is enabled in the initial state… …phase 1 in order to process the first step… …phase 3 during the second step… …and finally phase 2 is energized again with same polarity as in the initial state to process the third step. As you can see, the rotor spins clockwise even while the electromagnets are enabled counterclockwise. Besides the command sequence, the rotational direction of a stepper motor depends on the number of “teeth” at the rotor. In full step mode, one out of three phases is “on” during operation of the motor. 33% of the electromagnets move the rotor – remember that 50% of the electromagnets were used by the bipolar stepper motor in full step mode. The rotor is said to have 4 “poles” even if soft iron is essentially not magnetized. However, as soon as a phase is energized, magnetic poles are formed at the ends of the rotor. You can also operate that motor in half step mode: In the initial state phase 2 is energized. Phase 1 is also energized while number 2 is still powered for the first half step in clockwise rotation. Turning off phase 2 moves the rotor to the position of the first full step. Energizing phase 3 while phase 1 is still powered is the third half step… …turning off phase 1 the fourth half step bringing the rotor to the position of the second full step. Following that scheme, the rotor spins 90 degrees with 6 half steps. The shaft rotates 15 degrees per half step. In half step mode the command sequence alternates between having two electromagnets and just one electromagnet turned on. No more than 66% of the electromagnets are enabled simultaneously – remember that 100% of the electromagnets were used in a half step of a bipolar motor. This is also a unipolar stepper motor with 3 pairs of electromagnets forming the stator. The coils are wrapped around a soft iron core. The core ends pointing to the rotor have 3 teeth each, thus we get 18 teeth in total. The rotor is a geared wheel made of soft iron with 16 teeth. In the initial state, the horizontally mounted electromagnets are energized. The teeth of the rotor are aligned with the stator teeth of that white marked coils belonging to phase number 2, while there is an offset between stator and rotor teeth for all other electromagnets. When energizing phase 1 and deenergizing phase 2 the rotor teeth will move to align with the stator teeth of the magenta colored electromagnets. This results in a clockwise movement of the rotor by 7.5 degrees which is one third of a tooth pitch. The electromagnets always attract the rotor teeth next to the stator teeth with highest force. To make the rotor spin clockwise by another 7.5 degrees, phase number 3 has to be enabled while phase number 1 gets disabled. Now, the rotor teeth are aligned with the stator teeth of the light blue electromagnets. When enabling phase 2 and disabling phase 3, the rotor will rotate to get realigned with the teeth of the white marked stator coils. The situation is similar to the initial state besides the fact that the rotor has moved clockwise by 22.5 degrees. When switching the phases in reverse order, the motor spins counterclockwise. The electromagnets are enabled clockwise to make the rotor spin counterclockwise. The rotor moves to minimize the air gaps between the iron of the stator and the rotor. Magnetic reluctance, or magnetic resistance is analogous to ohmic resistance in an electrical circuit. The magnetic resistance of soft iron is clearly lower than that of air. When a stator pole is energized, the rotor torque is in the direction that will reduce the size of the air gap in order to reduce the reluctance of the total magnetic circuit. That’s why the nearest rotor poles are pulled from the unaligned position into alignment with the stator field which is a position of less reluctance. The reluctance varies during motor operation. That’s why this type of motor is called “variable reluctance stepper motor”. You can operate that motor in half step mode, too: Starting with phase number 2 being enabled, the first half step for a clockwise rotation is commanded by enabling phase number 1. Now, the rotor moves clockwise to reduce the air gaps between rotor teeth and stator teeth of the magenta colored electromagnets. In doing so, the air gaps between the rotor and the white marked electromagnets of phase number 2 are enlarged. The state of minimal reluctance for the magnetic circuits formed by both pairs of enabled electromagnets is reached after a clockwise rotation of 3.75 degrees. Disabling phase 2 makes the rotor spin by another half step so that the rotor teeth are aligned with the stator teeth of phase number 1. Same as with the stepper motors treated before, the command sequence alternates between having two electromagnets and just one electromagnet turned on. After 6 half steps, the rotor teeth line up with the stator teeth of the white colored electromagnets again but the rotor has moved during the command sequence by one tooth pitch which is 22.5 degrees. Let’s modify the geared rotor of the variable reluctance motor: This one has 13 teeth. Let’s add a second gear with the same number of teeth. Now, the additional gear is turned a couple degrees, so that there is an offset of half a tooth pitch with the first gear. Let’s remove the iron core… …and replace it by a permanent magnet with the gears attached to the poles of the bar shaped magnet. The gear teeth connected to the north pole of the permanent magnet form north poles, while the other ones form the south poles of the rotor. Let’s insert that rotor into a bipolar stepper motor with a toothed stator composed of two pairs of electromagnets. The command sequence is identical to that of the bipolar stepper motor treated at the beginning of this video. Whenever a phase is enabled, the teeth representing a south pole at the rotor line up with the teeth of an electromagnet forming a magnetic north pole at the stator. In contrast the gear at the back of this animation is connected to the north pole of the permanent magnet and its teeth line up with that electromagnet forming a south pole at the stator. The front view illustrates the alignment of rotor and stator poles clearly. In total, the rotor has 26 poles. With each full step the rotor moves by half the angle between two poles which is less than 7 degrees. 52 steps are needed for a full turn of the motor shaft. With a half step, the motor spins less than 3.5 degrees, thus 104 half steps are needed for a full turn. This type of motor is called “hybrid stepper motor”. The name is derived from the fact that the rotor is composed of two materials: Two gears made of soft iron, as used in variable reluctance motors as well as an axially magnetized, round permanent-magnet. The last stepper motor treated in this video is the can-stack motor: A phase of that motor is based on a bobbin wound coil design. The bobbin has claw teeth brought to the center that form the poles of the stator. To increase efficiency of the motor, the bobbin is covered with a layer of soft iron so that the stator windings are embedded in a can. To give you a better view on the stator windings, the can is perforated in this animation. If a current flows through the windings of the stator coil, magnetic poles are formed at the claws of the bobbin. With the polarity shown here, the magnetic north pole is created at the front of the coil, the magnetic south pole at the rear. The iron can shields the magnetic field created by the coil, which is why the field strength outside that cover is more or less zero. The field lines exit the iron container only on the edges of the claw teeth, thus you will detect magnetism nowhere but near those gaps. Nonetheless in this animation the whole can is colored either green or red to illustrate the places of the magnetic poles more clearly. A second stator coil is needed to make this stepper motor work. Both cans are arranged in a stack which is why this construction principle is called “can-stack motor”. Both stator cans have the same number of poles and the claws are arranged to be half a pole pitch apart. The motor shown here has 16 poles per stator can, thus the second bobbin is twisted by 11.25 degrees. The rotor is made of a permanent magnet with the same number of poles as one of the stator cans, thus we get 16 poles in this animation. The can-stack motor is a bipolar stepper motor, thus the polarity at the terminals is swapped during operation. The rotor moves with each step to get in line with the poles of the enabled stator can. The north poles of the rotor are aligned with the south poles of the stator. Whenever phase 1 is enabled, phase 2 is disabled. Because there is an offset of 11.25 degrees between both cans, which is half a pole pitch, the shaft moves the same number of degrees with each full step. After four steps the rotor has moved 45 degrees, thus 32 full steps are needed for a full turn. Of course, this type of motor can also be operated in half step mode and two-phase on, full step excitation mode. You already should know what those command sequences look like. If not, rewind this video to the section about bipolar stepper motors or have a look at the project page. Thanks for watching and: “I’ll be back!”

64 thoughts on “Working principles of several stepper motors (bipolar, unipolar, reluctance and can-stack)

  1. I enjoyed your stepper motor video.  The graphics are very helpful for me and I  appreciate the way you explain the information.  I can;t say I understand all of the information you presented but it is a "step" in the right direction.  I will watch this video again and will be looking forward to your future video about controlling these stepper motors.  Thank you very much! Harvey from Nebraska

  2. thanks for your video; very clear explanation; look forward to your video on stepper motor control (I hope you cover diy circuits and not only ic drivers)

  3. Shouldn't the solenoid poles be inverted with the current flowing in that directions? I mean that north and south of the stator polar expansions should be "coloured" (red and green) in the opposite way to match the field generated by that animated current.
    Unless the blue dots running into wires are electrons.

  4. Great explanation. I enjoyed how you incrementally added complexity to explain each type of motor. The animations are excellent!

  5. This is excellent video! And please don't thank for every comment – save your time and give us more of these 😉

  6. this is one of the best study video available on net. i wish our lecturers had this type of knowledge and way to explain like this way. ty sir,.

  7. Great explanation but I have a question: I got 3 Pittman 19V stepper motors that have several cables in 3 groups. The group that has 3 (not 4 or 5) all resist movement of rotor if connected by pairs or all 3. I want to use arduino to control them. Can you please tell me how can connect them?

  8. Thank you Norbert, for creating and uploading this superb video.
    May I ask what software was used for creating the animations?
    Thanks in advance if you get time to answer.

  9. By far the best video I've seen on stepper motors. I've used them for projects for 4 or 5 years, but never found a good enough explanation for how they work and why you use an H bridge. Thank you.

  10. For unipolar motors araging the steps in the order 1,2,3,4 would have been far easier to follow. Like this it just makes it look more complicated. Check the datasheet of KH42JM2. it shows the steps very clear and nice.

  11. Comprehensively explained. I appreciate particularly how you explained the construction of the teethed magnetized rotors. Be back soon!

  12. Thank you. Can you share what you used to animate this video? I am trying to get started making my own videos. Any advice or input is greatly appreciated.

  13. Saudações, amigo! I'm enjoying a lot your videos – you're a true hardware hacker with old school spirit! Keep the german accent, it's cool! 😉

  14. I´ve been working with German people since I leave the University and I really appreciate them. I have learned lots of things from them. Thank you so much! Your videos are so helpful to me.

  15. it is a great explanation and video it was that i needed to understand much better the step motor. Thanks so much

  16. Dear respected HomoFaciens, Hope you are in good health with success and happiness. I'm really happy with awesome explanation.

  17. I didn't see a "two phase excitation" of the hybrid stepper in full step mode, but I guess it is essentially every other half step of the half step mode where both coils are energized at once. No wonder two phase excitation gets only 30-40% output power increase for 2x the input power (relative to single phase excitation) — the rotor teeth are never fully aligned with with the stator teeth! So efficiency would be terrible unless you use single phase excitation (poor utilization of motor) or drive it closed loop like a bldc (e.g. with field oriented control).

  18. Good explanation overall. The one thing that struck me is that I thought one should apply the right hand rule to determine the magnetic pole when current flows through a coil. The author applies the left hand rule.

  19. I got wrong information from Microchips website on the full step – 2 phase sequence. This video solved it. Thank You Sir

Leave a Reply

Your email address will not be published. Required fields are marked *