my problem is this:
I want to build a robot myself. I already have the following servo control components:
ESP32 and a PCA9685 to control 16 servomotors.
I have already installed the ESP32 DOIT Dev Kit v1 EZ-B and the firmware for Synthiam and a control with 1 servo via WIFI works.
how can I connect the PCA9685 to the ESP32 so that I can control all of my 16 servos?
(probably via the UART connection RX / TX).
How can I link and control the whole thing with ARC?
could someone please help me with the programming?
Upgrade to ARC Pro
Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.
here it is with the Arduino with the PCA9685 - to control each servo individually
Downloaded Mickeys and DJ's firmware from here https://synthiam.com/Support/Hardware/Adafruit-16-Servo-Shield
I modified their code, added: Adafruit_PWMServoDriver pca9685 = Adafruit_PWMServoDriver(0x40);
for one PCA9685, if you want 2 PCA9685 just change the hex to (0x41) or 3 PCA9685 (0x42) and on and on...
in setup I added:
// Initialize PCA9685
// Set PWM Frequency to 50Hz
ARC connect Arduino at 57600 in settings
If your Arduino does not have a SDA or SCL
Analog 4 -> SDA
Analog 5 -> SCL
GND to GND
VCC to 5v from Laptop computer
make sure you add a separate power supply - 5 - 7.5 V to the PCA9685 for the servos
works very good
Also, the PCA9685 does not use UART. It only uses i2c.
how should I proceed so that I (instead of an Arduino) only have an ESP32 with a PCA9685
want to connect?
I had already installed EZ-B and the firmware for Synthiam on the ESP32 DOIT Dev Kit v1 and the control with 1 servo via WIFI worked happily
Now I just want to connect the PCA9685 to the ESP32 and then control my 16 servos with the ARC program.
Is there also an (Arduino code) for the ESP32 (like the Dev v1 EZ-B)?
How can I use the firmware (https://synthiam.com/Firmware/EZ-ESP32-with-PCA9685-O3HKWLPWOIO ?
1. Is it enough if I use the connections (RX / TX) on the ESP and (TX / RX) on the PCA9685?
2. Which (settings) have to be set in the ARC for the servos?
Here's a good article that will show you how to set up the ESP32 for I2C Communication:
ESP32 using i2c
Here's your pinouts on the PCA9685:
Pinouts on the PCA9685
BTW, I've never used either of these boards. I simply pulled up the info on google and the respective manufacturers websites.
here it is again: https://synthiam.com/Firmware/EZ-ESP32-with-PCA9685-O3HKWLPWOIO
Yes, the connection with ARC via the two (PCA9685 with the ESP32) has now worked perfectly:D:D
I am really happy and motivated that I was able to carry out the various actions with my self-made robot.
Now I realized that I could use more than 16 servo connections for another robot project.
I also have a 32 servo controller (VER 3.2 from rtrobot) in my component box, which I have already used for another project.
Now I would like to be able to control this with 32 servo controllers with the ARC.
I tried to connect the connections to the ESP32 via TX / RX, but it didn't work that way.
Do you have a solution for the connection of the otherwise well-functioning 32 servo controller with the ARC program?
So for the record. I am good to go.
I hate to buzz by and ask a stupid question...but since when has that stopped me?! lmao.
I am new to ARC not to iot or other software such as Blynk.
BUT I am having difficulty and cannot find a solid answer. Downloaded the latest firmware and install/uploaded it to the esp32 dev kit. connected my pca9685 via pins next to the RX/TX pins, on my dev kit it says 22 and 21. To test the communication via i2c, I used the pca9685 example in ide. BUT when I go to make something move I am not having any luck. I added a servo via settings, set it to v0 and created a frame and action...execute it and nothing happens. Oddly enough when I click "Stop" the servo will jitter a little.
I think I may be missing something within ARC that I just don't see. BUT it looks like I create a servo object then add actions to it that I can exectute but that is not working. As I understand the firmware's description digital pins are for servo use when connected to the ESP directly, so I am assuming Virtual pins are via the i2c connection?
Any ideas, or advice...much appreciated!
Nothing would move for me until I added a "separate" 5 to 7.5 v power supply, I use into the PCA 9685
Ezb firmware devices can only use Dx ports
so you just use Dx ports and not Vx ports for your setup
I don't want anyone to do this for us, but I would love to see some sample projects that use a servo or several servos. It looks like I can load sample/example things. Gonna research more on it. I would like smooth fluid movement, without the jerking, and ability to be more precise...which is possible with the hardware because I did the arduino IDE tests.
I am also being told I should be using Steppers for more precision, but I know these can do similar...anyway.
If anyone has a project that they could share similar to this that would be sweet. The incorporating of the various things to get a good finished product is not clear from what I have been reading...and sadly youtube does not have a lot of ARC content.
Thanks for existing though.
I used DJ's new Global servo positioning feature for the smoothness of the moves for the servos
However to expand on my above comment, you may want to look into the Step/Delay and Speed Settings in the Action section sence you're using the AutoPosition panel. Adjusting these settings may give you the results you are looking for. They are not really intuitive and require some fiddling around to find the right settings.
Here is a link to how to use and adjust the movements in the AP. Scroll down for the Step/Delay Settings instructions:
It might take a bit of reading, but once you get it, you get it
The accuracy of servos will not compete with stepper motors. The stepper motor may use the same programming interface in ARC, but the accuracy is much higher.
The global servo position option is in the top menu Project -> My Robot -> Properties. See more here: https://synthiam.com/Support/ARC-Overview/Project%20Menu/My%20Robot.
by the way, if stepper motors are to be considered, here’s the robot skill manual: https://synthiam.com/Support/Skills/Servo/Stepper-Servo?id=21134
I do have some steppers from my upgrades printer. Might try integrating them once I have a handle on the use of ARC a little better.
I think I ran across the mentioned Auto Position Gait heading but it did not occur to me it was for what I was seeking. Will dig more.
After that, and messing with steps and speed, it works. Pretty smooth. Smoother if I go slow with a little delay...and moving multiple motors works well.
Now I gotta figure out how to build more stuff wanna make this battery powered and since I have a continuous servo for the base motor gotta figure out how to mount everything inside the movement zone...100% wireless...and able to rotate without tangling...which IS NOT the case currently.
Thanks so much.
Once we have this where we can use it...we will upload it for ARC's community to play with.
There’s a decent write up about types of batteries and such. Here’s the link, it’s not a long read: https://synthiam.com/Support/Get-Started/how-to-make-a-robot/power
i generally use 7.4v lipo batteries for all my robots. If the robot has an onboard pc, I use a high amp battery backup charger that you’d normally carry in a bag for charging phones on the go. They have high amperage and output 5 or 12 volts. I don’t use them for motors, I only use them for the pc. The motors i power with the 7.4v lipo