Porting from B-G431B-ESC1 to custom board
Hello all,
I have a 20 pole pair, 100v, 120Amp, 15mOhm. 34uH, sensorless, BLDC outrunner motor.
I have had this running on the B-G431B-ESC1 dev board with 25v at 800 RPM drawing 1.5 Amps. The power supply being lab bench supply capably of 30vDC and 5Amps.
I have followed the same basic circuit layout and created a custom PCB. The main differences being a 0.2mOhm shunt, and associated voltage divider/bias resistor values and opamp gain. The buss voltage sensing I have left at 25v for now. And the MOSFET output stage is made with higher power devices, eventually with 5 sets in parallel. I am also using a STM32G431CBT6 LQFP48 for simpler prototyping. A few small differences in the pin-out are not a problem, and as far as I can see it should be compatible.
The firstly, is the STM32G431CBT6 truly compatible in this application, or have I missed something?
For the rest of the changes I have Cloned a copy of the B-G431B-ESC1 .json file, and modified the sections for current sensing. All the variables seem to make sense except "amplifyingNetworkPrating" which I have assume to be the power rating of the shunt, (but I doubt that). It won't allow modification to the processor selection.
To get cubeMX to generate the code for the STM32G431CBT6 I have started a new project with the new chip and then imported the STM32G431CBUx MC Workbench project into the new project. I then have 2 faults show up on CubeMX. ADC1 and ADC2 Clock Prescaler cannot use clock div1 and I must choose div4. I can't see anything in the data sheets to exclude div1. So after loading the project into CubeIDE, I change the div4 to div1 and all compiles fine. But again, I could be missing something that CubeX knows that I can't see.
The motor does not run as it does on the B-G431B-ESC1. I get a few PWM cycles of high current which drops the supply sharply and it stops on "Under voltage".
Any ideas as to how I should sort this out?
Thank you.
Cheers. Pete L.
