feat: dual-board architecture — ESP8266 camera bridge + ESP32 MQTT bridge
Build (Dev) / build (push) Failing after 1s
CI/CD / lint-and-typecheck (push) Failing after 0s
CI/CD / test (push) Has been skipped
CI/CD / build (push) Has been skipped
CI/CD / deploy (push) Has been skipped

Complete rewrite of firmware into two dedicated boards per camera node:

ESP8266 (Camera Bridge):
- Connects ONLY to GoPro AP — polls status, sends over UART
- Zero network switching, zero MQTT
- HTTP GET /bacpac/SH for status, start/stop
- JSON-per-line UART protocol to ESP32

ESP32 (MQTT Bridge):
- Connects ONLY to travel router — MQTT to Pi hub
- Reads status from ESP8266 over UART2 (RX16/TX17)
- Auto-registration, heartbeat, command forwarding
- Zero camera communication

UART Protocol: JSON-per-line at 115200 8N1
  ESP8266→ESP32: status/ack/pong/error
  ESP32→ESP8266: cmd (start_recording/stop_recording/ping)

Hardware updates:
- BOM now includes both boards (~4/node)
- 3D case has stacked dual-board compartment
- UART wire channel between board recesses
- Shared 3.3V power rail for both boards
This commit is contained in:
2026-05-22 00:49:06 +00:00
parent 324402f268
commit b3d4226b1c
9 changed files with 831 additions and 665 deletions
+22 -18
View File
@@ -23,11 +23,13 @@ Each camera node is a self-contained unit clipped onto a GoPro Hero 3. It provid
│ │ Screen │ │
│ └─────────────────────────┘ │
│ ┌──────────┐ │
│ 3D Sleeve ─────→│ ESP32 │ │ ← clips onto back/bottom
│ 3D Sleeve ─────→│ ESP8266 │ │ ← Camera bridge (GoPro Wi-Fi)
│ │ D1 Mini │ │
──────────
┌──────────┐ │
│ │ LiPo │ │ ← slides under GoPro
──────────
│ ESP32 │ │ ← MQTT bridge (travel router)
│ │ Dev │ │
│ ├──────────┤ │
│ │ LiPo │ │ ← Shared power
│ │ 1000mAh │ │
│ └──────────┘ │
└─────────────────────────────────┘
@@ -38,16 +40,18 @@ Each camera node is a self-contained unit clipped onto a GoPro Hero 3. It provid
| Item | Qty | Cost | Notes |
|------|-----|------|-------|
| GoPro Hero 3 Black/Silver | 1 | Already owned | Target camera |
| ESP32 D1 Mini | 1 | ~$4 | Or NodeMCU-32S (~$5) |
| ESP32 Dev Board | 1 | ~$5 | MQTT bridge — talks to hub |
| ESP8266 D1 Mini | 1 | ~$3 | Camera bridge — talks to GoPro |
| LiPo 3.7V 1000mAh | 1 | ~$8 | 50x34x8mm typical |
| 5V/3A buck converter | 1 | ~$2 | LiPo → GoPro USB |
| 3.3V buck converter | 1 | ~$1 | LiPo → ESP32 VIN |
| 3.3V buck converter | 1 | ~$1 | LiPo → both boards (shared VIN) |
| 5V/3A buck converter | 1 | ~$2 | LiPo → GoPro USB (power only) |
| JST-XH 2-pin connectors | 2 | ~$1 | Battery quick-disconnect |
| Micro-USB right-angle cable | 1 | ~$2 | Buck → GoPro |
| Jumper wires (female-female) | 4 | ~$0.50 | UART + GND between boards |
| Velcro strap (20cm) | 1 | ~$0.50 | Secure to GoPro |
| PETG filament | ~30g | ~$0.60 | 3D printed case |
| PETG filament | ~35g | ~$0.70 | 3D printed case |
**Total per node:** ~$20
**Total per node:** ~$24
## 3D Printed Case
@@ -88,17 +92,17 @@ Slides under the GoPro. Contains:
LiPo 3.7V
├── JST-XH connector
├──→ 5V/3A Buck Converter → Micro-USB right-angle → GoPro USB port
(power only — no data over USB)
├──→ 3.3V Buck Converter → ESP8266 VIN + GND
→ ESP32 VIN + GND
│ (both boards share the same 3.3V rail)
└──→ 3.3V Buck Converter → ESP32 VIN + GND
(or ESP32 D1 Mini has built-in regulator — connect directly to 5V pin)
```
└──→ 5V/3A Buck Converter → Micro-USB right-angle → GoPro USB port
(power only — no data over USB)
**Note:** ESP32 D1 Mini has an onboard 3.3V regulator. You can feed it 5V directly to the 5V pin if using a single 5V buck converter. This simplifies wiring:
```
LiPo → 5V Buck → ├── ESP32 5V pin
└── GoPro USB port
UART (ESP8266 ↔ ESP32):
ESP8266 TX (GPIO1) ──→ ESP32 RX (GPIO16)
ESP8266 RX (GPIO3) ←── ESP32 TX (GPIO17)
ESP8266 GND ─────────── ESP32 GND
```
## Wi-Fi Topology (No Cables for Camera Control)
+32 -15
View File
@@ -15,12 +15,19 @@ gopro_depth = 30; // mm — body depth (front to back)
gopro_lens_dia = 28; // mm — lens protrusion diameter
gopro_lens_offset = 18; // mm — lens center from top
// ── ESP32 D1 Mini ──
esp_width = 34.2;
esp_height = 25.6;
esp_thick = 5; // board + components
usb_cutout_w = 10;
usb_cutout_h = 5;
// ── ESP8266 D1 Mini + ESP32 Dev Board (stacked) ──
esp8266_width = 34.2;
esp8266_height = 25.6;
esp8266_thick = 5; // board + components
esp32_width = 52; // ESP32 Dev Board is larger
esp32_height = 28;
esp32_thick = 5;
// Combined stack
board_width = max(esp8266_width, esp32_width);
board_height = max(esp8266_height, esp32_height);
board_thick = esp8266_thick + esp32_thick + 3; // 3mm gap between boards
// ── LiPo Battery (1000mAh typical) ──
lipo_width = 35;
@@ -30,7 +37,7 @@ lipo_thick = 8;
// ── Case parameters ──
wall = 2.0; // case wall thickness
tolerance = 0.3; // print tolerance for friction fit
compartment_height = max(esp_thick, lipo_thick) + 3; // internal compartment height
compartment_height = board_thick + 5; // internal compartment height for stacked boards
// ── Cable channels ──
cable_dia = 4; // USB cable diameter
@@ -103,13 +110,13 @@ module gopro_sleeve() {
}
// ══════════════════════════════════════════════════════════════
// Electronics Compartment — holds ESP32 + routes cables
// Electronics Compartment — holds ESP8266 + ESP32 stacked
// ══════════════════════════════════════════════════════════════
module electronics_compartment() {
comp_w = max(esp_width, esp_height) + wall*2 + 10;
comp_w = board_width + wall*2 + 8;
comp_h = compartment_height + wall*2;
comp_d = gopro_depth + wall*2;
comp_d = board_height + wall*2 + 8;
difference() {
union() {
@@ -128,14 +135,22 @@ module electronics_compartment() {
translate([0, 0, wall])
rounded_cube(comp_w - wall*2, comp_d - wall*2, comp_h - wall, 2);
// ESP32 board recess
// Bottom board (ESP32 — larger) recess
translate([0, 5, wall + 1])
cube([esp_width + tolerance, esp_height + tolerance, esp_thick + 1], center=true);
cube([esp32_width + tolerance, esp32_height + tolerance, esp32_thick + 1], center=true);
// USB cable entry (side hole)
// Top board (ESP8266 — smaller) recess
translate([0, 5, wall + esp32_thick + 4])
cube([esp8266_width + tolerance, esp8266_height + tolerance, esp8266_thick + 1], center=true);
// UART wire channel (between boards)
translate([comp_w/2, 0, wall + esp32_thick + 1])
cube([wall*3, 6, 3], center=true);
// USB cable entry (power to boards)
translate([comp_w/2, 15, comp_h/2])
rotate([0, 90, 0])
cylinder(d=usb_cutout_w, h=wall*3, center=true);
cylinder(d=6, h=wall*3, center=true);
// USB cable exit (to GoPro)
translate([comp_w/2, -15, comp_h/2])
@@ -150,9 +165,11 @@ module electronics_compartment() {
}
}
// LED window (thin wall for ESP32 LED visibility)
// LED windows (thin walls for ESP LEDs)
translate([0, 0, wall])
cube([5, 5, wall], center=true);
translate([0, 0, wall + esp32_thick + 4])
cube([5, 5, wall], center=true);
}
}