SimpleFOC suitable as dummy load for BLDC motor? for stress testing

I need to test combinations of hobby sized BLDC motors and ESCs.

I thought about using SimpleFOC as a form of a electronic brake, to apply a load. I think it would involve building a circuit with three half-bridges, magnetic absolute encoder, plus current sensing resistor somewhere, and then just run SimpleFOC in open loop current limited mode.

That all connects to a massive motor, and the massive motor is linked to the motor-under-test via either a shaft coupler or a belt

Is SimpleFOC capable of this? I am unsure how it performs, let’s pretend I have a Teensy 4.1 to run the code, can it keep up with the high RPMs expected when using a magnetic absolute encoder?

I did think about just simply shorting out a bigger motor so it acts as a brake, but I think I want even more braking force than that

I think I can also just use a disk brake from a mountain bike but that might get hot and worn out

Thanks

You could even use a home trainer for bikes but that’s more suitable for hub motors/wheels.

Using SimpleFoc you can tell the motor to excert a specific torque, so in principle it should work as you describe. To slow down the motor under test, just apply the torque in the opposite direction. Your problem will probably be the potentially generated BEMF in the breaking motor, which you will need to dissipate somehow without killing your driver.

As far as MTB disk breaks go, the good ones are fairly strong and sturdy (and expensive…). They can stand some heat, but of course, it depends on how strong the motors are that you want to test. Also, you will have very little control over the exact breaking force applied.

All you need is 3 resistors, ideally big ones. The heat still has to be dissipated, which driver boards are not meant for. You could have 3 resistors and use some mosfet switches to PWM the current through them to adjust braking force.

SimpleFOC would be useful for active braking, but it is not needed for passive braking.

Also do not try a teensy in any case. the B-G431b-ESC1 boards work reasonably well out of the box. You can get them for cheap on ebay sometimes, they are $30 from digikey $25 from newark, that’s CAD. 1.3 cad per usd.

edit: I actually remember now I made a precision braking thing about a year ago. It was a brake and a PID controller with a photointerrupter to measure RPM. One motor drove the brake, and the braking force was controlled to regulate RPM. IT worked pretty well. I used micropython an a raspberry pi pico and L298 driver board. You only need 1 L298 board. They have fairly good heat sinks but really it makes more sense to have a 1 ohm resistor or something. You can get big 1 ohm resistors on amazon.

Thanks, I have not heard of this but this actually makes life so much easier lol

Actually I was thinking I can just dump the energy back into the battery that the test motor is running on

I mean… it’s win win, if everything is normal, I don’t need resistors and the battery won’t blow up. But if I’m wrong, I discover free energy and win a nobel prize.

I don’t think there will be a case when the motors are at low RPM since if I take your advice, both sides are running sensorless

You can’t dump it back into the battery because the voltage coming out the terminals will be lower rather than higher. Nothing would flow into the battery. It would be continue to power the motor instead. You could use a different, lower voltage battery and connect that during braking. That would slow the motor down till it achieved equilibrium and then if it got any slower it would become powered.

This all assumes commutation was working properly.

Active braking is basically powering the motor in the opposite direction to it’s motion, it consumes power rather than giving it back. Regenerative braking is what you are describing, that requires basically some kind of dc-dc converter or something to increase the voltage so that current will flow into the battery rather than out. An alternator would make that relatively practical within a certain speed regime.