BLDC Motor Controller V2
A second BLDC motor controller design aiming to fix some of the issues with my last design with more conservative specs and a more thorough design process. Using a similar DRV8320, NTTFSSCH1D3N04XL FETs, INA241 for inline current sensing, and a STM32G474 MCU. Aiming for operation at up to 24V 30A.
Specifications & Design Targets:
- Up to 24V operation
- 30A continuous current at stall, 50A+ peak phase current (transiently)
- Three-phase inline current sensing
- Phase voltage sensing for sensorless commutation
- On board encoder (MA702) to enable sensored FOC operation without any external components
- RS485 interface for sensor communication (capable of SSI over RS485 for external absolute encoder)
- CAN and serial interfaces for control
- 5V tolerant GPIO for interfacing with hall effect sensors
- Convenient form factor for mounting into a compact BLDC actuator design
- FETs located specifically for ease of cooling
- XT60 for power and MR60 for phase connections
- Specifically tuned for low ripple at a switching frequency of 24kHz
Development
Status
Currently, all features of the motor controller hardware work as intended, but not all features have firmware support yet. I decided to implement the FOC commutation algorithm and all of the filtering and controllers from scratch rather than using existing firmware or libraries such as VESC or SimpleFOC as a learning experience. Currently the motor controller supports current control mode and has an internal velocity control loop, both running at 8kHz. The controller communicates over CAN to software on my laptop - a python interface can be used to send commands and “enable” heartbeats. I also created an interface between the motor controller’s CAN messages and a Foxglove dashboard using rust for debugging and tuning the various filters and control loops.
Gallery



