-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using to emulate a PCA9685 #4
Comments
Hi @dlarue I'm working on the same project. I was able to get the passthrough from the original controller working and now I was going to emulate the PCA9685 so minimum change is required on the Donkey code. Have you made any progress? |
@juano2310 I've not gone any further since the option for using the Sony PS3 controller was added and works great. Once we start going out doors and on larger tracks the RC transmitter option would probably be required. But I'm spoiled by all the buttons on the PS3 controller and would probably have to work on adding the ability for RC channels to be used for buttons/triggers to the rPi. Something you might consider as you develop the I2C API. |
Hi @dlarue, I was able to efficiently emulate the PCA9685 and bridge the RC receiver which can also take control if the RC Controller is turned on. I will publish as soon as I get some time to write the tutorial. I might even make a Raspberry Pi hat removing the need from having the PCA9685. |
That's great! Hat's are fine and can be a place to add even more features but they also add cost. Which Arduino are you using and can't it be used in the "dead bug" configuration so anyone wanting to try it needs only a few jumper wires( like the PCA9685 )? |
I had made a couple of PCBs in the past. I can get 3 for 1 dollar now plus a esp8266 for an other 2,5 and a couple of headers so a total of 4 dollars that is very competitive considering that this would replace the PCA9685 completely. |
Hello John. Did you get to publish the emulation code of the PCA9685 chip? Right now I'm working on emulating it for a project with a Jetson Nano and an Mbot robot, and it would be helpful not to have to start from zero... |
FWIW, there was work done on PCA9685 for a project which used a Teensy and I recall having used it so it was operational. But it was 2 year ago so not sure what the state of it is or if anyone is using it. For RC control use what I did was take an Arduino Leonardo based board(32u4) and read the RC receivers PWM then created a joystick HiD device and map the RC PWM to joystick movement. Almost no code changes required in the donkey software. That was added to the v3.2 codebase of donkey as an input controller type. I have no idea if it's included in the v4.x codebase. Oh ya, I added customizations for buttons and forked the repo - here is my repo https://github.com/dlarue/donkey_stuff/tree/master/teensy_hat_firmware |
I'm building a Donkey2 autonomous RC car(DIYRoboCars.com) and they use an rPi controlling the 2 RC servos via a PCA9685( I2C PWM driver). It works great except to train the neural network we have to drive the vehicle manually and record video and the PWM/Servo signals. How it's done now is it requires driving the car va WiFi connection to the rPi using a table/phone/webpage. ugh.
I want to replace the PCA9685 board with an Arduino which emulates the PCA9685 driver but can also be switched so the Arduino reads PWM signals from the real RC receiver and maps those to the same servo outputs normally driven vi the I2C interface. I'll have to add a change to the rPi/Donkey code to poll/read the PWM values from the emulator with an added method to read the current PWM settings/values.
Adafruit's library for their PCA9685 board:
https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library
If you're interested in any of this let me know.
The text was updated successfully, but these errors were encountered: