Stepper motors
by Chris Woodford. Last updated: March 25, 2023.
Reach out and touch the tip of your finger to the tip of your nose. No problem! Try it again with your eyes closed and it's still simple: you never miss. Even in clumsy people like me, the brain mostly has control of the body. In athletes, artists, ballet dancers, and surgeons, "control" means absolute precision. Now imagine trying to build a robot with the same degree of mechanical excellence, using gears, wheels, and levers to accomplish what the body does with muscle and bone. It's a much taller order, which makes the human body seem even more impressive. One of the big difficulties of making well-behaved robots is that simple electric motors are impossible to move precisely. That's why a lot of robots swap ordinary motors for what are called stepper motors (or, sometimes, stepping motors), which can turn through "steps"—well-defined angles—under precise electronic control. What are they are how do they work? Let's take a closer look!
Photo: A typical DC stepper motor from an old inkjet printer. How do we know? There are multiple leads coming out of it (unlike with a simple DC motor, which has only two leads). Another way of telling a stepper motor is to hold it near your ear and slowly rotate the axle with your fingers. You should hear and feel the individual steps, a bit like winding a wristwatch.
Sponsored links
Contents
What's wrong with ordinary electric motors?
An ordinary electric motor is based on a simple bit of magnet science we all learn at school: unlike poles attract, like poles repel. Here's how a basic motor works...
You take a ring-shaped magnet, put a coil of wire inside it, and feed electricity through the wire. The wire becomes a temporary magnet powered by electricity—an electromagnet, in other words—and the magnetic field it creates repels the field from the permanent magnet that surrounds it. By switching the current on and off with a clever little device called a commutator, and some electrical contacts called brushes, you can make the wire rotate in the same direction indefinitely. Feed electricity (electrical energy) into it and you get motion (mechanical energy) back out. That's the essence of an ordinary motor that uses DC (direct current) electricity. If you're less than sure how a motor like this works, you might want to check out our introductory article about electric motors.
We can also make motors that work using AC (alternating current) instead of DC. Although they're engineered in a radically different way, they're still based on "like poles repel, unlike poles attract": the electricity that powers the motor creates magnetic attraction and repulsion, and a force that makes the motor spin. You'll find more about AC motors—which are also called induction motors—in our article on AC induction motors.
Photo: The powerful electric motor from an old lawn mower. The slots at the front are part of the commutator, which is an ingenious device that reverses the electric current and keeps the rotor (the rotating, central part of the motor) spinning in the same direction.
Whether they're powered by DC or AC, ordinary motors are the hidden electric muscles that power modern life: you'll find them in all kinds of gadgets and gizmos in the world around you, from food blenders and refrigerators to vacuum cleaners and electric trains. But in all these machines, the rotors of their motors spin continuously. When you vacuum a carpet or commute to work by subway, the motors that are working for you turn around an arbitrary number of times: there's no precise control over how many times they rotate and what angle they spin through—and it really doesn't matter.
Now suppose you want to make an electric-powered robot arm that turns through an exact angle (an exact number of degrees) so it can successfully grab a cup of coffee off your desk. You could fit an electric motor onto a wooden or plastic lever to make it turn when you switch on the power, and you could flick the power on very briefly so the arm sweeps through a certain angle and then stops. The trouble is, there's no way of knowing how much of an angle the motor (or the arm) will move: it depends on everything from the power of the motor and the electric current driving it to the weight of the arm and even which way the wind is blowing. A motor that moves in such an arbitrary way is no use whatever in robotics: your coffee will surely end up on the floor! That's where a stepper motor comes in: it's a special kind of DC motor designed so you can make it rotate through a precise angle, instead of spinning round by a random amount.
Artwork: An ordinary motor (left) rotates by an arbitrary amount when you switch it on and then off quite quickly; there's no way to control how much it turns, since it depends on various different factors (including the "load"). By contrast, a stepper motor (right) can be made to turn through a fairly precise angle. It's much more controllable.
What exactly is a stepper motor?
Photo: The philosophy of steps: we think of steps as a way to climb up, but they're also a way to break a fixed distance into equal-sized pieces so we get more control over our movements. We can think of them as turning vague, variable, analog amounts of distance into specific, discrete, digital chunks. Photo of The 16th Avenue Tiled Steps Project, San Francisco, courtesy of the Jon B. Lovelace Collection of California Photographs in Carol M. Highsmith's America Project, Library of Congress, Prints and Photographs Division.
Stepper motors are different from ordinary DC motors in at least four important ways.
The first difference you notice is that they have no brushes or commutator (the parts of a DC motor that reverse the electrical current and keep the rotor—the rotating part of a motor—constantly turning in the same direction). In other words, stepper motors are examples of what we call brushless motors. (You'll also find brushless motors in many electric vehicles, hidden away in the wheel hubs; used in that way, they're called hub motors.)
The second major difference is in what rotates. Remember that in a basic DC motor, there is an outer permanent magnet or magnets that stays static, known as the stator, and an inner coil or coils of wire that rotates inside it, which is the rotor. In a brushless hub-motor, the coils of wire are static in the center and the permanent magnets spin around them on the outside. A stepper motor is different again. This time, the permanent magnets are on the inside and rotate (making up the rotor), while the coils are on the outside and stay static (making up the stator).
Photo: A pair of typical stepper motors.
The third big difference between an ordinary DC motor and a stepper motor is in the design of the stator and the rotor. Instead of one large magnet on the outside (the stator) and one large coil rotating inside it (the rotor), a stepper motor has an inner magnet effectively divided up into many separate sections, which look like teeth on a gear wheel. The outer coils have corresponding teeth that provide magnetic impulses, attracting, repelling, and making the teeth of the inner wheel rotate by small steps. This will become clear in a moment when we look at some pictures.
The final difference is that a stepper motor can stay still, in a certain position, once it's rotated through a particular angle. That's obviously crucially important if you want a motor to power something like a robot arm, which might have to rotate a certain amount and then remain in precisely that spot while another part of the robot does something else. This feature is sometimes called holding torque (torque is the rotary force something has, so "holding torque" simply means a stepping motor's ability to stay still).