Free shipping on orders over $99 · Prices locked while stock lasts
SupplyDealBroker

Components

PWM Motor Control Basics for Makers

How pulse-width modulation controls speed for motors and LEDs.

· 3 min read

Key takeaways

  • PWM switches power on and off rapidly.
  • Duty cycle sets average power.
  • Motors need a driver — never connect directly to the MCU.

What PWM is

By switching quickly, the average voltage is set by how long the signal is on.

Hardware timers

STM32 timers generate precise, jitter-free PWM on many channels.

Motor drivers

Use an H-bridge or ESC between the microcontroller and the motor.

Pro tip: Add a flyback diode or use a driver with built-in protection.

Frequently asked questions

Products mentioned in this article

STM32F411 Black Pill (5-pack)
-41%

Components

STM32F411 Black Pill (5-pack)

$26.40

$45.00

Shop the category:Components →

Keep reading