Another B-G431B-ESC1 fried!

At least this time I know exactly when it happened: when I tried to slow down the motor by hand (kinda hard).

It did a better job fighting back than before, but the wattage drawn, I saw, was way greater than I felt the motor giving me. Just got warm.

Seems the board couldn’t take the heat? That or the over voltage protection and over current protection don’t work because of how SimpleFOC is configured, the same way reading the NTC doesn’t work.

Still happy the board works, and maybe I’ll get it to fight better with more PID tuning, but still kinda disappointed there’s no power dump resistor saving my board right there.

Anyone thought of making a similar board like this themselves? I see that all the STM32 chips come manufactured with a bootloader, but ST-Link is proprietary, so I don’t think I’d get my hands on the code for the daughter board’s ST-Link V2.1. No debugging.

As far as I know current and voltage limits should always work irrespective of coniguration as long as voltage and current sensors are read correctly. Maybe you can try to check if the values are read correctly with your code and config if you get a new one?

I thought we had a way to read the temp sensor?

Brake resistors can save your board from dying to bus overvoltage when you drive the motor by hand (or by inertia). As far as I know it shouldn’t do anyting in a situation where you just increase the load (slow it down by hand) but I could be mistaken.

You should be able to debug the STM32G431CB without an ST-Link, the product page lists SWD and JTAG support. The B-G431B board gives access to SWD via a pad close to the tab connecting the two boards together.

yes, but there is a difference between this and a protection. The SimpleFOC library implements control including voltage and current limiting, but this is in software and executes at the frequency of the call to motor.move() - this is very different to a hardware-based protection function, which kicks in immediately on detection of a out-of-bound situation.

no, quite apart from possible dynamic effects from suddenly stopping the motor, the algorithm itself will of course kick in and begin to increase the torque according to the PIDs you’ve set. So you go from an unloaded situation with small currents needed to reach the set speed to a heavily loaded situation where high currents are flowing trying to overcome the stalled motor.

If the limits are not set sufficiently conservatively, and the motor and PSU permit the currents the board will burn itself up in absence of other protections.

On STM32 you talk to SWD via an ST-Link. But the B-G431-ESC1 has a built-in ST-Link on a daughter-board (which you can break off, but I assume @Kacko hasn’t). So you can just connect via USB to its built-in ST-Link.

Check its documentation:

No, this is simply a case of these protections not being implemented at all. They depend on software support in the case of the B-G431-ESC1, unlike other drivers where they are implemented entirely in hardware. So since SimpleFOC is a generic library, we don’t have support for this rather hardware-specific feature.

:slight_smile: for sure, many of us here have made various driver boards. Although making them as compact as the B-G431 is certainly a challenge!

No no, this is not a problem. The debugging functionality is built-in to the STM32 MCU, and the ST-Link is available as a separate part you can buy. An ST-Link v3 Mini doesn’t even cost much at all. So all you have to do on your custom board is route out the SWD or JTAG pins and you’re good to go :slight_smile:

Yes, I should have added the caveat that the built in library protection is software based and can only react on excursions past the limits on timescales larger than the loop duration. My thought was that this (software based) protection should however work irrespective of simpleFoc configuration. I interpreted the original message as saying that @Kacko thought that in his situation his simpleFoc configuration somehow disabled this (software based) protection. Though with your reaction I now see that there might be a possibility for (hardware based) protection on the B-G431B which is not configured by simpleFoc and which Kacko might be referring to. I’m not familiar enough with the board to know whether it has such (hardware based) protection capabilities though and failed to consider that possibility in my original reply and only considered the built in simpleFoc (software based) protections.

Yes of course, if you increase load and set a speed target the currents will increase, possibly damaging the board if it’s not sufficiently protected. My point was that a load dump/braking resistor won’t save your board in that scenario. If I understand correctly a braking resistor is meant for when the motor is driven externally, generating a voltage across the driver circuit which can be shunted to the braking resistor to save the board from bus overvoltage.