stevehaze
United Kingdom
Asked
Resolved by DJ Sures!
Hi DJ and co...
Thanks for all the hard work with the recent ARC updates. I've recently added an ESP32 to my InMoov to control some of the servos using Arc.... And I've noticed that the servos don't rotate the full 180 degrees when connected to the ESP32
Example..... Neck up/down servo on InMoov rotates full 180 degrees when connected to an EZ-Bv4/2.... Only rotates about 90 degrees when connected to ESP-32.
I'm sure this is my own knowledge gap again...but is there anything I need to change in ARC or in the ESP32 Firmware?
Related Hardware Esp32 DevKit v1
When you go into the servo control by clicking the three dots "..." check to see if you have that servo's Min and Max set correctly.
That's all I can think of because I don't know anything about theĀ ESP-32. Are there settings on that board or a script operating it you need to adjust?
Min and Max all set correctly....
But....That's what I'm asking....I can't see anything....but maybe in the Arduino Code for the EZ-B/ESP32 firmware ??
Maybe DJ can help?
That's the fun of open source arduino. You never know if it'll work or not. Kind of like a kinder egg surprise.
There's a file in the firmware download called ESP32_Servo.h. In there, is a section for the min and max pulse width of the servo. I don't know if it actually works or not, or how accurate it is. But modifying those values may produce some results. Give it a try...
arduino documentation:
https://www.arduino.cc/en/Reference/ServoAttach
Oh - and it appears the ESP32Servo library supports that syntax
So I googled the PWM ranges for my servos....the JX PDI 2060MG... JX PDI 2060MG MAX PW: 650-2350 STD PW: 850-2150
Changed the code as above and now get 180degrees.
I have a mixture of servo makes/types coming from that ESP32, so will probably have to specify the ranges individually for the servo types...but that's definitely the source of the problem. Some fine tuning to go...but problem mostly resolved.
Thanks for the help.