saltylab-firmware/docs/PLATFORM.md
sl-firmware 291dd689f8 feat: remove all STM32/Mamba/BlackPill references — ESP32-S3 only
Archive STM32 firmware to legacy/stm32/:
- src/, include/, lib/USB_CDC/, platformio.ini, test stubs, flash_firmware.py
- test/test_battery_adc.c, test_hw_button.c, test_pid_schedule.c, test_vesc_can.c, test_can_watchdog.c
- USB_CDC_BUG.md

Rename: stm32_protocol → esp32_protocol, mamba_protocol → balance_protocol,
  stm32_cmd_node → esp32_cmd_node, stm32_cmd_params → esp32_cmd_params,
  stm32_cmd.launch.py → esp32_cmd.launch.py,
  test_stm32_protocol → test_esp32_protocol, test_stm32_cmd_node → test_esp32_cmd_node

Content cleanup across all files:
- Mamba F722S → ESP32-S3 BALANCE
- BlackPill → ESP32-S3 IO
- STM32F722/F7xx → ESP32-S3
- stm32Mode/Version/Port → esp32Mode/Version/Port
- STM32 State/Mode labels → ESP32 State/Mode
- Jetson Nano → Jetson Orin Nano Super
- /dev/stm32 → /dev/esp32
- stm32_bridge → esp32_bridge
- STM32 HAL → ESP-IDF

docs/SALTYLAB.md:
- Update "Drone FC Details" to describe ESP32-S3 BALANCE board (Waveshare ESP32-S3 Touch LCD 1.28)
- Replace verbose "Self-Balancing Control" STM32 section with brief note pointing to SAUL-TEE-SYSTEM-REFERENCE.md

TEAM.md: Update Embedded Firmware Engineer role to ESP32-S3 / ESP-IDF

No new functionality — cleanup only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 08:41:26 -04:00

9.1 KiB
Raw Blame History

SaltyRover — Modular Platform Design 🧂🛞

Design Philosophy

  • Modular: Standardized mounting points for swappable top decks
  • Printable: Main structural brackets on Bambu X1C (256x256x256mm) and A1 (256x256x256mm)
  • Repairable: Bolt-together, no permanent welds/glue on structural parts
  • Weatherproof-ish: Splash resistant for outdoor use, not submarine

Base Platform ("Skateboard")

Frame

        FRONT
   ┌─────────────────┐
   │  ┌─M1─┐   ┌─M2─┐ │      M1-M4: 6.5" hub motors
   │  │    │   │    │ │      ESC1 drives M1+M2 (front)
   │  └────┘   └────┘ │      ESC2 drives M3+M4 (rear)
   │                   │
   │  ┌──────────────┐ │
   │  │   BATTERY    │ │      Center-mounted battery bay
   │  │    BAY       │ │      Fits 2x hoverboard packs (2P)
   │  └──────────────┘ │
   │                   │
   │  ┌─ESC1─┐┌─ESC2─┐ │      ESCs flanking center
   │  └──────┘└──────┘ │
   │  ┌──5V──┐┌─12V──┐ │      DC-DC converters
   │  └──────┘└──────┘ │
   │                   │
   │  ┌─M3─┐   ┌─M4─┐ │
   │  │    │   │    │ │
   │  └────┘   └────┘ │
   └─────────────────┘
        REAR

   Overall: ~600mm L × 450mm W × ~120mm H (base only)

Dimensions

  • Length: 600mm (motor center to motor center ~500mm, +50mm overhang each end)
  • Width: 450mm (constrained by motor axle-to-axle, ~350mm inner + motor housings)
  • Ground clearance: ~50mm (bottom of frame to ground)
  • Wheelbase: 500mm (front axle to rear axle)
  • Track width: 350mm (left wheel center to right wheel center)

Frame Construction

  • Main rails (x2): Aluminum extrusion 2040 V-slot, 600mm length
    • Or: 40x20mm aluminum rectangular tube
    • Or: 3D printed with steel rod reinforcement
  • Cross members (x3): Front, center, rear — aluminum or printed
  • Motor mounts (x4): 3D printed brackets, bolted to frame rails
    • Must accommodate 6.5" hub motor axle (standard hoverboard M10 axle)
    • Axle clamp style — two-piece with bolts for easy wheel swap

Modular Top Deck Interface

   ┌─────────────────────┐
   │  ○    ○    ○    ○   │   ← M5 threaded inserts, 100mm grid
   │                     │
   │  ○    ○    ○    ○   │   Standard mounting pattern:
   │                     │   - 400mm × 300mm grid
   │  ○    ○    ○    ○   │   - M5 bolt holes on 100mm centers
   │                     │   - 16 mount points total
   │  ○    ○    ○    ○   │
   └─────────────────────┘

Top deck connector:

  • 16x M5 threaded inserts in frame top rails
  • 100mm grid spacing
  • Any top deck just needs matching bolt holes
  • Power connector: XT30 (5V + 12V + GND) standardized position at rear-center
  • Data connector: USB-A hub mounted to frame, accessible from top

Top Deck Configurations

Config 1: "Follow Bot" (Primary)

   ┌─────────────────────┐
   │    [RPLIDAR A1M8]   │   ← Top-mounted, unobstructed 360°
   │     spinning╲      │     Raised on 100mm standoff
   │                     │
   │  [RealSense D435i]  │   ← Front-facing, angled down ~10°
   │                     │     Height: ~400mm from ground
   │  [Jetson Orin Nano Super]      │   ← Center, in ventilated enclosure
   │  [WiFi/4G module]   │     Noctua fan draws air through
   │                     │
   │  [Speaker]  [LEDs]  │   ← Rear: audio feedback + status
   │  [E-STOP button]    │     Big red mushroom button
   └─────────────────────┘

