Asked

Alternative To Ezrobot Ezb For Robot Head Project

My course has primarily focused on robotics projects using the EZ-B controller and a camera for real-time interfacing. With recent developments, I am planning to create an additional video that incorporates Synthiam's support for other types of controllers. Although I've successfully flashed an alternative controller, it lacked compatibility with camera integration and Wi-Fi capabilities. The absence of an onboard computer limits the use of a USB camera, posing a significant challenge.

This dependency on specific components like the EZ-B, IO Tiny, and cameras can be problematic. For my course project, Mecha Morphix, which involves controlling five servos, the Arduino Mega seems excessive. I am in search of a suitable controller, compatible with Synthiam ARC, that includes both Wi-Fi and camera support to effectively replace the EZ-B.

I noticed that the ESP32 with a camera is listed among the supported controllers for ARC. Has anyone experimented with using the ESP32 in conjunction with a camera for such applications? Any insights or experiences would be appreciated.



Related Hardware (view all EZB hardware)
ESP32 Cam by Espressif
ESP32-CAM as an EZB for Synthiam ARC: stream video, control GPIO/servos, AP/Client WiFi, and ARC D0-D23 to GPIO pin mapping.
Wi-Fi
Servos Varies
Camera
Audio
UART Varies
I2C
ADC Varies
Digital Varies

Related Robot Skills (view all robot skills)
ESP32_MPU6050 by Shawn Miller
ESP32/Arduino EZB firmware with MPU6050 support: provides accelerometer angles and Yaw/Pitch/Roll gimbal servo values for stabilization and scripting
Bridge ARC to Lynxmotion SSC-32: maps V0-V31 to SSC-32 channels for reliable, high-performance serial control via USB, EZB/Arduino UART.

ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

Author Avatar
PRO
Synthiam
#193  

Yeah good point - Will's firmware could be older, he didn't specify. Will what version and firmware are you using on the esp32cam?

I tested on my bench here and there's no camera delay or servo delay. Seems to work pretty good here even with the low baudrate of the UART0

Author Avatar
PRO
Synthiam
#194  

oh yeah re-read the post and he did specify it's v12 in an edit. that's the latest.

maybe something's browning out? maybe the incorrect camera is specified in the #define? not sure

Author Avatar
PRO
Synthiam
#195  

Did you verify that your board and library versions also match what's in the INO file before uploading the firmware?

  Compiling Instructions:
  - This was designed with....
     Board: ESP32 by Espressif Systems Version 3.3.7
     Library: ESP32Servo by Kevin Harrington Version 3.1.3
Author Avatar
PRO
Synthiam
#196  

Athough i do see it happen with the servo pad vs horizontal servo control. looks like the two tasks running on each core can't keep up. maybe yeilding the task while transmitting the uart or something might help. the esp32 is such a peice of #\(#\)@

Author Avatar
PRO
USA
#197   — Edited

Sorry fellas was away for dinner.

Yeah I noticed the same thing with the slider vs servo pad. Yeah sorry the ESP32 is a piece of do-do. But its incredible what you've done in such a short time with the ESP32 series of boards. This was a big ask with the SSC32 as it would create a wireless Mega EZB..lol. I can still do the ole ESP32 camera separate and another ESP32 connected to the SSC32, if i can make room.

EDIT: the libraries strikes again, i checked against my compile and using the wrong version ESPressif ...updating now.

EDIT #2 updated libraries and it actually seems to shudder more on the servo but a bit better on the camera frame rate.. Maybe Lynxmotion needs to update the SSC32. This card is 9 years old. A faster baud rate would help. I'll look and see if Ali express has something more upto date based on the SSC32.

Author Avatar
PRO
USA
#198  

..ok there are several faster chips sets but the baud rate remains the same 115200 max. And the prices starts to go up too.

User-inserted image

Author Avatar
PRO
Synthiam
#199  

Okay, I just spent the whole night rewriting the ESP32CAM firmware... here it is

ESP32 Cam EZB firmware
for ESP32 Cam by Espressif
Transform ESP32-CAM into an EZ-B for Synthiam ARC: simultaneous video streaming and servo control in a compact, cost-effective solution.
Firmware Versions 13
Last Updated
Current Version v13
Hardware ESP32 Cam

Check out the release notes because that's the direction I'm heading. I'm removing all support for pwm/servos on the ESP32 GPIO. All ESP32s will require an additional servo controller, such as a PCA9685, SCC32, or a simple Arduino. The ESP32 does not have enough resources to handle the servo and all the other jazz.

  • The core synchronization is out to lunch.
  • The task management is at the mercy of the hardware peripheral.
  • The DMA or whatever happens internally doesn't share resources and blocks tasks.
  • It's just not a great microcontroller for multitasking.

I think what makes the ESP32 great is its affordability. And because it's low-cost, you can buy 3 of them. And you essentially need 3 or maybe 4 to emulate an ezbv4 properly. It's like comparing a phone CPU to a desktop pc CPU. They're just different tools for different jobs. And the ESP32 is just not made for what we're trying to do. It's made for doing a single task, even though you can argue there are multiple cores, there is a reason...

  • TASK #0 for WiFi/TCP/Network services
  • TASK #1 for your program
  • That's it. That's all you get

So, trying to split all these tasks and services into a micro that is low power and low cost for a reason requires either

  1. more esp32's chained together
  2. a different micro that costs more and has more power
  3. fewer features

So the plan moving forward is...

  • Remove all servo/pwm from both ESP32 and ESP32Cam firmwares. For servo/pwm, use an external servo controller such as PCA9685, SCC32, or an Arduino, etc.
  • dumbing-down the firmware based on what i wrote tonight. It's fully optimized, and I can't squeeze anything more out of it.
  • i'm going to try adding audio to both ESP32Cam and ESP32 and see if i can make that work. It "sort of works" with the ESP32Plus, but it hasn't been fully tested yet.
  • If I can make audio work on ESP32 and ESP32Cam firmware, I'll remove ESP32Plus, and we'll just focus on those two

*Remember: ESP32Cam and ESP32 are completely different microcontroller boards. The chips may be similar, but one with a camera and one without means a whole world of difference. And that is why there are multiple firmwares.

Author Avatar
PRO
USA
#200  

First of all thank you for all the time spent on this.

We all owe you a beer or 10.

Absolutely think you are on the right path. We are trying to make them do to much. So make each one a unit performing a task like a cluster. They are so fricking cheap and so are the servo controllers. I’m all on board with this

I’ll give the new firmware a spin in the morning!

Again thanks!