Core Engineering Takeaways
- •Brushed DC motors are simple and inexpensive, requiring only an H-bridge driver and PWM, but suffer from mechanical brush wear and electrical noise.
- •BLDC (Brushless DC) motors deliver the highest power density, efficiency (>90%), and thermal dissipation, making them essential for drones, mobile robot drivetrains, and dynamic quadruped legs.
- •Stepper motors operate in open-loop position control with high holding torque at zero RPM, ideal for 3D printers, CNC axes, and precise pan-tilt camera rigs.
- •RC Servos integrate a DC motor, reduction gearbox, potentiometer, and control board into a closed-loop positioning package (50 Hz PWM 1–2 ms pulse width).
- •Field-Oriented Control (FOC) utilizes Clark and Park mathematical transformations to decouple magnetic flux and torque generation in 3-phase BLDC motors for silent, ripple-free torque.
- •Always implement flyback diodes or integrated MOSFET body diodes to suppress high-voltage inductive back-EMF spikes during motor braking and PWM switching.
- Basic electrical concepts: Voltage (V), Current (I), Resistance (R), and Power (Watts)
- Familiarity with Pulse-Width Modulation (PWM) signals
1. Physics of Electromechanical Actuation
Electric motors convert electrical energy into mechanical rotational or linear force through the interaction of magnetic fields and current-carrying conductors.
The underlying principle is governed by **Lorentz Force Law**:
$$\mathbf{F} = I (\mathbf{L} \times \mathbf{B})$$
Where: - $\mathbf{F}$ is the resulting mechanical force (Newtons) - $I$ is the electric current flowing through the coil (Amperes) - $\mathbf{L}$ is the length vector of the wire inside the magnetic field (meters) - $\mathbf{B}$ is the magnetic flux density vector (Tesla)
When a coil of wire carrying current $I$ is placed in a magnetic field $\mathbf{B}$, opposite sides of the coil experience opposite forces, creating a mechanical **Torque** ($\tau$):
$$\tau = k_t \cdot I$$
Where $k_t$ is the **motor torque constant** ($\text{N}\cdot\text{m}/\text{A}$). Simultaneously, as the armature rotates inside the magnetic field, it acts as a generator, creating a counter-voltage known as **Back-Electromotive Force (Back-EMF)**:
$$V_{\text{back}} = k_e \cdot \omega$$
Where $k_e$ is the back-EMF constant and $\omega$ is the angular velocity ($\text{rad}/\text{s}$). The net current flowing through the motor armature is:
$$I = \frac{V_{\text{applied}} - V_{\text{back}}}{R_{\text{winding}}}$$
This fundamental relationship explains why electric motors draw their maximum **Stall Current** at zero rotational speed ($V_{\text{back}} = 0$) and draw minimal **No-Load Current** when spinning freely at maximum RPM.
2. Brushed DC & Coreless Motors
Brushed DC motors are the classical workhorses of hobby and educational robotics. They consist of a stationary permanent magnet stator and a rotating armature rotor with mechanical commutator bars and carbon or copper brushes.
Working Mechanics As the rotor turns, the mechanical brushes continuously slide over the commutator segments, mechanically alternating the current direction through the armature coils to ensure continuous rotational torque.
Core Characteristics: - **Voltage Control**: Speed is directly proportional to applied voltage ($V$), regulated via high-frequency **Pulse-Width Modulation (PWM)**. - **Direction Control**: Reversing polarity reverses the direction of magnetic field and shaft rotation. - **Coreless (Ironless) DC Motors**: Remove the iron core from the rotor, leaving a self-supporting basket-wound coil. This eliminates iron/eddy-current losses, yielding an extremely low moment of inertia for lightning-fast acceleration in precision surgical robots and high-speed quadcopter micro-actuators.
Advantages & Trade-Offs: - **Pros**: Low cost, straightforward two-wire interface, no complex microcontroller firmware required for basic open-loop drive. - **Cons**: Carbon brushes wear out over 1,000–3,000 hours, generate electrical arcing and EMI noise, and produce thermal heat inside the rotor where cooling is difficult.
Never size your motor driver or wiring for the rated nominal run current. Under physical stall or sudden directional reversal, a DC motor draws 5x to 10x its nominal current.
3. Brushless DC (BLDC) & Field-Oriented Control
Brushless DC (BLDC) motors eliminate mechanical brushes and commutators entirely. Instead, permanent magnets are attached to the rotating rotor (either Outrunner or Inrunner), while 3-phase electromagnetic coils ($U, V, W$) are mounted on the stationary outer stator.
How BLDC Motors Operate To rotate the shaft, an Electronic Speed Controller (ESC) or 3-phase inverter dynamically switches current through the stator coils in precise synchronization with the rotor position:
1. **Trapezoidal (Six-Step) Commutation**: Uses 3 internal Hall-effect sensors or back-EMF zero-crossing detection. At any moment, 2 phases are energized while 1 phase floats. It produces high RPM and high power density, but introduces 13–15% torque ripple at low speeds. 2. **Field-Oriented Control (FOC / Vector Control)**: The gold standard for modern quadruped robots (Unitree, Boston Dynamics Spot), humanoid joints, and robotic gimbal arms.
The Mathematics of FOC: FOC measures 3-phase AC currents ($i_a, i_b, i_c$) and applies: - **Clarke Transformation**: Converts 3-phase stationary frame coordinates into 2-phase stationary orthogonal coordinates ($\alpha, \beta$). - **Park Transformation**: Converts $(\alpha, \beta)$ into a rotating direct-quadrature reference frame $(d, q)$ aligned with the rotor magnetic flux angle ($\theta$).
$$i_d = \text{Field-weakening / Flux current (driven to 0 for maximum efficiency)}$$ $$i_q = \text{Torque-producing current (proportional to commanded robot torque)}$$
Through Space Vector PWM (SVPWM), FOC produces pure sinusoidal magnetic fields with zero acoustic whine, ultra-smooth zero-speed torque control, and >92% electrical efficiency.
#include <SimpleFOC.h>
// 3-Phase BLDC Motor instance: 11 pole pairs
BLDCMotor motor = BLDCMotor(11);
BLDCDriver3PWM driver = BLDCDriver3PWM(9, 10, 11, 8);
// Magnetic Angle Sensor (AS5600 I2C / SPI)
MagneticSensorI2C sensor = MagneticSensorI2C(AS5600_I2C);
void setup() {
sensor.init();
motor.linkSensor(&sensor);
driver.voltage_power_supply = 24.0; // 24V DC Bus
driver.init();
motor.linkDriver(&driver);
// Field Oriented Control configuration
motor.controller = MotionControlType::velocity;
motor.PID_velocity.P = 0.2;
motor.PID_velocity.I = 20;
motor.PID_velocity.D = 0.001;
motor.voltage_limit = 24.0;
motor.init();
motor.initFOC(); // Align stator flux with magnetic rotor angle
}
void loop() {
motor.loopFOC(); // Run high-speed FOC algorithm (10-20 kHz)
motor.move(15.7); // Command target velocity: 15.7 rad/s (~150 RPM)
}Note: Arduino SimpleFOC bare-metal implementation configuring closed-loop velocity control over a 24V BLDC motor using magnetic angle feedback.
4. Stepper Motors & Precision Microstepping
Stepper motors are brushless DC motors that divide a full $360^\circ$ rotation into a large number of discrete angular increments called **steps**. A standard 2-phase hybrid stepper has a step angle of $1.8^\circ$, translating to exactly $200\,\text{steps}$ per full revolution.
Stepper Anatomy & Topologies: - **Unipolar Steppers**: Coils have center-tapped connections. Simpler driver circuitry (4 single MOSFETs to ground), but lower torque output because only half of each winding is energized at once. - **Bipolar Steppers**: 4 lead wires connected across two independent phases ($A$ and $B$). Requires dual H-bridge drivers, but delivers 30–40% higher torque since the entire winding volume is active.
Microstepping Principles: Instead of energizing phases in abrupt full on/off square waves, modern motor drivers (like the **Trinamic TMC2209 / TMC2208** and **A4988**) apply sinusoidal microstepping currents:
$$I_A = I_{\text{peak}} \cdot \cos(\theta), \quad I_B = I_{\text{peak}} \cdot \sin(\theta)$$
By dividing each full step into $1/16$, $1/64$, or $1/256$ microsteps: 1. Shaft vibration and mechanical resonance are eliminated. 2. Positioning resolution increases exponentially (e.g., $200 \times 256 = 51,200\,\text{microsteps/rev}$). 3. Trinamic **StealthChop2** enables near-inaudible motion, while **StallGuard4** measures back-EMF load to achieve sensorless end-stop homing without physical limit switches.
| NEMA Size | Faceplate Dimensions | Holding Torque Range | Common Robotics Application |
|---|---|---|---|
| NEMA 11 | 28 mm × 28 mm | 0.06 – 0.12 N·m | Miniature pan-tilt camera gimbals & robotic grippers |
| NEMA 17 | 42 mm × 42 mm | 0.35 – 0.65 N·m | 3D printers, SCARA arms, light desktop cartesian gantries |
| NEMA 23 | 57 mm × 57 mm | 1.20 – 3.00 N·m | Heavy CNC milling axes, agricultural rovers, AGV steering |
| NEMA 34 | 86 mm × 86 mm | 4.50 – 12.0 N·m | Industrial palletizing robot bases & heavy payload gantries |
5. RC Servos & Smart Serial Bus Actuators
A **Servo Motor** is not a distinct motor type; rather, it is a closed-loop mechatronic module consisting of an electric motor (DC coreless or brushless), reduction gear train, position feedback sensor, and error-correcting controller board.
Standard RC PWM Servos (SG90, MG996R, RDS3115) Standard RC servos receive a $50\,\text{Hz}$ PWM pulse train where the **pulse width** directly commands the output horn angle ($0^\circ$ to $180^\circ$ or $270^\circ$): - **$1.0\,\text{ms}$ pulse**: $0^\circ$ (Minimum rotation) - **$1.5\,\text{ms}$ pulse**: $90^\circ$ (Neutral center position) - **$2.0\,\text{ms}$ pulse**: $180^\circ$ (Maximum rotation)
Smart Serial Bus Servos (ROBOTIS Dynamixel, Feetech STS/SCS) For multi-joint robotic arms (6-DOF) and humanoid bipeds, standard 3-wire PWM servos become unmanageable due to wire harness clutter and zero telemetry feedback.
**Smart Bus Servos** solve this with a single half-duplex UART or RS-485 serial daisy chain: - **Daisy-Chaining**: Up to 253 servos connect sequentially on a 3-wire or 4-wire bus. - **Bi-Directional Telemetry**: Real-time reading of current position (12-bit absolute magnetic encoder), angular velocity, motor current/torque, internal temperature, and input voltage. - **Advanced Control Modes**: Velocity control, position control with acceleration profiling (trapezoidal/S-curve), and compliant current-based torque limiting.
6. Driver IC Topologies, H-Bridges & Protection
Microcontrollers (STM32, ESP32, Arduino) output logic signals at $3.3\,\text{V}$ or $5.0\,\text{V}$ with a current limit of $10–20\,\text{mA}$ per pin. Electric motors operate at $6–48\,\text{V}$ and draw Amperes of current. A dedicated **Motor Driver IC** serves as the high-power intermediary.
The Classical H-Bridge Topology An H-Bridge comprises 4 semiconductor switches (N-Channel and P-Channel MOSFETs): - **Forward Motion**: $Q_1$ (High-Side Left) and $Q_4$ (Low-Side Right) are turned ON. - **Reverse Motion**: $Q_2$ (High-Side Right) and $Q_3$ (Low-Side Left) are turned ON. - **Regenerative Braking**: Both Low-Side MOSFETs ($Q_3$ and $Q_4$) are turned ON, shorting the motor coils through ground so generated back-EMF resists shaft motion. - **Shoot-Through Protection**: Never turn ON $Q_1$ and $Q_3$ (or $Q_2$ and $Q_4$) simultaneously; this creates a direct dead short across the power rails, instantly destroying the driver. Modern ICs implement hardware **Dead-Time Insertion** ($50–200\,\text{ns}$) to prevent shoot-through.
Crucial Circuit Protection Guidelines: 1. **Flyback (Freewheeling) Diodes**: Inductive motor coils resist sudden current drops ($V = L \cdot \frac{di}{dt}$). When PWM switches OFF, magnetic field collapse creates a massive positive or negative voltage spike (often $>100\,\text{V}$). Ultra-fast Schottky diodes or low-$R_{DS(on)}$ MOSFET body diodes clamp these spikes safely to $V_{CC}$ and $GND$. 2. **Bulk Decoupling Capacitors**: Place low-ESR electrolytic capacitors ($100–1000\,\mu\text{F}$) as close as possible to the motor driver power pins to absorb voltage ripples and prevent MCU brownout resets during heavy acceleration.
Avoid obsolete BJT-based L298N drivers which drop ~2V to 3V as pure waste heat. Choose modern MOSFET drivers: DRV8833 (2A 10.8V), TB6612FNG (1.2A 15V), or BTS7960 (43A 24V).
7. Motor Selection Engineering Framework
When engineering a new robot from scratch, select your actuator technology based on this decision framework:
1. **Continuous High-Speed Locomotion (Drones, Propellers, Fast Rovers)** $\rightarrow$ **BLDC Motor** with Electronic Speed Controller (ESC). 2. **High-Torque Mobile Robot Drivetrains (Differential / Mecanum / Skid-Steer)** $\rightarrow$ **Geared Brushed DC or Geared BLDC** with rear-shaft quadrature optical/magnetic encoders and closed-loop PID. 3. **Multi-Joint Robotic Arms & Humanoid Bipeds** $\rightarrow$ **Smart Bus Servos (Dynamixel)** or **Frameless BLDC with Strain Wave (Harmonic) Reduction Gearboxes** and FOC drivers. 4. **Precision Open-Loop Positioning & Cartesian Mechanisms (3D Printers, CNC, Scanners)** $\rightarrow$ **Hybrid Bipolar Stepper Motor** with silent Trinamic microstepping drivers.
| Metric | Brushed DC | Brushless DC (BLDC) | Stepper Motor | Smart Serial Servo |
|---|---|---|---|---|
| Efficiency | 70% – 80% | 88% – 95% | 60% – 70% | 75% – 85% |
| Cost | Very Low ($) | Medium to High ($$$) | Low to Medium ($$) | High ($$$$) |
| Position Accuracy | Requires External Encoder | Requires External Encoder | Precise Open-Loop (0.01°) | Absolute Magnetic (12-14 bit) |
| Speed Range | High (5,000–20,000 RPM) | Ultra High (10,000–50,000 RPM) | Low to Medium (< 1,500 RPM) | Low (30–120 RPM output) |
| Torque at Zero RPM | Zero (unless stalled) | Zero (unless FOC commanded) | Maximum (Holding Torque) | Full Stall / Holding Torque |
| Maintenance / Life | 1,000–3,000 hrs (Brushes wear) | > 20,000 hrs (Bearing life only) | > 20,000 hrs (Bearing life only) | 5,000–10,000 hrs (Gear wear) |
| Control Complexity | Simple (1-2 PWM Pins) | Complex (3-Phase Inverter + FOC) | Simple (Step + Dir Pulses) | Serial Packet Commands (UART/RS485) |
Engineering Troubleshooting & Q&A
Q:Why do my brushed DC motors cause my microcontroller (ESP32/Arduino) to randomly freeze or restart?
This is caused by Electrical Fast Transients (EMI noise) and voltage brownouts. When motors start up, they draw large surge currents that dip the 5V/3.3V rail below the MCU threshold. To fix this: (1) Solder three 100nF ceramic capacitors across each motor terminal (Terminal to Case, Terminal to Case, and Terminal to Terminal), (2) Add a 470µF–1000µF electrolytic bulk capacitor across the motor power supply input, and (3) Use separate power rails or isolated DC-DC regulators for motors and logic.
Q:What is the difference between Stepper Stall Torque and Holding Torque?
Holding Torque is the maximum amount of external torque you can apply to a stationary, powered stepper motor shaft before it slips out of magnetic lock without continuous rotation. Stall Torque is the dynamic torque limit when the motor is actively spinning at speed; torque drops off sharply at high RPM due to coil inductance.
Q:When should I choose an Outrunner BLDC vs an Inrunner BLDC?
Inrunner BLDC motors have the rotating magnets inside the stationary coils, providing high RPM, fast thermal dissipation through the outer casing, and low moment of inertia (common in RC cars and ducted fans). Outrunner BLDC motors have the rotor on the outside of the stator, which produces significantly higher torque at lower RPM due to the larger rotor radius lever arm, making them ideal for direct-drive drone propellers and robot arm joints.
Q:How do I calculate the required gear ratio for my mobile robot wheels?
Calculate total robot weight (m), desired acceleration (a), wheel radius (r), and maximum linear speed (v). Required wheel torque is tau = m * (a + g*friction_coeff) * r. Then Gear Ratio = (Motor Nominal RPM * 2 * pi * r) / (v_max * 60). Ensure the geared output torque exceeds the required wheel torque with a 1.5x safety factor.