Temperature monitoring on B-G431B-ESC1

Wow, long post! :slight_smile:

First off, the B-G431-ESC1 isn’t so easy to work with, and you seem to be figuring everything out just fine.

Thanks for sharing!!

We know :frowning:
Here’s why: to use the ADC to do low-side sensing requires very precise timings aligned to the PWM, and the chip has to be configured in a very specific way - this isn’t compatible with the more primitive way Arduino’s analogRead() function wants to use the ADC.
The consequence is that we have to extend the ADC functionality in SimpleFOC to allow you to use the ADC for other things as well.

I would always set the driver.voltage_limit as a ā€œbackupā€. motor.voltage_limit should be set to about half its value.
Whether the motor.current_limit or the motor.voltage_limit is used depends on the mode and whether you have set the motor.phase_resistance…
I admit its a bit confusing at the moment, and we hope to make this more user-friendly in upcoming releases.

So the G431 will use less than 100mA of current, unless something is very wrong. It is unlikely to get very hot from anything you do on it. The heat is likely to come from the MOSFETs, or the PCB traces themselves due the current they are carrying.

If you can, check the revision of your board. We have a thread somewhere in the forum where people traced heat problems to the bad layout of a certain board version, IIRC. Something about all the current passing through a single via in the end, or something like that.

The current PID is only used in the torque-current modes. In other modes you can ignore it.

Nope, I don’t think it has many protections. The current sensing is routed to the on-mcu op-amps and comparators in such a way that I believe you could implement something, but its very hardware specific and AFAIK no one has done it yet for SimpleFOC.
So the currents would be dumped into your PSU, if BEMF makes the voltage rise above the PSU voltage… you should try to avoid that situation.

current control, once its working will allow you to keep the currents to levels you want, and thereby also control the temperatures. Once it’s working well.

But honestly, I must repeat my warning not to expect too much from this little board. It’s more of a design study on how to use the G431 for motor control than a real product for real-world use. It comes with all kinds of warnings to that effect, by the way.

For 20A on 1Oz copper, which I assume is what the board is, you need a trace width of 5mm and still get 100°C temperature rise in that copper. For a 1mm wide trace, the rise will be >1000°C, nearby solder will boil off and even the copper will melt/vaporise… 2Oz copper would improve things a bit, but really 20A is the domain of thick copper, 10mm wide traces / planes, heat sinks and much bigger MOSFETs.
Now I know the bus RMS current and the motor current are different things, but I really think you might be expecting too much from this very tiny driver…

But I am interested to learn how far you can push it with heat sink etc… I do advise getting all the control modes worked out at lower voltages / power levels first though… then you can dive into higher power experiments feeling confident the software works.