Can SimpeFOC be used as a normal ESC?

Is it possible to use SimpleFOC to drive the motor run at very high speed as a model airplane ESC did?

Based on my experiences, yes.
The SimpleFOC library is just a toolbox to create your own project.
Even if the first versions had been more or less for positioning tasks, meanwhile there are some features that support typical RC applications.
I have good experiences with the new possibilities like hall-sensor support or Trapezoid_120/150 commutation.
But frankly speaking, driving an outrunner with attached propeller is basic and can be perfectly handled by cheep ESC without a lot of software. Obviously this is not the core-mission of SimpleFOC.

In my opinion it is possible but could be achieved much easier.

But what I learned from SimpleFOC the difference between FOC control and cheep ESC control is that in FOC control mode all 3 phases working simultaneously to generate phase displacement to drive the rotor, while in ESC mode only 2 phase working in the same time so need commutation to switch to another 2 phase. When the motor runs in high speed let’s say about 12000rpm, I think the MCU does not have enought performance to generate the sine wave. So what I think is, is possible to use FOC mode in low speed mode, and switch to ESC mode in high speed.

The commutation is limited more by the encoder limits than simplefoc. It’s just a math library and any 32bit mcu should be able to run it fast enough to commutate tens of thousands of rpms. It’s more about 1) how fast can the encoder go? 2) how fast can the driver chip go?

I tried to summarize this kind of thinking in the following spreadsheet, which should give you an idea of which part of the system is limiting your RPMs in FOC mode…

I think its basically the rate at which you can get data out of the sensor, which is what most limits the FOC iteration rate on a fast MCU.

I don’t have ADC sampling timings (for current sensing) or FET limits of the driver in there yet… let me know if you have any feedback or spot any errors, should you take a look…

1 Like

@runger, @Roiki, When the motor in high speed the FOC controller must not only depends on the encoder, maybe add a BEMF circuit as usually the ESC does, it connect to a comparator that will trigger the commutation signal.

That’s true, and would be a nice feature, but depends on a very specific hardware (3-shunt sensing, comparators) and can only work with 6-PWM driving. So its an option only for some very specific board designs.

Also, a comparator based design would be good only for 6-step commutation, not FOC, so to make it work with SimpleFOC you would also need really fast analog in to measure the currents.

All in all, a worthwhile project, but not an easy one, I think.

Regards from Vienna,