2023-08-07 05:16 PM
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.
2023-08-07 06:45 PM
And the MOSFET output stage is made with higher power devices, eventually with 5 sets in parallel.
How is the MOSFET driver circuit? This B-G431B-ESC1 board has 3 schematic versions, but it still seems to be only 1 MOSFET for each driver (L6387ED IC). Note that the MOSFET Gate has a high capacitance for high capacity models, placing several in parallel might need appropriate driver circuit as well.
2023-08-07 07:00 PM
Hi @RhSilicon and thanks for your reply.
Yes, this is the first prototype, at first investigation I believe the gate capacitance, feed resistor and the drive chip can do it. But if the switching transition is too slow, ie, too much heat, I'll have to change the drive circuit. At the moment I have only one set of mosfets, so that should be OK for now.. I'll will be working at low voltage and current until I get it moving.
I'm going to get a small motor and create another project for that and test again, that should reduce the high current and so the low volts error. Should have done that first, but none available right now.
Cheers.
2023-08-07 07:16 PM
On the STM YouTube channel there are several videos that might be interesting about motor control:
https://www.youtube.com/@stmicroelectronics/search?query=MOOC%20-%20Motor%20Control
I don't know if it can help in your case, but I found these videos about advanced debugging:
https://youtube.com/playlist?list=PLnMKNibPkDnEDEsV7IBXNvg7oNn3MfRd6
2023-08-07 07:29 PM - edited 2023-08-07 10:24 PM
Thanks again, the Motor Control series I have gone through, but I'll have a good look at the debugging series.
P
edit,
https://youtube.com/playlist?list=PLnMKNibPkDnEDEsV7IBXNvg7oNn3MfRd6
Good series covering SWV, which I did not include in my PCB layout. I think the B-G431B-ESC1 has a conflict when using motor pilot. But maybe I can work around that in my next iteration.
2023-08-08 01:16 PM
Yes, unfortunately I also learned about these features after making the custom boards, advanced debugging would have helped a lot.
2023-08-09 03:58 PM
Thanks for your reply, feel less lonely here. Not much of a forum user myself, and I think I'm doing it wrong. Will try posting specific single questions. Cheers. P
2023-08-24 10:17 PM
I am also doing same, I have Power board with STM32G474. I just started few days back,
I am unable to run motor on B-G431-ESC1. Can you share your json file for the board. I did some manual coding in CubeIDE to test the board with simple 6 step commutation and other things like busvoltage, temperature, pot measurements this worked for me but very inefficient way.
Can you share your software versions MCSDK, CubeMX and CubeIDE. I installed it but getting error opamp.h missing and many other errors for code generated using MCSDK.
1. Please share few json file for the board.
2. Codes if possible
3. Version details of setup MCSDK, CubeIDE and CubeMX that is working for you. I am unable to run motor profiler.
2023-08-28 02:30 AM
Hello @Manoj Thakur I have not got this working yet, so anything I say may be misleading.
I solved one problem with some prompting in this thread;
Not sure if that will help you.
I also could not use motor profiler, but otherwise I am using all the latest versions at the time of writing this.
If I get it working I will post back what I find.