Esp32plus Firmware

ESP32Plus for Synthiam ARC enables ESP32 robot control with audio streaming, ESP32-CAM passthrough, PCA9685 16-servo I2C control and UART expansion.

Compatible Hardware

Esp32 by Espressif
Control ESP32 boards with Synthiam ARC: EZB-like firmware for GPIO, PWM/servos, serial, WiFi modes, safe pins, wiring and power tips.
Wi-Fi
Servos Varies
Camera
Audio
UART Varies
I2C
ADC Varies
Digital Varies

Description

This firmware converts a Esp32 into an EZB for ARC to connect to it.

ESP32Plus is a high-performance firmware for Synthiam ARC that transforms a standard ESP32 into a powerful, network-connected robot controller with audio streaming, camera passthrough, i2c PCA9685 16-servo control, and hardware UART expansion - all in a compact, low-cost form factor.

It’s ideal for advanced robotics projects, custom robot builds, embedded systems, and WiFi-enabled robots controlled directly from Synthiam ARC.


External Camera Support (ESP32-CAM over UART)

ESP32Plus supports a dedicated camera ESP32 module (ESP32-CAM) connected over UART:

  • Serial1 RX: GPIO 12
  • Serial1 TX: GPIO 13

*Note: RX/TX pins can be changed in the firmware INO sourcecode.

This allows:

  • Camera frames to be streamed from a second ESP32-CAM board
  • ARC to treat the camera as a native EZ-Robot camera device
  • Clean separation of video processing from robot control logic

This architecture keeps video capture fast and responsive without impacting servo control, networking, or audio playback.


16-Channel servo & PWM Control via PCA9685 (I2C)

ESP32Plus uses the PCA9685 16-channel PWM servo controller for reliable, jitter-free servo output:

  • I2C SDA: GPIO 14
  • I2C SCL: GPIO 15
  • PCA9685 Address: 0x40
  • PWM Frequency: 50 Hz (servo standard)

*Note: I2C pins and values can be changed in the firmware INO sourcecode.

This provides:

  • Control of up to 16 servos
  • Digital on/off outputs
  • PWM speed control
  • Hardware-timed PWM for smooth motion without CPU jitter

Servos must be powered externally and comply with the PCA9685 current-limitation requirements.


Real-Time Audio Streaming (ESP32 DAC via I2S)

ESP32Plus streams audio directly from Synthiam ARC to the ESP32’s built-in DAC using I2S DMA:

  • DAC Output Pins:

    • GPIO 25 (DAC1)
    • GPIO 26 (DAC2)

*Note: If changed in the sourcecode, the pins must be DAC pins of the ESP32.

Features:

  • 8-bit PCM audio streamed over WiFi
  • Buffered playback using DMA
  • Real-time robot sound effects, speech, beeps, and alerts

No external DAC is required - audio is output directly from the ESP32 hardware.


Automatic Network Discovery (EZ-B Scan Broadcast)

ESP32Plus automatically announces itself on the network so ARC can discover it without manual IP configuration:

  • Broadcasts every few seconds using UDP
  • Compatible with ARC’s EZ-B Scan feature
  • Shows up as a discoverable robot controller on the local network

This makes setup fast and user-friendly - power it on, open ARC, and connect.


UART Expansion (Peripheral Serial Devices)

This firmware supports the ARC UART (#0) commands for writing, reading with a buffered input.

  • Serial2 RX: GPIO 16
  • Serial2 TX: GPIO 17

*Note: RX/TX pins can be changed in the firmware INO sourcecode.

This allows:

  • Serial sensors
  • Co-processors
  • External microcontrollers
  • Streaming serial devices directly into ARC

High-Performance Multi-Task Architecture

ESP32Plus uses FreeRTOS with multiple concurrent tasks:

  • EZ-Robot protocol handling
  • UART camera passthrough
  • Audio DAC streaming
  • Network discovery broadcasting

This ensures:

  • No lag during audio playback
  • Smooth servo updates
  • High-speed TCP draining
  • Stable WiFi performance under heavy load

Network Configuration

Before flashing, the firmware can be configured for:

  • Access Point Mode (Robot creates its own WiFi network)
  • Client Mode (Robot joins your existing WiFi network)

You must edit:

#define AP_MODE

#define WIFI_AP_SSID "YourRobotName"
#define WIFI_AP_PWD  ""

#define WIFI_CLIENT_SSID "YourWiFi"
#define WIFI_CLIENT_PWD  "YourPassword"

This gives you full control over how the robot connects to your network.


What You Need (External Hardware)

ESP32Plus intentionally stays modular:

Function Hardware
Servos PCA9685 16-channel servo controller
Camera ESP32-CAM module
Audio Amplifier or direct line-out to external amplifier (Built-in ESP32 DAC))
Power External power for servos recommended
Robot controller ESP32 (original ESP32, not S3/C3)

This design keeps the system flexible and easy to expand or customize.

Downloads

Download

