Most joints in this module hide an electric motor. Many of them use the brushless type. This lesson shows what is inside one, and how a robot makes it stop at the exact angle it needs.

What is inside a brushless motor

An electric motor has two main parts: magnets, and coils of wire. When current flows through a coil, the coil acts like a magnet and pushes or pulls on the other magnets. That push is what makes the motor turn.

In an old brushed motor, the coil is the part that spins. Small contacts called brushes rub against it to carry the current in.

A brushless motor swaps the roles. As maxon, a maker of these motors, explains, the magnet spins and the coils stay fixed in the outer shell. Nothing rubs to carry current, so nothing wears out as fast.

Diagram: two electric motors side by side. In the brushed motor, a coil spins between two fixed magnets and brushes rub against it to bring in current. In the brushless motor, a magnet spins in the center, four fixed coils sit around it, and electronics feed the coils.Swipe the diagram to see all of it.

Who tells the coils when to push

The coils cannot be plugged straight into a battery. Electronics must send current to one coil, then the next, in the right order, so the magnet keeps being pulled around. This is called commutation. It works like pushing a child on a swing: a push only helps if it comes at the right moment.

To get the timing right, the electronics must know where the magnet is. Many motors use small sensors that detect the magnet. Others use an encoder, a sensor that measures how far the motor has turned.

Diagram: four steps of a simplified brushless motor. In each step one of the four coils is switched on, first the top, then the right, the bottom and the left, and the bar magnet in the center turns to point at the active coil.Swipe the diagram to see all of it.

The loop that stops it at the right angle

A motor spins when it is told to. A robot needs more: it must reach one exact angle and stay there. A feedback loop makes this possible. The encoder measures the angle. The drive compares it with the target angle and corrects the difference. Kollmorgen describes this for servo motors.

Picture a robot arm holding its hand up while a heavy load pulls it down. The load pushes the joint off its target. The encoder sees the angle change, and the loop sends more current to the motor to push back. This happens again and again, all the time.

Diagram: a commanded angle meets the measured angle from the encoder. The difference goes to a controller, then a driver, then the motor, which turns the joint.Swipe the diagram to see all of it.

A servo motor is a motor sold together with this loop. The UR5e arm from Universal Robots shows how fast the loop runs: its specification says the control loop runs 500 times each second.

Moving from A to B

One command is not enough for a smooth move. The controller plans a trajectory, which is a list of positions, each with its own moment in time. The loop chases a new target at every step.

The same idea on a small arm

The SO-101 is a small open-source learning arm from the LeRobot project. A person moves its leader arm by hand, and its follower arm copies it. The follower reads the leader's position again and again, and the loop moves each joint to match. A big research robot uses the same idea, with better parts.