Electronic Speed Controller – BLDC Motor
Description
This was a project that consisted of a a single three-phase BLDC Motor electronic speed controller (ESC) powered by a STM32 NUCLEO Board. The motor was controlled using 6 PWM signals with a time period of 20ms sent from the NUCLEO board. To actually turn the motor, a 6 phase commutation (Phase A (Red Motor Wire) is ‘A”, Phase B (Yellow Motor Wire) is ‘B’, and Phase C (Black Motor Wire) is ‘C’) in which the phase changes were done using a changeable delay. There was also protection diodes on each of the 6 MOSFETS to avoid current going backwards into the microcontroller. Additionally, each gate of the 6 MOSFETS had a pull-down resistor to ground to avoid each MOSFET’s gate being driven even after the PWM signal is turned off.
Note: The above video was done as a prototype for my PCB build to ensure that it would work.
Parts
- STM32 NUCLEO Board
- 3-PHASE BLDC Motor
- 6 IRFZ44N MOSFETS
- 6 1N4007G Diodes
- 6 Pull-Down Resistors (~50 Ohms)
Diagrams
Future
In the future, I plan on designing a PCB with the 3-phase H-Bridge circuit, and plan on using a 6-channel gate driver as the current setup of driving the gate of the MOSFET with a 3.3V input just barely allowed the drain and source to have current flow. This limited the maximum speed of the BLDC motor before the MOSFET becomes vulnerable to internal damages, and also resulted in extremely high temperatures despite low speeds. Additionally, instead of using delays to change the active phases of the BLDC Motors, I would like to utilize the back EMF of the BLDC Motors to commutate the motor, and will do this using comparators to detect the zero-crossing point of the back EMF voltages.
PCB
Currently, I am working on a an BLDC Motor Electronic Speed Controller/Inverter PCB. This PCB is a 4-layer board, with high power signals on the top plane and low power signals on the bottom plane, with a power plane on the 2nd layer and a ground plane on the 3rd layer.
Components:
1 x STM32G474RBT3
6 x STM32G474RBT3 (1-Channel MOSFETs)
1 x DRV8328DRUYR (6-Channel Gate Driver)
1 x SSA2512L0M50FWR (Current Sensing Resistor)
1 x INA181A1IDBVR (Current Sense Amplifier)
6 x 0.1uF X7R Capacitors
3 x 1.4nF X7R Capacitors (Used for a low pass filter to the comparators to get rid of high frequency noise that is generated from the high frequency commutations.
1 x 470nF X7R Capacitors
2 x 22uF X7R Capacitors
1 x 2200uF Electrolytic Capacitor (between Battery Terminals)
1 x DSC1001CC1 (STM32 External Clock)
22 x Resistors (Used for Back EMF, Current Limiter on MOSFET Gates, Operational Amplifiers, Linear Voltage Regulators, and LED for debugging)
Note: The Back EMF will be inputted into the STM32’s internal analog comparators.
STM32 Connections
Gate Driver Connections
MOSFET Connections
Back EMF Resistor Connections
Current Sensing Resistor Connection
PWM Input Pad and Current Sensing Output Pad
BLDC Motor Output Pads
Power Management
STM32 Serial Wire Debugger
STM32 External Clock