*Note: Requires Synthiam ARC v2026.02.18.00 or newer

  • Runs as WiFi Access Point or WiFi Client

    • AP mode is enabled by compile-time flag (AP_MODE) with configurable SSID/password.
    • Client mode supported with configurable SSID/password.
  • ARC auto-discovery (EZ-B Scan compatible)

    • Broadcasts UDP discovery packets every ~4 seconds on port 4242.

    • Announces two services:

      • EZ-B service on TCP port 23
      • Camera/UART passthrough service on TCP port 24
    • Includes a DEVICE_NAME string so ARC can show a friendly name.

Multi-task (FreeRTOS) architecture

  • Uses 4 FreeRTOS tasks (not pinned) for compatibility across single-core and dual-core ESP32 variants:

    • EZB Task (high priority): protocol + socket drain on port 23
    • UART Bridge Task: streams Serial1 RX to TCP client on port 24
    • Audio DAC Task: plays streamed 8-bit PCM using ESP32 DAC via I2S DMA
    • Broadcast Task: sends EZ-B scan discovery packets

EZ-B protocol server (TCP port 23)

  • Hosts an EZ-B compatible TCP server on port 23 for Synthiam ARC to connect to.

  • Implements a high-performance RX ring buffer

    • Aggressively drains TCP RX using burst reads to prevent the TCP receive window from shrinking (helps ARC when sending many tiny packets).
    • Parses commands only from the ring buffer (never directly from the socket).

PCA9685 (16-channel PWM/servo) support over I2C

  • Initializes and requires a PCA9685 at I2C address 0x40

    • Uses configurable I2C pins (PCA_SDA_PORT, PCA_SCL_PORT) and 400 kHz I2C clock.
    • If the PCA9685 is not detected, firmware halts in a fatal error loop with wiring/debug info over Serial.
  • Provides ARC control for ports 0-15 via the PCA9685:

    • Servo position (0-180 mapped to pulse range)
    • PWM percent output (0-100%)
    • Digital ON/OFF (full on / full off via PCA9685)
    • Release all servos resets outputs to off

Audio streaming output (ESP32 DAC via I2S)

  • Supports ARC audio streaming commands under CmdEZBv4

    • Accepts audio bytes as 8-bit unsigned PCM (0-255); silence is 128
    • Plays at 14700 Hz sample rate using I2S DMA to the internal DAC
    • Outputs to GPIO 25 and GPIO 26 (same mono signal on both pins)
  • Audio buffering behavior

    • Uses a large in-memory audio ring buffer (configured as 131072 bytes)
    • If the ring buffer fills, extra incoming audio bytes are dropped (to keep networking responsive)

UART features

UART passthrough "Camera" bridge (TCP port 24)

  • Runs a TCP server on port 24 and streams Serial1 RX to the connected client.

  • Tuned for efficiency:

    • Sends in chunks up to 1460 bytes
    • Flush timeout of ~10 ms to avoid tiny packets
    • Enlarged Serial1 RX buffer (32768 bytes) for bursty data

EZ-B v4 UART Expansion 0 (Serial2)

  • Implements ARC-style UART expansion commands for UART Expansion 0:

    • Init: CmdV4UARTExpansion0Init sets baud and opens Serial2 on configurable pins (SERIAL2_RX / SERIAL2_TX)
    • Write: CmdV4UARTExpansion0Write
    • Available: CmdV4UARTExpansion0AvailableBytes
    • Read: CmdV4UARTExpansion0Read
  • UART Expansion 1 and 2 are stubbed

    • Accept commands but return zeros / discard data (placeholders for future expansion)

Status / identification

  • Responds to ARC ping (CmdPing) and reports a firmware ID (CmdGetFirwareID) of 23149.
  • Serial debug output at 115200 baud for startup logs, WiFi events, PCA9685 probe status, and client connect/disconnect messages.
Click to show supported capabilities
Supported Capabilities
  • Broadcasts to ARC's PnP network scanner
    Controller broadcasts itself on the network using the ARC PnP network scanner protocol. This is so ARC can find devices on the network which may have dhcp assigned addresses.
  • Can stream Audio v4 codec
    Supports the streaming Audio v4 codec to play music, speech and sound effects out of the DAC on the controller.
  • Can stream video v4 codec
    The controller supports the streaming Video v4 codec on a TCP or UART or USB connection.
  • Hardware UART TX/RX with DMA buffer and adjustable baud rate
    Contains 1 or more hardware UARTs with TX/RX functionality and DMA RX buffering.
  • Native WiFi Connectivity from ARC
    Controller supports WiFi connectivity using TCP between your computer with ARC.
  • PWM Duty on digital ports
    Digital ports can output a PWM between 0% and 100%.
  • PWM servos on digital ports
    The controller supports PWM Servos on digital ports. These are also called Hobby servos.
  • PWM servos on digital ports can release their position
    PWM servo driver on digital ports support the feature to release their holding position.
  • Read/Write Digital I/O Ports
    The ports marked as being digital will respond to Read and Write commands of boolean logic. The status of the digital port will be either TRUE or FALSE when voltage is detected or not, respectively.

ARC Pro

Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming