Using Adafruit PCA9685 to control an ESC. ¿Possible?

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Liosus
 
Posts: 2
Joined: Tue May 11, 2021 5:15 am

Using Adafruit PCA9685 to control an ESC. ¿Possible?

Post by Liosus »

Hi, I am developing a project about a 5G wireless car. I am using the Nvidia Jetson Nano as a microcontroller, but I recently discovered that it does not have the technology to easily generate a PWM signal. So I read on the Nvidia forums that the PCA9685 would be a nice option to move the servo and I have seen many people who have already implemented it. My problem is that I do not only have a servo, I also need to move a motor, so I have to send the PWM to the ESC too (I am using the Traxxas Velineon VXL-4s Waterproof ESC with the Traxxas brushless 3500KV 1/10 VXL-3S TRA3351R motor). However, I haven't seen anybody moving a motor or sending PWM signal to an ESC to move a motor. I thought that, as in the back of the code, with the ServoKit we generate PWM signal, I could maybe map the PWM signal with the input as an angle to move the motor. For example, with the line of code

Code: Select all

kit.servo[0].angle = 90
the motor will stay without moving,

Code: Select all

kit.servo[0].angle = 180
would correspond to maximum speed forward and

Code: Select all

kit.servo[0].angle = 0
would correspond to maximum speed forward. As I understand, this input angle corresponds to a PWM signal in the range of [1000, 2000].
But I am not sure if I am right, so my question is if this would be possible.

Thanks!

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Using Adafruit PCA9685 to control an ESC. ¿Possible?

Post by adafruit_support_bill »

Most hobby type ESCs are designed to interface with Radio Control receivers, so they use the same type of control signal as an RC hobby servo. The PCA9685 can generate these signals.

The 'standard' (though not quite universal) is a 50 Hz refresh rate and a pulse width between 1000 and 2000 uS. This corresponds to 0 and 180 degrees for an RC servo and full reverse to full forward speed for CR servos and ESCs.

One possible issue is the signal level. The PCA9685 output signal is the same level as the supply voltage. So if you are using it with a 3.3v processor, it will be 3.3v. We have seen some servos and ESCs that prefer a 5v signal.

User avatar
Liosus
 
Posts: 2
Joined: Tue May 11, 2021 5:15 am

Re: Using Adafruit PCA9685 to control an ESC. ¿Possible?

Post by Liosus »

Thanks for your response!

About the signal level, I think that wont be a problem, I can supply with 3,3 and 5V.
But the problem I see is that, the ESC works at 100Hz, could I program the 9685 with this frecuency for the ESC and 50Hz for the servo at the same time?

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Using Adafruit PCA9685 to control an ESC. ¿Possible?

Post by adafruit_support_bill »

About the signal level, I think that wont be a problem, I can supply with 3,3 and 5V.
If using with a 3.3v processor and 5v VCC, you will need an i2c level shifter between the processor and the PCA9685.

The base frequency for the PCA9685 applies to all 16 channels. That said, most servos tolerate a fairly wide range of update frequencies. Some of the digital models will handle well over 100 Hz. So you might be able to find a frequency that works for your servos as well as your ESCs..

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”