Esp32 DevKit v1

EZ-ESP32 with Adafruit PCA9685

Hardware: Esp32 DevKit v1 Esp32 DevKit v1

Author: DJ Sures

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

This firmware enables the ESP32 to function as an EZ-B controller for Synthiam ARC, leveraging an Adafruit 16-Channel 12-bit PWM/Servo Driver (PCA9685) for expanded servo and PWM capabilities. The ESP32 handles digital port commands, while all PWM and servo commands are offloaded to the PCA9685 via the I2C interface. This setup provides a robust and scalable solution for robotics and automation projects.

Key Features:

  1. I2C Integration: Connects the ESP32 to the PCA9685 over I2C, enabling control of up to 16 servos or PWM devices.
  2. EZ-B Functionality: Converts the ESP32 into an EZ-B controller, fully compatible with Synthiam ARC for digital, PWM, and servo commands.
  3. Expanded I/O: Overcomes the ESP32’s limited I/O capabilities by offloading servo and PWM tasks to the PCA9685.

How It Works:

  1. Digital Port Commands: Digital commands issued in ARC are processed and executed directly by the ESP32’s onboard GPIO.
  2. Servo and PWM Commands: ARC commands for servo positions and PWM signals are sent to the PCA9685 via I2C, allowing up to 16 channels of high-resolution control.
  3. Efficient Resource Allocation: By delegating servo and PWM tasks to the PCA9685, the ESP32’s GPIOs remain available for other functions.

Hardware Setup:

To connect the ESP32 to the PCA9685, use the following wiring:

| ESP32 Pin | PCA9685 Pin | |---------------------|--------------------------| | SDA (e.g., GPIO21) | SDA | | SCL (e.g., GPIO22) | SCL | | GND | GND | | VIN (3.3V or 5V) | VCC |

Prerequisites:

  1. Arduino IDE Setup:

  2. Hardware Configuration:

    • Ensure the PCA9685 is powered correctly. For servos, connect an appropriate external power source to the PCA9685’s V+ terminal.
    • Adjust the PCA9685’s I2C address if using multiple boards or to resolve address conflicts.

Firmware Features:

  1. Digital Commands:
    • All digital commands from ARC, such as setting GPIOs high/low or reading inputs, use the ESP32's GPIO pins.
  2. Servo and PWM Commands:
    • The PCA9685 handles all servo and PWM operations, providing:
      • 12-bit resolution for precise control
      • 16 independent channels for servos or PWM devices

Benefits:

  1. Expanded I/O: Increases the number of available PWM and servo ports without burdening the ESP32’s limited GPIOs.
  2. Scalable Design: Additional PCA9685 boards can be daisy-chained for even more channels.
  3. ARC Compatibility: Fully integrates with Synthiam ARC, allowing seamless control of digital and servo devices.

Applications:

This firmware is ideal for projects requiring precise control of multiple servos or PWM devices, such as:

  • Robotic arms and manipulators
  • Animatronics with synchronized servo movement
  • LED lighting or motor control via PWM

Example Use Case:

With this setup, you could:

  • Use the ESP32’s GPIO for sensors or switches.
  • Connect up to 16 servos for controlling robotic limbs or grippers.
  • Send commands from Synthiam ARC for real-time adjustments and complex behaviors.

User-inserted image


Version Information

  • First time added
Supported Capabilities
  • ADC with 12 bit Resolution
    The ADC captures analog voltage at 8 bit resolution. This means the native value will be an 8 bit (0-4095) from the controller.
  • 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 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

Unlock the true power of automation and robotics by becoming a proud subscriber of Synthiam ARC Pro.

#1  

I am using the Esp32 DevKit V.1 like stated about. What pins on the Esp32 do the Scl & Sda from the Pca9685 connect to? The picture above is not correct. I have run through the Esp32 code and still can not find it.

Thanks in advance!