Maker.io main logo

Introduction to Electric Motors

235

2025-06-24 | By bekathwia

Motors DC Motor Servo Stepper Vibration / Haptic

Let’s explore the fascinating world of electric motors. Motors are everywhere—from fans to cars to robots—and understanding how they work is a key skill for anyone diving into electronics or engineering. We’ll cover the basics of motors, the different types, what they’re used for, and answer some common questions beginners often have. Let’s jump in!

At its core, a motor is a device that converts electrical energy into mechanical energy. This mechanical energy is what powers everything from tiny gadgets to industrial machines. But not all motors are the same, and choosing the right one depends on your project. Let’s start with the most common types of motors…

DC Motors

These are powered by direct current and are known for their simplicity and control. They’re great for hobby projects and robotics. On a DC motor, there are magnets and coils of wire. The flow of direct current through the wire coil controls the direction of the motor. The stationary part of the motor is called the stator, and the part that rotates is the rotor. The magnets and coils can be paired up as the stator and rotor, respectively, or the other way around.

Introduction to Electric Motors

DC motors come in two main types: brushed and brushless. Brushed motors are inexpensive, but brushless motors are more efficient and last longer– that’s why they market and charge extra for power tools with brushless motors.

You’ll find small DC motors in toys, fans, and electric toothbrushes, just to name a few. These can be easily reused in your hobby projects. To use a DC motor with Arduino, you can send a PWM signal using analogWrite(), which will control the motor’s speed. But most motors use more power than an Arduino GPIO pin can provide, so it’s best to wire up a transistor directly to the power source. It acts as an electronic valve, allowing charge to flow between two of its pins proportional to the signal voltage it receives on the third.

Introduction to Electric Motors

You’ll find that a DC motor is commonly paired with a gearbox to reduce its speed while increasing its torque. These DC gearbox motors are great for making small driving robots.

Introduction to Electric Motors

When an asymmetrical weight is added to the shaft of a DC motor, it becomes a type of vibration motor, also called an ERM or Eccentric Rotating Mass motor. You use them in your video game controller and electric toothbrush, for example. The tiny motors inside your cell phones are more likely to be tiny LRA or Linear Resonance Actuator motors, but we won’t go into those in this introductory overview. Motors that provide tactile feedback in game controllers and phones are often referred to as haptic motors.

Introduction to Electric Motors

While we’re over here converting electrical energy into mechanical energy, it’s worth mentioning that the opposite is also an important related topic. Think of a wind turbine, for example. When mechanical energy is converted into electrical energy, it’s called a generator.

Servo Motors

These are DC motors with built-in circuitry, allowing for precise position control. They also have gears, which convert the high-speed, low-torque energy of the DC motor into low-speed, high-torque movement. They’re ideal for applications like robotics, where accuracy is critical.

Introduction to Electric Motors

Hobby servo motors are commonly available in two sizes: the standard and the micro. But when you’re shopping for servos, size isn’t the only factor. There are two different rotation styles, also: standard, which rotates 270 degrees, back and forth, and continuous, which rotates… continuously, in 360 degrees. They are controlled differently in your code and are suitable for different needs, so be sure to read your product listings carefully before you buy.

One more factor with servos is the gear material. Standard is plastic gears, but if you need a lot of torque, look for metal gear servo motors.

Introduction to Electric Motors

Stepper Motors

These move in discrete steps, making them perfect for tasks that require precise movement and at slow speed, like 3D printing and other CNC machines.

They are available in a wide variety of sizes, but there are only two main types: bipolar and unipolar. You will always need some control circuitry to work with steppers, and the configuration will vary based on the type. Stepper motors are an intermediate topic, so if you’re new to electronics, make sure you’re caught up with all the basics in this series first.

The coils of wire in a stepper motor are part of the stator, and the magnet is the thing that spins, which is called the rotor. The coils are energized in sequential opposing pairs, which generate two magnetic fields that attract the teeth of the rotor. The more sets of coils, the more steps and motor has, which results in a smaller step angle and more precision.

Introduction to Electric Motors

AC Motors

These are powered by alternating current and are typically used in industrial settings, home appliances, and larger machines. To explain how they are different from DC motors, let’s first discuss how motors work.

All electric motors operate on the principle of electromagnetism. When current flows through a coil of wire, it creates a magnetic field. This magnetic field interacts with the magnetic field generated by the motor's magnets, causing rotation.

But big AC motors have to work differently from DC ones because their power source is always switching polarity. Inside, they look a little bit like stepper motors, because the coils of wire are in the stator. But the rotor is a ring-shaped conductor that can spin freely, not a permanent magnet. As the coils are energized in sequential pairs, it creates a rotating magnetic field that induces the same in the rotor, causing it to spin. Electromagnetism is wild and amazing.

Introduction to Electric Motors

Motors Q&A

How do I attach things to motors?

A motor’s shaft is usually keyed, meaning it has a flat spot or ridges that help couple it to the thing you want to spin. You can see here how the oblong hole in this 3D-printed wheel fits onto the oblong motor shaft.

Introduction to Electric Motors

When you tighten down a screw using a shaft coupling, the attachment becomes fixed in position and spins with the shaft.

Introduction to Electric Motors

Servos come with these bits called horns, which seat snugly onto the grooved motor shaft, making it easy to connect them to things using less precise methods like zip ties and hot glue.

Introduction to Electric Motors

How do I choose the right motor for my project?

Consider these factors: the type of power you’re using, the torque and speed you need, and whether you require precise control. Research the motor’s datasheet to match it with your requirements and follow along with a trusted example tutorial for the specific type of motor and driver you are using.

What’s an H-bridge?

An H-bridge is a special circuit made of four switches or transistors that allows the direction of a DC motor to be reversed. They are commonly what you will find in motor driver boards, including servo motors’ integrated circuitry.

Introduction to Electric Motors

We hope you’re inspired to build something with motors. If you want to learn more about DIY electronics, check out the rest of this series and subscribe on YouTube to be sure you don’t miss the next video.

Some images in this article are by Randy Sarafan, from the articles “Motors and Motion” and “Robot Brains”. Used with permission.

Recommended Reading

Basics of Brushed DC Motors - Another Teaching Moment | Digi-Key Electronics

Basics of Brushless DC Motors - Another Teaching Moment

What is Back EMF in DC Motors? - Another Teaching Moment | DigiKey

Stepper Motor Basics - Another Teaching Moment | DigiKey Electronics

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.