High power driver - DRV8323

Hi there,

I’m thinking about designing a motor driver for a 63100 BLDC motor

  • 63mm diameter
  • 103mm long excl. shaft
  • 60V max
  • 100A max
  • 0.031Ohm winding resistance
  • 100 Kv

I’m looking at the STM32G431 together with a TI DRV8323RH (3-ch 60V half-bridge gate driver with 3 integrated current shunt amplifiers) driving some pretty beefy MOSFETs.

Because of the high currents involved, I’d like to have a thermistor near the power FETs and one on the motor casing to monitor to ensure it doesn’t burn up. Same goes for monitoring supply voltage.

Reading the docs and the discussions on the forum, using analogRead() re-initializes the ADC on every call and thus takes 60µs, which would mess up the current control loop if the pin your’re trying to read is on the same ADC.

Is there a way to work effectively with ADCs with STM32duino? Or a way to force the current sense channels to ADC1 and the misc stuff to ADC2? Or am I missing the point completely?

kind regards,

I don't know about DRV8323 but if you using stm32 mcu, I recommend use stm32cudeide. If you can handle DMA with adc, you can use these data without cpu usage. its only have 32bit mcu as i know. You can read this article on the internet. cheers !

How does that work with simpleFOC? I am under the impression that simpleFOC is an Arduino library (for the Arduino IDE / environment). Does it also work as a library for STM32CubeIDE?

I didn't use simpleFOC now. I make my own driver this time.. Just use SimpleFOC first time and check the problem is best way to fast one. And then implement detail code at low side code by your hand.

I guess you're right. I can always try my own code if simpleFOC doens't work out for me. Let's hope it does work out, because I'm not great at writing code >.<"

You can write your own ADC setup for SimpleFOC if you want. Just override the hardware-specific functions _configureADCLowSide and _readADCVoltageLowSide. Add __attribute__((weak)) before the originals so they'll have lower priority in linking. I have a custom I2C setup using DMA as well. I hate the HAL library, but STM did a great job with the #defines and structs for direct register access. They're in packages\STMicroelectronics\hardware\stm32\2.3.0\system\Drivers\CMSIS\Device\ST\STM32G4xx\Include\stm32g431xx.h

1 Answer

1

I’m moving forward with the schematic of the ESC.
In the final application I want to drive 4 motors, with each their own ESC. I haven’t decided yet on going with RS-485 or CAN to a host, so I put in both for now.

I’ve made the MCU pinout with STM32CubeMX, so the G431 pinout should be fine. Any issues with this schematic?

If you move U_HALL from D2 to PB5, you'll have a complete set of TIM3_CH1, CH2 and ETR to do encoder counting in hardware.

Good catch, thanks! I also noticed I'm missing the flyback diode in the buck converter on the bottom. LMR16006X isn't synchronous