generated from CubeCraft-Creations/Tracehound
feat: dual-board architecture — ESP8266 camera bridge + ESP32 MQTT bridge
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user