Is driving a sensorless BLDC motor at 40K RPM with DRV8302 in "closed loop" possible, using Simple Foc arduino library?

Hi! Some months ago I started a thread below:

About driving a dental mini drill motor using some ready made chinese driver alternatives. I tested and tested some and none had all the results I wanted…

So I came to this thread below here, about driving a sensorless motor with simple foc, and it was pointed that this Chinese board , DRV8302 would be able to be used to use BackEMF to sense the speed of the sensorless motor.

So, I’d like to know that, if using Simple FOC library, with an ESP32 (or another arduino), and this DRV8302 board, like in this example page below:

could I code the MCU to:

Control the motor speed in a “closed” loop by using Back EMF to sense the loss of speed?

Could I control torque also, by sensing current?

Could I set the min speed desired (and possible) and max speed?

I need fast start up time and constant torque in low speeds.

Is that all programmable and possible using this board with Simple FOC?

I don’t need positioning. Just speed and torque control.


Hey @Rimbaldo ,

So the problem is that the exact position is needed for the FOC algorithm. You can use back EMF to determine the right switching times for 6-step commutation, but this is not FOC control - less efficient, so lower torque for the same power input.

SimpleFOC does not yet implement this, but in theory you could use the back EMF to drive 6-step commutation in the way the more simple quad-copter ESCs do, software like SimonK or BLHeli work like this. Presumably you would get more speed out of an efficient 6-step implementation than FOC, because the overhead for FOC control is quite high.

To do FOC at 40kRPM, even on a very fast MCU that can handle the computation, is still a challenge:

  • at 40kRPM, on a 11PP motor (for example), the time for 1 electrical revolution is only 136µs. In this timeframe you would have to do 10-20 FOC iterations to beat 6-step (that’s a ‘guesstimate’). Each FOC iteration should have about 10 PWM cycles, so that’s only 1.3µs per PWM cycle - a PWM frequency of almost 1MHz (!!). But FETs typically cannot switch motor loads at this kind of speed. So you’d have to see what kind of max PWM frequency you can actually get, and experiment to see how well it works.
  • the position sensor will be a problem, it is required for FOC. But hardly any sensors can handle 40kRPM to begin with, and even those that can, there can be latency and comms overheads that prevent you actually reading it at this speed. The only chance I really see here is to use a super-good sensor with ABZ interface, and a MCU hardware based encoder driver (like we have for STM32 MCUs).

I really think it will be a very big challenge to reach 40kRPM. Every component of the system will have to be optimally suited for the purpose, and you’ll need to write a very optimised firmware. SimpleFOC library could be of help with this task, but it won’t do it “out of the box”.