Page 1 of 1
Using ESC (Electronic Speed Control) with ESP32
Posted: Tue Dec 26, 2017 6:06 pm
by meslin
Hi all,
I would like to know how to control a brushless motor with ESC using ESP32. Is there a library? I used Servo.h to control them with Arduino, but a could not find a library like that to use with ESP32. Can you help me, please!
Thanks in advanced!
Alex
Re: Using ESC (Electronic Speed Control) with ESP32
Posted: Wed Dec 27, 2017 8:23 pm
by ESP_igrr
You can generate a PPM signal needed by ESCs using a variety of ways on the ESP32. RMT peripheral, which has 8 channels, is a good default choice..
Re: Using ESC (Electronic Speed Control) with ESP32
Posted: Fri Dec 29, 2017 4:09 pm
by clarkster
Also try using the LED PWM peripheral. It's simple to use. The ledc example included with the ESP-IDF gives you a great starting point.
Re: Using ESC (Electronic Speed Control) with ESP32
Posted: Tue Jan 02, 2018 11:58 pm
by meslin
Hi ESP_igrr,
I forgot to mention that I'm totally new to ESP32...
I googled for RMT peripheral and ESC and I got no results (sorry, I don't know what is RMT peripheral). Do you know a link for a tutorial?
Thanks!
Alex
Re: Using ESC (Electronic Speed Control) with ESP32
Posted: Sat Apr 17, 2021 9:22 pm
by JacktheRipper
Brushless motors and the ESCs that drive them are very complex. The discussion above falls well short of providing enough information to get them to work with an ESP32. With a standard Arduino, this complexity is handled within the ESC.h library which uses the Servo.h library to arm and then set speeds for the motor. Unfortunately, these are avr-only libraries, and the ESP32 does not seem to have equivalent ones, in particular the ESC.h library. It's much more complicated than just sending a PWM signal to the device. In ESC.h, there's a specific arming command that must be sent first, then specific calls to set the speed of the motor. This tailors the resulting PWM signal in a specific, very complicated way. I could find no equivalent library for the ESP32.
Re: Using ESC (Electronic Speed Control) with ESP32
Posted: Tue Apr 20, 2021 1:21 pm
by JacktheRipper
I did get this working, and posted what I did in another thread:
viewtopic.php?f=19&t=20450&p=75073#p75073