RoboEyes is a high-speed, low-latency visual expression system for robotics. By leveraging the RP2040’s dual-core architecture and dual GC9A01 round LCDs, it implements complex ocular movements, including partial window refreshes and asynchronous blinking state machines.
- Partial Refresh Logic: Updates only the active pixel regions of the GC9A01 display, drastically reducing SPI bus congestion.
- Dual-CS Synchronization: Drives two independent displays over a shared SPI bus using optimized Chip Select multiplexing.
- Asynchronous State Machine: Manages randomized blinking and saccade-masking via non-blocking timers.
- RGB565 Asset Pipeline: Pre-loads 16-bit BMP assets into local storage for immediate access during tracking interrupts.
- UART Telemetry Integration: Ready-to-use serial listener designed to map centroid coordinates from the ESP32-CAM FaceTracker.
- MCU: Raspberry Pi Pico (RP2040) @ 133MHz.
- Display Hardware: 2x GC9A01 1.28-Inch Round LCD TFT (240x240 resolution).
- Communication: High-speed Hardware SPI for video; 3.3V UART for coordinate input.
- Co-Processor (Optional): ESP32-CAM providing real-time human tracking coordinates.
To maximize frame rates, the displays share the Clock (SCK) and Data (MOSI) lines while using independent CS pins to manage bus contention.
| Peripheral | Pico Pin | Function | Logic Level |
|---|---|---|---|
| Global SPI | GP18 | SCK | 3.3V Clock |
| Global SPI | GP19 | MOSI | 3.3V Data |
| Left LCD | GP17 | CS | Chip Select L |
| Right LCD | GP20 | CS | Chip Select R |
| Telemetry RX | GP1 | UART RX | 3.3V Serial |
The RP2040 lacks the memory to buffer a full 57,600-pixel frame in 16-bit color. This system solves the bottleneck by defining Dynamic Clipping Windows:
- Only the bounding box of the moving pupil is calculated.
- The SPI controller is pointed to those specific coordinates.
- Only the "delta" pixels are transmitted, bypassing the static iris/sclera data.
-
Reception: UART receives
$X, Y$ centroid data from the FaceTracker. - Mapping: The Pico translates world-space coordinates into the 240x240 pixel space of the GC9A01.
- Synchronization: Both displays update their pupil offsets simultaneously via the shared bus.
- Outcome: The robot maintains constant, human-like eye contact.
- Firmware: Flash the Pico with the provided build (Optimized for SPI throughput).
- Assets: Transfer
.bmpassets (pupil, iris, eyelid) to the onboard flash. - Calibration: Configure the
eye_config.hfile to set your default pupil travel limits. - Deployment: Power via a stable 3.3V/5V rail and initiate the UART link.
- DMA SPI Transfer: Freeing up both RP2040 cores during data transmission.
- Interactive Mood Logic: Adjusting eyelid "droop" and pupillary dilation via HTTP/JSON commands.
- I2C Bus Consolidation: Migrating UART telemetry to a shared I2C bus with the servo controller.
© 2026 MatsRobot | Licensed under the MIT License
