PCB Design Check - DRV8311 based BLDC Controller

Hello!

I have been inspired by previous projects such as the tiny mosquito board by @Valentine to create a mini version (16mm diameter) of my own that can fit on to the back of some tiny 16mm PM1105 motors I have found on aliexpress. I would be immensely grateful if I could get some feedback on the PCB layout/schematic as I don’t have a lot of experience PCB design. The design uses the same MCU as the original Mosquito board but swaps out the driver for a smaller DRV8311 chip that even has current sensing built in. I have also added a mezzanine connector which can be used to break out pins for programming and additional back-pack boards. I’ve put the schematic details and board screenshots below.

The board uses a 4 Layer stack up:
Signal
GND
GND
Signal + GND

2 Likes

Looks pretty good! Can’t go wrong with two unbroken ground planes.

The fault pin in the datasheet says “requires an external pullup to AVDD”, but I’m never sure if they mean it’s required to get a proper reading from the fault pin, or if the chip will refuse to run without it. And without SPI to read the fault status, I think you should connect it to a CPU pin anyway.

You’ll probably need an external electrolytic capacitor on the power input. I don’t know how people decide how much capacitance is needed, but I have some small drone ESCs with 220uF. It would be nice if you could fit ten 22uF 0805 or five 47uF 1206 ceramic capacitors on board.

STM32G031 is rather slow, especially for foc_current mode. And you’ll have to write your own lowside ADC code for it since SimpleFOC doesn’t officially support it. If you can squeeze it in, the 5x5mm G431KBU3 is much better. And I’d recommend an SPI sensor like AS5047 or AS5048 (I can never remember the difference between the two). If you search on this forum, many people start with AS5600 and have trouble with it.

Hey there Harry
Wanted to give my two cents on your schematic. I’ve made a few dozen boards using the DRV8311. Mostly just the same board several times trying to fix my mistakes lol. A few things I wanted to point out.
I think you have a mistake on the 3.3V supply coming from the DRV8311. The 3.3v regulator will not turn on unless you wake the chip from sleep mode with a logic high signal. In your diagram you’ll power up the 12v supply and then nothing will happen because the drv is still asleep. The stm won’t be able to wake it up since there is no 3.3v supply. I found this one out the hard way…



You might want to break out some UART pins for debugging (TX + RX). Its frustrating not being able to simply read some serial print statements when something isn’t working.
The 3.3v regulator is a linear style and therefore not energy efficient. When you drop from 12v down to 3.3v you have to burn off the remaining 8.7v. If your stm + as5600 draw 60ma then the regulator will be burning (8.7*0.06 = 0.5 watts). I used this before and my circuit was overheating. I had to add a heat sink to keep it running. You might consider doing a dedicated 3.3 linear regulator like the ams1117 which can handle more power dissipation. You can also use it to wake the drv from sleep.
Hope this helps.