Electric Motors 101
A primer on DC and AC electric motors, electromagnetic induction, torque curves, and motor control circuits.
TL;DR
- Generate magnetic rotational force using
stator-coilsand rotor magnets. - Control motor speed dynamically using pulse width modulation
pwm-signals. - Calculate mechanical power output from
torquemultiplied by angular speed.
Motor Operating Principles
Lorentz Force LawCalculates electromagnetic force exerted on current-carrying wire in magnetic field.
force = current * wire_length * magnetic_fluxTorque and PowerQuantifies rotational torque and converted mechanical shaft horsepower.
power_watts = torque_nm * angular_velocity_rad_sMotor Constant (Kv)Specifies rotational RPM generated per volt of applied unloaded voltage.
rpm = applied_voltage * motor_kv_ratingStall CurrentMaximum current draw when rotor is completely locked at zero RPM.
stall_current = supply_voltage / winding_resistanceMotor Typologies
Brushless DC (BLDC)Permanent magnet rotor driven by three-phase electronic commutation.
commutation: 3_phase_trapezoidal_or_sinusoidalStepper MotorDivides full 360-degree rotation into discrete fractional step angles.
step_angle: 1.8_deg // 200 full steps per revolutionAC Induction MotorStator magnetic field induces current into squirrel cage rotor conductors.
slip: synchronous_speed - actual_rotor_speedDrive Electronics and Control
H-Bridge CircuitArrangement of four transistors enabling bidirectional motor rotation.
state: [Q1_Q4_forward, Q2_Q3_reverse, all_off]PWM Speed ControlVaries average voltage delivered to windings by modulating duty cycle.
effective_v = supply_v * (duty_cycle_ms / period_ms)Hall Effect SensorsDetects rotor magnetic pole positions to coordinate phase switching.
feedback: 3_digital_sensors_spaced_120_degTips
- Select a
brushless-bldcmotor whenever high efficiency, long bearing life, and low maintenance are required. - Add a flyback
freewheeling-diodeacross DC motor terminals to suppress destructive inductive voltage spikes.
Warnings
- Never stall an electric motor under full voltage to prevent rapid thermal winding
insulation-burnout. - Avoid exceeding rated continuous current to maintain neodymium rotor magnet
demagnetizationlimits.
In Practice
Calculate throttle duty cycle from desired motor RPM and voltage.
- Measure input battery pack supply voltage.
- Query motor Kv rating from manufacturer specification.
- Calculate theoretical maximum unloaded rotation speed.
- Output corresponding PWM duty cycle percentage to ESC.
def compute_esc_throttle(target_rpm, supply_v, motor_kv):
max_rpm = supply_v * motor_kv
if target_rpm >= max_rpm:
return 1.0 # 100% duty cycle
throttle = target_rpm / max_rpm
return round(throttle, 3)FAQ
Brushed motors use mechanical carbon brushes to alternate current, leading to friction and wear over time. brushless-bldc motors use electronic controllers to switch current across stationary stator coils, delivering superior efficiency.
As the rotor spins, its coils generate a counter-electromotive voltage (back-emf) opposing the supply voltage. As speed increases, back-EMF rises until it balances supply voltage, establishing the motor maximum unloaded RPM.
Choose a stepper-motor for open-loop precision positioning at low speeds like 3D printers. Choose a closed-loop servo-motor when high speed, smooth continuous torque, and dynamic error correction are needed.