What if you could have a motor spinning smoothly and reliably in less than a minute , without rewriting your code or second-guessing your timing?
When it comes to motor control, timing is critical. Improper commutation leads to unstable motion, inefficiency, and can even harm your hardware. While many microcontrollers can output PWM signals, achieving precise, efficient, and safe motor control demands more than a generic timer and some interrupt routines.
This is exactly where the AVR EB microcontroller stands out.
Unlike standard MCUs adapted for motor tasks, the AVR EB is engineered specifically for motor control. It boasts specialized hardware peripherals dedicated to signal generation, waveform shaping, timing accuracy, and fault protection, all operating independently from the CPU. The result? You can go from setup to a smoothly spinning motor in under a minute.
The Dynamic Duo: TCE and WEX
At the heart of this motor control magic are two integrated peripherals:
Timer/Counter Type E (TCE)
This 16-bit timer is purpose-built to generate high-resolution PWM signals tailored for precise motor management. What sets TCE apart is its built-in logic for synchronizing multi-phase waveforms, ensuring your motor phases operate seamlessly together.
Key Highlights:
- Supports edge-aligned, center-aligned, and dual-slope PWM modes
- Drives up to four synchronized waveform channels
- Offers compare match timing at waveform top, bottom, or center
- Provides up to 8x resolution enhancement for ultra-smooth low-speed control
TCE’s sub-microsecond precision smooths out torque delivery and cuts down electromagnetic noise - all without complex software workarounds.
Waveform Extension (WEX)
WEX complements TCE’s output by refining PWM signals to make them safer and ready for driving power stages.
- Automatic insertion of dead time to prevent short circuits (shoot-through)
- Generates complementary waveforms ideal for H-bridge and full-bridge drivers
- Enables custom pattern sequences supporting various motor configurations
- Monitors hardware inputs for faults and immediately shuts down outputs if needed
This hardware-level protection means you don’t need extra external circuits or CPU-managed safeguards - your signals leave the MCU ready and safe.
Analog Protection Built In
For applications needing real-time analog feedback or protection, the AVR EB integrates high-speed Analog Comparators and a stable internal Voltage Reference. These components monitor phase currents and voltages instantly. Combined with the Event System and WEX, they enable immediate shutdown on fault detection, all without firmware polling or ADC delays.
Start Spinning with the AVR MCU Motor Control Library
All this hardware capability is easy to harness with the AVR MCU Motor Control Library available via MPLAB® Code Configurator (MCC). The library simplifies configuration, letting you:
- Add the Motor Control Library in MCC
- Select your commutation method (Trapezoidal or Sinusoidal)
- Input your motor’s basic parameters like pole pairs and startup current
- Generate the code and flash the AVR EB
No manual tweaks, no trial-and-error waveform tuning. The library pre-configures fault protection and motor control logic.
For testing with real hardware, combine the AVR EB with the Multi-Phase Power Board (MPPB), featuring gate drivers, current sensing, and protective circuits. It supports motors up to 50V (or 24V/10A), perfectly matching the AVR EB’s outputs.
Try Before You Build Online!
Experience the AVR EB motor control firsthand with Microchip Try , a real time online demo that lets you control a live motor on a remote board. Change speed, switch commutation styles, and see the real-time response - no hardware needed.
Purpose-Built for Motion
The AVR EB is not a generic MCU that “happens” to handle PWM, it’s crafted specifically for motor control. With precise multi-phase PWM from TCE, safety-enhanced waveforms from WEX, and optional analog protection, it empowers you to develop smoother, faster, and safer motor solutions - all with minimal effort.
Walkthrough:
Check out the YouTube video here
Get your motor spinning in less than a minute!