# Can SimpeFOC be used as a normal ESC?

**URL:** https://community.simplefoc.com/t/can-simpefoc-be-used-as-a-normal-esc/394
**Category:** Uncategorized
**Created:** [December 31, 2020, 4:37pm UTC](https://community.simplefoc.com/t/can-simpefoc-be-used-as-a-normal-esc/394 "2020-12-31T16:37:49Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![zhangzq71](https://community.simplefoc.com/user_avatar/community.simplefoc.com/zhangzq71/32/117_2.png) [@zhangzq71](https://community.simplefoc.com/u/zhangzq71)
#### Post date: [December 31, 2020, 4:37pm UTC](https://community.simplefoc.com/t/can-simpefoc-be-used-as-a-normal-esc/394/1 "2020-12-31T16:37:49Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Juxo](https://community.simplefoc.com/user_avatar/community.simplefoc.com/juxo/32/61_2.png) [@Juxo](https://community.simplefoc.com/u/Juxo)
#### Post date: [January 1, 2021, 1:31pm UTC](https://community.simplefoc.com/t/can-simpefoc-be-used-as-a-normal-esc/394/2 "2021-01-01T13:31:40Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![zhangzq71](https://community.simplefoc.com/user_avatar/community.simplefoc.com/zhangzq71/32/117_2.png) [@zhangzq71](https://community.simplefoc.com/u/zhangzq71)
#### Post date: [January 1, 2021, 2:52pm UTC](https://community.simplefoc.com/t/can-simpefoc-be-used-as-a-normal-esc/394/3 "2021-01-01T14:52:48Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Roiki](https://community.simplefoc.com/user_avatar/community.simplefoc.com/roiki/32/498_2.png) [@Roiki](https://community.simplefoc.com/u/Roiki)
#### Post date: [January 3, 2021, 3:32pm UTC](https://community.simplefoc.com/t/can-simpefoc-be-used-as-a-normal-esc/394/4 "2021-01-03T15:32:32Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![runger](https://community.simplefoc.com/user_avatar/community.simplefoc.com/runger/32/395_2.png) [@runger](https://community.simplefoc.com/u/runger)
#### Post date: [January 3, 2021, 5:50pm UTC](https://community.simplefoc.com/t/can-simpefoc-be-used-as-a-normal-esc/394/5 "2021-01-03T17:50:54Z")

</div>

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.

> **[Simple FOC speed calculator](https://docs.google.com/spreadsheets/d/1aVQvmaOjbVIXINGfmBnhFFUfVl_7j_lM3pWwlZQr0DM/edit?usp=sharing)**
>
> This Sheet is private

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…

---

<div class="post-metadata">

### Author: ![zhangzq71](https://community.simplefoc.com/user_avatar/community.simplefoc.com/zhangzq71/32/117_2.png) [@zhangzq71](https://community.simplefoc.com/u/zhangzq71)
#### Post date: [January 5, 2021, 8:28am UTC](https://community.simplefoc.com/t/can-simpefoc-be-used-as-a-normal-esc/394/6 "2021-01-05T08:28:47Z")

</div>

@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.

---

<div class="post-metadata">

### Author: ![runger](https://community.simplefoc.com/user_avatar/community.simplefoc.com/runger/32/395_2.png) [@runger](https://community.simplefoc.com/u/runger)
#### Post date: [January 5, 2021, 12:12pm UTC](https://community.simplefoc.com/t/can-simpefoc-be-used-as-a-normal-esc/394/7 "2021-01-05T12:12:40Z")

</div>

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,

Richard
