Skip to content

Latest commit

 

History

History
76 lines (50 loc) · 5.3 KB

File metadata and controls

76 lines (50 loc) · 5.3 KB

Hardware profiles

Azimuth is intentionally two hardware paths—you only build one:

  1. DIY / breadboard — A Seeed XIAO ESP32-C3 and a BNO08x-class IMU breakout wired for SPI. Parts are easy to source — store links and options are in parts-list.md. The web flasher and default release build target this path (azimuth_main_diy). USB for flashing and Hatire is through the XIAO.

  2. Integrated PCB — The routed board in kicad/Azimuth_Design (ESP32-C3-WROOM-02, BNO086 on the board, plus RGB, buzzer, and FUNC where populated). You flash azimuth_main_pcb. It runs the same head-tracking application (portal, UDP, Hatire); on-board extras are only relevant when that hardware exists.

DIY (XIAO + breakout) and Azimuth_Design share the same GPIO assignments in include/azimuth_hw.h — only the physical connector differs (XIAO D pins vs U1 module pads). See wiring.md (DIY table ↔ PCB table).

Build suffixes: _diy = XIAO + breakout. _pcb = Azimuth_Design. main = full firmware (portal, Hatire, UDP). debug = USB serial IMU angles only, no Wi‑Fi or portal.


Targets

Role _diy _pcb
MCU XIAO ESP32-C3 WROOM-class module on Azimuth_Design
IMU BNO08x breakout BNO086 on board
Extra I/O Buzzer/button optional (same GPIOs as PCB) RGB LED, buzzer, FUNC on board

Firmware: azimuth_main_diy and azimuth_main_pcb are the same application. Tracking does not require LED, buzzer, or button.

You have Environment
XIAO + BNO08x (SPI) azimuth_main_diy or azimuth_debug_diyboard = seeed_xiao_esp32c3
Azimuth_Design PCB azimuth_main_pcb or azimuth_debug_pcbboard = esp32-c3-devkitc-02
python3 -m platformio run -e azimuth_main_diy -t upload    # XIAO + breakout
python3 -m platformio run -e azimuth_main_pcb -t upload    # Azimuth_Design

Firmware sets -DARDUINO_USB_MODE=1 and -DARDUINO_USB_CDC_ON_BOOT=1 so Serial is USB CDC on both targets; the stock esp32-c3-devkitc-02 JSON does not enable that by itself.

SPI bus: src/main.cpp calls SPI.begin(8, 9, 10, -1) before imu.beginSPI(...). The XIAO variant already defaults to those pins, but esp32-c3-devkitc-02 uses Arduino variant esp32c3, whose defaults are 4 / 5 / 6 — that would collide with CS (5) and INT (6) on the Azimuth PCB. The explicit begin keeps DIY and PCB builds on the same FSPI pins as Azimuth.kicad_sch.

Web flasher: CI ships azimuth_main_diy by default. A second manifest.json entry (or fork) applies if you publish azimuth_main_pcb binaries.


GPIO contract (change only with firmware + doc update)

Firmware-facing summary: same GPIO numbers on both paths. Where to wire physically — XIAO D pins vs U1 schematic pins — is in wiring.md (DIY section vs PCB section), not duplicated here.

GPIO numbers are for ESP32-C3; D* labels refer to XIAO silk only (the module has no D names).

Function GPIO XIAO Notes
SPI SCK / MISO / MOSI 8 / 9 / 10 D8–D10
IMU CS / INT / NRST 5 / 6 / 20 D3, D4, D7
PS0 / WAKE 2 D0 10 kΩ to 3V3 on breadboard (same as R14 on Azimuth_Design)
RGB (Azimuth board) 0, 1, 3 Not present on default breadboard build
Status / future 3 D1 kPinStatusLed; full RGB on PCB uses 0, 1, 3 — wiring.md
FUNC 7 D5 Optional breadboard
Buzzer 21 D6 PWM on IO21 drives Q2 gate on PCB; optional breadboard differs — wiring.md, parts-list
Battery sense 4 D2 Divider tap; when populated — same as Azimuth_Design IO4

The Azimuth RGB LED is on GPIO 0, 1, 3—not a drop-in on XIAO silk; azimuth_main_diy does not drive that RGB layout.

If a hardware revision ever changes GPIO roles, update azimuth_hw.h and wiring.md together.

KiCad: kicad/Azimuth_Design/ — open Azimuth.kicad_pro. U1IC1 routing and module notes are in wiring.md (PCB path). Project snapshot is ERC/DRC clean; re-run after schematic or layout edits. Libraries, optional panelization, workflow: kicad.md.


Work checklist (maintenance)

  • Shared pin header include/azimuth_hw.h
  • PlatformIO azimuth_main_diy / azimuth_main_pcb (+ debug variants)
  • Azimuth_Design: Docs parts-list.md / wiring.md match Azimuth.kicad_sch / Azimuth.kicad_pcb (re-verify after edits); ERC/DRC clean in current repo snapshot; export BOM from KiCad for each fab / pick-and-place order
  • Optional: CI build azimuth_main_pcb artifacts
  • Optional: second manifest.json entry for retail PCB

Related: wiring.md · parts-list.md · development.md · kicad.md