ESP32 Cam & EZB

Hardware Platform
ESP32 Cam
This firmware converts an ESP32 Cam module into an EZB with a built-in ARC cam.
1) For servos in EZB mode with the camera at the same time, only pins D2, D12, D13, D14, D15 are recommended.
2) Check the <a href="/Support/Hardware/ESP32-Cam">ESP32 Cam hardware page</a> for instructions to program the firmware.
DJ has a video of how to use a servo with the esp32's GPIOs
Step 1:
First download version 3 DJ's ESP32 DOIT DevKit v1 - Firmware - Synthiam
https://synthiam.com/Firmware/DJ-s-ESP32-DOIT-DevKit-v1-YGHLAL0K4JE
then get the IP to connect to ARC from the serial monitor
Step 2:
read Esp32 Devkit V1 - Compatible EZB Robot Hardware - Support - Synthiam
Watch this video
Near the end of this video, DJ show how to add a servo - : no vibrating servo here:
https://youtu.be/CbMffZfq5cc
for a test, I first used the Led, then the servo, I used a micro servo (a little off, but), works well
remember the GPIO pins on the esp32 are the D pins in ARC servo controls
Auto-position works great
EzAng
The pins in ARC are labeled D0 - D23. The ESP32 has GPIO labeled pins, which are not in any ordered sequence. This translation chart below shows the mapping of the ESP GPIO to ARC Dx pins.
I noticed the DATA2 is a D3 and DATA3 is D4
either the cam works or the servo but not together, you are right, seems like a question for DJ
EzAng
I just used an IoTiny on connection 1 for a servo
esp32 cam on connection 0
that works
esp32 cam can't do it alone
I guess Nink will have to go this rout for now
Thanks
EzAng
https://github.com/madhephaestus/ESP32Servo
recommended pins: pins 2,4,12-19,21-23,25-27,32-33
ESP32-CAM SD Card:
Safe pins:
DATA2 = 12 (DJ implementation = 4)
CLK= 14 (DJ implementation = 3)
DATA0 = 2 (Not mapped in DJ Implementation)
Please try:
Servos:
EZB Port 3 = Board HS2_CLK (Gpio 14)
EZB Port 4 = Board HS2_DATA2 (Gpio 12)
Regarding ARC->ESP32CAM everything you need is in this thread.
EZB port mapping to ESP32 GPIO
ESP32-CAM pinout.
Schematic is here: (ESP32_CAM_V1.6.pdf)
https://github.com/SeeedDocument/forum_doc/tree/master/reg#ESP32_CAM_V1.6
Recommend pins for ESP32 servo Library used in DJ's implementation:
https://github.com/madhephaestus/ESP32Servo
ESP32 Documentation about SDCARD/SDIO implementation:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/sdio_slave.html
I picked the Gpio 14, Gpio 12 because they are safe, for example GPIO13 is a SPI/CS So will activate the SDCARD when low so not safe.
he said Several people on the interwebs are using ESP32-Cam for servos and cameras at same time so I am sure it is possible.
However I will try what you proposed
still think my best solution for me is:
an IoTiny on connection 1 for many servos
esp32 cam on connection 0 - camera
that works for me
ARC ESP32-CAM
D16 -GPIO 0 - Nothing
D5 - GPIO 13 - Crashes
D3 - GPIO 14 - Move servo wait 1 minute it moves sometimes just vibrates
D4 - GPIO 12 - servo just gets hot but release actually works :-)
a breakout with an led on each gpio. And without the camera running, turn on each io to find the mapping correlation.
I can’t seem to find a mapping document online though. Seems like someone must have thought of this you’d think?
Digital ports work fine (on/off), Read
Also, D4 == FLASH LED
Servo still doesn't work - seems the servo library uses resources of the camera. Needs more look'n at
D0, D1, D3, D16 don't work but thats fine. 5 is great and we still have TX RX
Questions
I have some servo's that work on the ESP32 but don't work on ESP32-CAM? I copied the ESP32 servo and pwm files over to ESP32-CAM but still same problem. I officially hate this module.
The Camera distortion takes a while to recover would it be a better option to put in ranges
Example
If image size is > 5000 and < 5999 compression =10
If image size is > 6000 and < 6999 compression = 12
etc
this way it recovers straight away and doesn't increment 1 at a time. When my camera looks at a solid image and moves to a complex image it takes a while to recover and when it goes the other way it takes a while to get the best quality again.
Thanks again I really appreciate you making this.
Nink
Also, feel free to modify the code in the firmware. You can upload your own firmware for the esp32 as well. Just go to your account and click My Content -> Firmwares -> Create a Firmware
If it's based on my firmware, check the capabilities that are the same in my firmware. Just add the same ones and you'll be golden.