BLDC Motor Controller Hardware

After using the B-G431B-ESC1 development board as a testbed for BLDC motors, I decided to make a more purpose-built development board for me to experiment with servo control of hobby BLDC motors, and maybe try to run some sensorless control algorithms. 

The goal for this motor controller is to have a 3 phase 40V / 25A H bridge, 3 phase current sensors, and a magnetic encoder all feeding into an STM32 MCU that is capable of running the control algorithm as well as all of the debugging overhead that I will need to troubleshoot the system. If I can keep the overall price of this board low enough, it could become a great general purpose ESC for future robotics projects.


After looking at the STM32G431CB that I am currently using in the B-G431B-ESC1 development board and realizing that it does not have enough GPIO to add in a few UART communication channels and an SPI encoder, I browsed LCSC until I found the STM32F401CCU6. At ~$2/pc and offering most of the features of the STM32G431CB minus the second ADC, higher clock frequency, and CORDIC unit it is a good middle ground between spending a lot on an MCU and having enough features to run a single motor. 

Next I decided to use the Fortior FD6288 for an H bridge driver. I have seen this H bridge driver on several BLHeli32 ESCs and driving all six MOSFETs from a single chip seems to save a lot of board space. The documentation for this chip isn't the best as the only version I could find is in Chinese, but I was able to figure it out. The total footprint with all of the extra components is very small for what this driver does, and the chip was only $0.60/pc, keeping the overall cost of this project low.

I found the CSD18543Q3A MOSFETs from Texas Instruments for the H bridge, with a 60V drain-to-source maximum voltage I can get a little bit of voltage overhead in case of motor overspeed or over inductance events if the bus voltage is kept at 40V. Additionally it has a low gate charge and on state resistance so it will be easy for the FD6288 to drive this MOSFET and the board shouldn't be getting too hot from power losses in the H bridge. At the desired 25A phase current, this chip would be dissipating 5W, which I believe a well designed aluminum heatsink can handle.

A novel component of this development board that I have not seen before is that the three current sensors have a sample-and-hold circuit buffering the input to the microcontroller. This allows the microcontroller to precisely time when the phase currents are sampled and ensures that all three samples are simultaneous. With a single ADC on the STM32F401CCU6, the currents would otherwise have to be sequentially sampled and the H bridge would have to be held in a state where all three phases are being pulled to ground for the duration of the measurement because the current sensors are on the low side. The addition of this sample and hold circuit allows the MCU to sample the currents at the specified time then read them as the single ADC allows.

After drawing up the schematics and laying out the PCB, I sent this board to JLCPCB panelized as 3 boards with V groove cuts. This puts the board in a size range where the single side containing all of the components could be placed using the SMT service in the future if I like the design and want to use it for future projects.

Comments