Parts:

  • Sensor tower: 3D printed, 100mm tall, mounts LIDAR on top
  • RealSense bracket: 3D printed, adjustable tilt
  • Jetson enclosure: 3D printed, ventilated, vibration dampened
  • LED strip ring: NeoPixel/WS2812B around sensor tower (status indication)

Config 2: "Cargo Hauler"

   ┌─────────────────────┐
   │  ┌─────────────────┐ │
   │  │                 │ │   Flat cargo platform
   │  │   CARGO AREA    │ │   400 × 300 × 150mm
   │  │   (open top)    │ │   With tie-down points
   │  │                 │ │
   │  └─────────────────┘ │
   │  [GPS] [Beacon]      │   Minimal autonomy — follows beacon
   └─────────────────────┘

Config 3: "Camera Rig"

   ┌─────────────────────┐
   │      [Gimbal]       │   2-axis stabilized camera mount
   │     [Action Cam]    │   GoPro / Insta360
   │                     │
   │  [Jetson + storage] │   Records while following
   │  [Large battery]    │   Extended runtime for filming
   └─────────────────────┘

Config 4: "Security Patrol"

   ┌─────────────────────┐
   │    [RPLIDAR]        │   Autonomous waypoint patrol
   │  [PTZ Camera]       │   Pan-tilt-zoom camera
   │  [Spotlight]        │   High-power LED
   │  [Jetson + 4G]      │   Streams to Frigate
   │  [Siren/Speaker]    │
   └─────────────────────┘

3D Printed Parts List (Config 1: Follow Bot)

All designed for Bambu X1C/A1 build plate (256x256mm max).

Part Size (mm) Material Infill Qty
Motor mount bracket 80×60×40 PETG/ASA 60% 4
Motor mount clamp top 80×40×15 PETG/ASA 60% 4
Cross member front 350×40×20 PETG/ASA 80% 1
Cross member center 350×60×20 PETG/ASA 80% 1
Cross member rear 350×40×20 PETG/ASA 80% 1
Battery tray 250×150×30 PETG 40% 1
Battery strap anchor 40×20×15 PETG 100% 4
ESC mount tray 150×100×15 PETG 40% 2
DC-DC mount 80×60×15 PETG 40% 2
Sensor tower base 120×120×10 ASA 80% 1
Sensor tower tube Ø80×100 ASA 40% 1
LIDAR mount plate Ø90×5 ASA 100% 1
RealSense bracket 100×50×60 PETG 60% 1
Jetson enclosure bottom 120×100×25 PETG 40% 1
Jetson enclosure top 120×100×25 PETG 40% 1
E-stop mount 50×50×30 PETG 60% 1
Wire management clips 20×15×10 PETG 100% 10
Fender/splash guard 200×80×60 ASA 30% 4

Material notes:

  • ASA for outdoor/exposed parts (UV resistant, weather resistant)
  • PETG for structural internal parts (strong, slight flex)
  • Avoid PLA — warps in summer sun

Electrical Wiring

PACK1 ═╤═ PACK2 (parallel, XT60)
        │
        ├──→ ESC1 ──→ M1 (front-left) + M2 (front-right)
        │     │
        │     └── UART TX/RX ──→ Jetson GPIO
        │
        ├──→ ESC2 ──→ M3 (rear-left) + M4 (rear-right)
        │     │
        │     └── UART TX/RX ──→ Jetson GPIO
        │
        ├──→ DC-DC 36V→5V ──→ Jetson Orin Nano Super (barrel jack 5V/4A)
        │                  ──→ USB hub (sensors)
        │
        ├──→ DC-DC 36V→12V ──→ LED strips
        │                   ──→ Speaker amp
        │                   ──→ 4G modem
        │
        └──→ E-STOP (normally closed, inline with main power)

ESC UART Protocol (FOC firmware)

  • Baud: 115200 (or 9600, configurable)
  • Each ESC: steer + speed as int16 values (-1000 to +1000)
  • ESC1 (front): Jetson UART1
  • ESC2 (rear): Jetson UART2 (or USB-serial adapter)

Differential Drive Control

Left speed  = throttle - steering
Right speed = throttle + steering

For 4WD: front and rear ESCs get same commands
(or: rear slightly less for better turning)

Assembly Order

  1. Cut/prepare frame rails (aluminum extrusion or tube)
  2. Print all brackets and mounts
  3. Assemble frame with cross members
  4. Mount motors to brackets, attach to frame
  5. Install battery tray, strap packs
  6. Mount ESCs and DC-DC converters
  7. Wire power distribution (XT60 splitters)
  8. Install E-stop inline
  9. Mount top deck with sensor tower
  10. Wire data connections (UART, USB)
  11. First test: power on, spin motors manually via serial terminal
  12. Flash follow-bot software to Jetson
  13. Outdoor test in parking lot

Next Steps

  • Measure exact motor axle dimensions and spacing
  • Choose frame material (aluminum extrusion vs printed vs hybrid)
  • Design motor mount bracket in CAD (FreeCAD/Fusion360)
  • Print test motor mount, verify fit
  • Design and print sensor tower
  • Bench test: Jetson → UART → ESC → single motor spinning