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
Using ESC (Electronic Speed Control) with ESP32
Re: Using ESC (Electronic Speed Control) with ESP32
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
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
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
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
-
- Posts: 14
- Joined: Fri Nov 08, 2019 2:04 am
Re: Using ESC (Electronic Speed Control) with ESP32
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.
-
- Posts: 14
- Joined: Fri Nov 08, 2019 2:04 am
Re: Using ESC (Electronic Speed Control) with ESP32
I did get this working, and posted what I did in another thread:
viewtopic.php?f=19&t=20450&p=75073#p75073
viewtopic.php?f=19&t=20450&p=75073#p75073
Who is online
Users browsing this forum: No registered users and 176 guests