Understanding motors is one of the most challenging things about designing a robot. It's not because the concepts are complex–it's because it's hard to find all the information you need in one place. This document will, hopefully, tell you everything you need to know about integrating DC motors[[1]] into your robots. It's written for someone with a light engineering background, but you shouldn't need that to understand it!
[[1]]: Note that we aren't going to talk about stepper motors because they are not well-suited to robotics applications
First, some theory

Choosing robot motors means trading off speed against torque, weight against heat, complexity against efficiency, and more. Let's learn some theory so we can make these trades in a more informed way!
Motors spin using magnetic fields. They use current flowing through inductive coils to attract or repel magnets to electromagnets. The polarity of the magnets (shown red and green in the diagram) switches in time with the rotation of the motor, ensuring each coil is always attracted to the next magnet.
Because the magnetic field is proportional to the coil current and the number of turns in each coil, the torque output of the motor is also proportional to these things.
However, as you add more turns to an inductive coil, its inductance--think of it like the inertia of the magnetic field--also increases. This means it takes longer to reverse the magnetic field to seek the other side of the motor.[[2]] This puts a hard limit on how fast a motor can spin–in other words, inductance is inversely proportional to speed.
As these go up... | ...these go down. |
---|---|
Speed | Torque |
Voltage | Current |
Resistance | Inductance |
(Note that adding more current always works to get more power out of a motor, but more current means more waste heat. This waste heat will eventually melt the motor.)
But we skipped something: how do we generate the changing currents to produce the changing magnetic fields we want? Clearly we'd need knowledge of the position of the spinning coils with respect to the magnets. Some motors solve this problem with external electronic controllers, and some do it mechanically like in the diagram above! More on this later.

[[2]]: From circuits, V = L * di/dt. So for a given voltage, more inductance means slower change in current. Magnetic inertia!
Why do robots need motors?
Robots need motors for motion and manipulation. Motion might involve standing on articulated legs, rolling on wheels, spinning propellers or more, while manipulation could be curling fingers or lifting an arm.
The hard part is selecting a motor that matches the performance you need. Propellers, for instance, have to spin fast, so you typically need low torque and high speed. Motors for driving legs need a lot of torque at lower speeds. Fingers are less powerful than legs. Let's go over what's out
What types of motors are there?
Direct-current motors usually fall into two categories: brushed and brushless. They're sometimes called DC and BLDC motors, respectively. Let's talk about brushed motors first.

Brushed motors are two-port devices. This is convenient, because you can directly connect a battery to the motor's two terminals to make it spin.

Brushed motors have brushes. These brushes are charged metal blocks that slide on a commutator to transfer power to its moving interior coils. We mentioned this earlier--a brushed motor is built so that the right coils are always connected to the right inputs depending what position the axle is in.
Because the commutator is built-in, you can control the speed of a brushed motor just by varying the constant voltage or current you supply it. I won't go too far into controllers because it's out of scope for this article, but suffice to say that pulse-width-modulation (PWM) control and a single transistor or H-bridge works fine.
Brushless motors, by contrast, are built with stationary coils and a spinning rotor that holds the magnets.

This looks simpler, but since there's nothing mechanically timing the coils to switch polarity at the right time, that control has to be done electrically. As you can see, three wires come out. These three wires are connected to the three phases of the motor.

Here's a diagram of how the phase wires are connected internally. You can connect power to one or two phase wires and ground to another to drive an arbitrary-direction field through the center of the motor. This requires an electronic component that can reconnect each wire to power or ground at high frequencies. We call these devices electronic speed controllers (ESCs), BLDC drivers, or sometimes DC inverters. Here's a typical one that you can purchase from Amazon:

Note the current and voltage ratings. The switching components built into the ESC can only take so much before they short together or melt. A detailed discussion on how ESCs work is out of scope for this wiki article, but email me if you'd like to know more! I have lots of notes sitting around from designing these.

Let's summarize the differences between brushed and brushless motors.
Brushed | Brushless |
---|---|
+ Cheap | + More efficient |
+ Easy to control | + Higher peak power and torque |
- Brushes wear out | + Lighter |
- Lower torque from a standstill | + Higher maximum speed |
What motors are out there?
Now that we're done with high-level theory, here are some examples of motors you might buy and what you might use them for. We'll start with brushed motors.
Brushed Motors
Because brushed motors are less efficient and heavier for a given power output, they're best used on small joints like fingers, grippers, or rollers, or on all-around small robots. For robots under a pound, you'll have trouble finding a brushless motor small enough! They're also very cheap, which can be nice.

Hobby servo motors like this one contain a small DC motor, a gearbox reduction, an encoder (a rotational position sens0r), and a logic controller. The reduction reduces the motor's speed and increases its torque. The controller knows the position of the output and holds it at an angle you can specify. These motors are great for small repetitive motions, like the flaps on a model plane. They're between $5 and $10, run on 5 to 10 volts DC, and have 0.5-2 Newton-meters of torque.

Some of you may recognize this motor from FRC robotics. Round DC motors like this come in a variety of standard sizes abbreviated with numbers: 775, 550, 280, etc. You can look up each number to copy the mounting holes on the front into your own designs. These are cheap and readily available, and their lack of casing insulation makes them relatively light as brushed motors go. However, they need a geared reduction to perform most tasks because they spin at very high speeds (15,000 revolutions per minute).
An aside on kT and kV
Now is a good time to mention the concept of kV: kV means "rpm per volt," so a motor with 100 kV attached to a 10 volt source will spin at 1000 rpm. The 775 motor pictured has roughly 750 kV.
There's another parameter, kT, which means "Newton-meters per volt." Because of the inductance physics we mentioned earlier, you can always approximate kT with the equation:

These equations are important for determining the performance of unknown motors!
Brushless Motors

Almost every brushless motor looks like this in a different shape, These motors became popular as consumer drones made them cheaper and cheaper. They're very performant and available in a wide range of kV (and therefore kT) values. Because their kV is high (rule of thumb: above 100), you'll need to gear them down to do anything besides driving a drone propeller.


These are hub motors. They're brushless motors built into the inside of a wheel. As you can see, they have very thick wires and high inductance, which lets them support very high torque. These are the motors used on Bird scooters! Because they don't require a geared reduction, they're cheaper than other options for moving heavy things like people. However, the huge copper coils make them very heavy.


These are MIT Mini Cheetah actuators. They're brushless motors with an integrated geared reduction and an integrated ESC. Often they'll even contain encoders so that you can drive them to specific positions. These actuators power most modern robotic dogs and other legged robots. You need twelve of them for a dog--one hip, one shoulder, and one knee, on four legs--and each one is about $200 on Alibaba. This is why robotic dogs are expensive!
These produce the same performance as a large hub motor at a fraction of the weight. There's also a lot of creativity that's gone into their gearboxes to ensure the robot can sense the force exerted by its limbs, but detailed discussion on gearboxes is out of scope for this topic.
Conclusion
Hopefully after reading this you understand a lot more about how to select motors for your next robot. I might be adding more information over time. Please reach out if you have any additional questions!
Ava