Skip to content

Wiring Reference Hub

Ravi Singh edited this page May 23, 2026 · 2 revisions

Wiring Reference — Hub (RX)

The hub is a carrier board that sockets an ESP32 DevKit v1 (CP2102, 38-pin). Don't substitute the MCU — pin numbers below are specific to that module.

Source of truth: firmware/Receiver-ESP32-DevKit/main/config.h — if this page disagrees, config.h wins. Open an issue.


Schematic (REV 2.1)

TankSync Receiver Hub schematic — REV 2.1, drawn in EasyEDA

Higher-resolution SVG: hardware/pcb/rx-schematic.svg. 3D model for case design: hardware/pcb/rx-pcb-3d.step.


Power chain

flowchart LR
    USB[USB-C 5V] --> LDO[AMS1117-3.3]
    LDO --> ESP[ESP32 DevKit]
    LDO --> Mod[RYLR998 + OLED]
    USB -->|+1000 µF cap| WS[WS2812B strip]
Loading

All modules share a common ground. The WS2812 strip is on raw 5 V, not the 3.3 V regulator — a 24-LED ring at full white can draw >1 A and would brown out the LDO.


Pin map

GPIO Function Connects to Direction Notes
GPIO 16 LORA_RX (UART2) RYLR998 TXD Input 3.3 V logic
GPIO 17 LORA_TX (UART2) RYLR998 RXD Output 3.3 V logic
GPIO 21 I²C SDA SH1106 OLED SDA I/O OLED at 0x3C
GPIO 22 I²C SCL SH1106 OLED SCL Output
GPIO 13 WS2812B data LED strip DIN Output Not GPIO 2 (taken by onboard LED)
GPIO 02 Buzzer Active piezo + lead Output Since rx-v2.8.0
GPIO 0 BOOT button Tactile button → GND, INPUT_PULLUP Input 5s hold = setup mode

Wire-by-wire list

Group your assembly in this order:

Power (do this first)

USB-C 5V         → ESP32 DevKit VIN
ESP32 5V (out)   → RYLR998 VCC
ESP32 3V3 (out)  → OLED VCC
GND (shared)     → ESP32 GND, RYLR998 GND, OLED GND, LED strip GND, buzzer GND
USB-C 5V         → WS2812B 5V (with 1000 µF cap close to strip)
USB-C 5V         → Buzzer +

UART (RYLR998 ↔ ESP32, 115200 baud)

ESP32 GPIO 17 (TX) → RYLR998 RXD
ESP32 GPIO 16 (RX) → RYLR998 TXD

Common gotcha: ESP32 TX → RYLR998 RX. Always cross. Reversing kills pairing.

I²C (OLED)

ESP32 GPIO 21 (SDA) → OLED SDA
ESP32 GPIO 22 (SCL) → OLED SCL

LED strip + buzzer

ESP32 GPIO 13 → WS2812B DIN
ESP32 GPIO 02 → Buzzer signal (active high)

Buttons (optional — on-PCB tactile is enough)

ESP32 GPIO 0 → BOOT button → GND
ESP32 EN     → RESET button → GND

Things the firmware checks at boot

  1. OLED at 0x3C — if missing, display stays blank; rest of firmware still runs (degraded mode).
  2. RYLR998 AT\r\n+OK\r\n within 1.5 s at 115200 8N1 — if no response, firmware enters AP setup mode and reports LoRa: no answer.
  3. WS2812 — no readback. If the strip is wrong type, you'll see garbled colors; pick 2, 8, or 24 from the local web UI's System → LED strip tab.
  4. Buzzer — no readback. Confirm with System → Buzzer → Test buzzer in the web UI.

What if I'm using the bare ESP32 DevKit without the carrier PCB?

Same pin assignments work on a breadboard. Add these as discrete parts:

  • 1× 1000 µF electrolytic across the WS2812 5 V rail, close to the strip
  • 4.7 kΩ I²C pull-ups on SDA + SCL (most OLED breakouts already have them; check yours)
  • 100 nF decoupling at each module's power pin

If you skip the inrush cap and run a 24-LED ring at white, you'll get random reboots — symptom is "WS2812 sometimes flashes blue and the OLED goes dark for a second."

Clone this wiki locally