A distributed real-time architecture with no cloud dependency — built for reliability in environments where connectivity cannot be assumed.
High-frequency local data: Pi polls both ESP32s at 10Hz. Wire0 (GPIO 21/22) as slave toward Pi; Wire1 (GPIO 32/33) as master toward PCA9685/MPU-6050.
Event-driven high-level messaging on localhost:1883. Topics: robot/motori/cmd, robot/sensori/distanze, robot/odometria, robot/nav/goal, drone/cmd/rpyt and more.
Audio streaming to Whisper server (pure binary PCM16, no framing). Web dashboard map viewer on ws://pi:8765. Occupancy grid pushed at 1Hz.
Remote access to Pi at 100.100.61.49 without port forwarding. Transparent to MQTT — ESP32s communicate on local WiFi only.
| Component | Role | Interface | Notes |
|---|---|---|---|
| HC-SR04 ×6 | Obstacle + cliff detection | GPIO (TRIG/ECHO) | ECHO 5V → 10k+20k divider to ESP32 |
| MPU-6050 | 6-axis IMU (acc + gyro) | I²C Wire1 | 10ms update, auto calibration on boot |
| TCRT5000 ×3 | Line following / cliff | GPIO digital | SX, CENTRO, DX — mask byte in I²C buf |
| NEO-6M GPS | World-frame positioning | /dev/ttyS0 9600bd | GGA+RMC fusion, Leaflet.js live track |
| OV5647 CSI | MJPEG camera stream | CSI ribbon | rpicam-vid → Flask MJPEG on :8080 |
| PCA9685 | 6× servo PWM driver | I²C Wire1 0x40 | 50Hz, 27MHz oscillator, SERVO_MIN=150 |
4-layer. TB6612FNG ×2, encoder headers, 10kΩ pull-downs on GPIO 2 & 12. 1.5mm traces for motor outputs, 2.0mm for 12V rail.
2-layer. All sensor headers, relay driver, TCRT connectors. Wire1 for PCA9685 + MPU-6050. Voltage dividers for HC-SR04 ECHO lines.
2-layer power distribution. XL4015 (12V→5V), LM2596 (5V→3.3V). Schottky OR diodes for seamless bench/battery switching.
All boards manufactured by JLCPCB. THT-only assembly. Trace standards: 0.3mm signal / 0.5mm 3.3V / 1.0mm 5V / 1.5mm motor / 2.0mm 12V. Copper pour on high-current rails.