Driving a Motor with STM32 | Quick Tutorial (Drone Example Using GaN Controller)
Why It Matters
This streamlined, open‑source workflow lets engineers bring motor‑driven products to market faster while minimizing custom firmware effort and ensuring safety features are configurable.
Key Takeaways
- •STM32 Motor Control Workbench auto‑generates firmware for GaN inverter.
- •Users can configure PWM, dead time, and sensor settings via GUI.
- •Project files, including JSON motor/board descriptors, are downloadable from GitHub.
- •The tool supports modular, inverter, and pack hardware configurations.
- •Generated code compiles in STM32CubeIDE and flashes to the controller.
Summary
The video walks viewers through a step‑by‑step tutorial on driving a high‑power agricultural‑drone motor using an STM32 microcontroller paired with an EPC GaN inverter. It demonstrates the complete workflow from hardware setup inside a safety cage to software configuration with ST’s Motor Pilot web app.
Key points include configuring the inverter’s PWM frequency to 80 kHz and a dead‑time of 75 ns, selecting the G431 “Nuclear” control board, and defining motor parameters (pole pairs, back‑EMF constant, resistance, inductance) via JSON files. The Motor Control Workbench lets users choose modular, inverter, or pack hardware modes and automatically generates the necessary CubeMX project files.
The presenter highlights that the Motor Pilot tool reports both reference and measured RPM, and that over‑current and temperature protections can be tuned or disabled through the JSON descriptors. All project files, including Altium board layouts and motor JSONs, are hosted on a public GitHub repository for easy replication.
By automating code generation and providing a graphical interface for hardware parameters, the workflow dramatically reduces development time for embedded motor‑control applications, enabling rapid prototyping of drone propulsion systems and other high‑current drives.
Comments
Want to join the conversation?
Loading comments...