Skip to content

Commit 563ee29

Browse files
author
Ravi Singh
committed
docs: v6.0 board recommendation tier + known-issues recovery steps
README: v6.0.0 shipped — describe the actual delivered features instead of the "in progress" status. Highlight ESP32-S3 as recommended board. HARDWARE.md additions: - Board recommendation tier table at the top (S3 recommended, C3 supported, classic deprecated, C6 avoid). Plain reasoning so users picking a board for a new install pick S3. - "Second device not visible" recovery — erase-flash + reflash for stale NVS with mismatched MCU pinmap. (v6.0 has the boot guard but alpha-flashed devices need the manual recovery once.) - "Slider throws ERR_CONNECTION_RESET" entry — explains the C3 single-core httpd saturation and the 300 ms client debounce fix shipped in 0b63b6e. - Reordered the supported-boards table by recommendation, not by validation status.
1 parent aab9e3e commit 563ee29

2 files changed

Lines changed: 85 additions & 24 deletions

File tree

README.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,34 @@
33
<img src="https://raw.githubusercontent.com/Techposts/AmbiSense/refs/heads/main/Assets/AmbiSense.webp" width="300" alt="AmbiSense Logo">
44
</p>
55

6-
> ### 🔧 v6 is a ground-up rewrite — in progress
6+
> ### 🚀 v6.0.0 shipped — full ESP-IDF + FreeRTOS rewrite
77
>
8-
> We're moving AmbiSense off Arduino onto **ESP-IDF + FreeRTOS** so the firmware
9-
> can drive radar reads, LED rendering, web serving, and ESP-NOW peer-mesh as
10-
> independent tasks instead of one cooperative `loop()`. v6 also adds
11-
> **LD2450 multi-target tracking**, a **modular radar driver layer** (LD2410 /
12-
> LD2412 / LD2420 / LD2450 / sim — switch via web UI without reflashing), a
13-
> **board picker with editable pin map** for ESP32-C3 / ESP32 / S3 / C6, a
14-
> **peer mesh** for U/L/asymmetric stairs (no more master/slave), **OTA
15-
> updates**, **captive portal**, and a **brand-new web UI** designed in
16-
> Claude Design.
8+
> v6 is a ground-up rewrite from Arduino onto **ESP-IDF + FreeRTOS**: independent
9+
> FreeRTOS tasks for radar read, motion smoothing, LED rendering, web serving,
10+
> and ESP-NOW peer-mesh — no more cooperative `loop()` starving the LED
11+
> render under HTTP load. v6 ships with **LD2450 multi-target tracking**, a
12+
> **modular radar driver layer** (LD2410 / LD2412 / LD2420 / LD2450 / sim —
13+
> swap via web UI without reflashing), a **board picker with editable pin map**
14+
> (ESP32-C3 / ESP32 / S3 / C6), a **peer mesh** for U/L/asymmetric stairs
15+
> (every device runs identical code; lowest-MAC wins coordinator),
16+
> **asymmetric pairing** (click Pair on either device → both join), a
17+
> **Kalman-based motion filter** (3 user knobs instead of v5's 5 cryptic
18+
> gains), **OTA with rollback**, **captive portal**, **PBKDF2-SHA256 auth**,
19+
> and a **fully responsive Preact web UI** (sidebar on desktop, bottom-tab
20+
> nav on mobile).
21+
>
22+
> **Recommended hardware: ESP32-S3 (DevKitC-1 or S3-Zero).** ESP32-C3 SuperMini
23+
> is supported for single-strip installs. See
24+
> [docs/HARDWARE.md](docs/HARDWARE.md) for the full board recommendation
25+
> table and known issues.
1726
>
1827
> | Branch | Purpose |
1928
> |---|---|
20-
> | `main` | v5.1.1 Arduino release — stable, do not break |
21-
> | `v6-idf-rewrite` | active rewrite (this PR series) |
22-
> | `legacy/v5-arduino` | frozen archive of the v5.x line |
29+
> | `main` | v5.1.1 Arduino release — stable |
30+
> | `v6-idf-rewrite` | v6 development branch (current) |
31+
> | `legacy/v5-arduino` | frozen archive of the v5.x Arduino line |
32+
> | tag `v6.0.0` | v6 release |
2333
> | tag `v5.1.1` | last Arduino-era release |
24-
>
25-
> Current status: **PR #1 of 5 — IDF skeleton merged.** Wi-Fi + web (#2),
26-
> radar + LED engine (#3), peer mesh + topology (#4), and the new UI (#5)
27-
> follow. Each PR is independently flashable; releases will be tagged
28-
> `v6.0.0-alpha.N` until P5 ships.
2934
3035
## v6 quickstart (ESP-IDF, requires `v5.3` LTS)
3136

docs/HARDWARE.md

Lines changed: 62 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ For locked architectural decisions about which boards/sensors are
44
supported, see [`V6-ARCHITECTURE.md`](V6-ARCHITECTURE.md). This file
55
covers the practical "I have hardware in front of me" stuff.
66

7+
## Board recommendation (read this first)
8+
9+
| Tier | Board | Why |
10+
| ---- | ----- | --- |
11+
| **Recommended** | **ESP32-S3 DevKitC-1** *or* **ESP32-S3-Zero** | Dual-core LX7 @ 240 MHz, native USB-OTG (no CH340 driver fights), 512 KB SRAM. Wi-Fi/HTTP can be pinned to core 0 and radar+LED+motion to core 1 — slider floods can't starve the render loop. Headroom for v6.1 features (auto-topology, encrypted ESP-NOW, larger strips). Best choice for a stairwell with mesh peers. |
12+
| **Supported** | **ESP32-C3 SuperMini** | Single-core RISC-V @ 160 MHz. The validated v6.0 reference build. Fine for **single-strip, single-device** installs. The 300 ms client-side debounced-save shipped with v6.0 prevents HTTP saturation under slider drag. Stops being the right choice the moment you want >2 mesh peers or >300 LEDs. |
13+
| **Deprecated** | ESP32 classic (WROOM-32) | Older silicon, no native USB, no advantage over S3. Profile still builds; not recommended for new installs. |
14+
| **Avoid** | ESP32-C6 | Single-core, *less* SRAM than C3, and Wi-Fi 6 / Thread don't help AmbiSense. |
15+
16+
If you're starting from scratch and asked us "which board do I buy" → **S3-Zero**. If you already have a C3 SuperMini on the bench → it works.
17+
718
## Reference wiring (ESP32-C3 SuperMini)
819

920
This is the validated reference build for v6.0.
@@ -52,12 +63,17 @@ for v6, the firmware reads everything via UART.
5263

5364
## Supported boards (v6.0)
5465

55-
| Profile | Status | LED pin | Radar RX | Radar TX | Button | Status LED |
56-
| --------------------- | -------- | ------- | -------- | -------- | ------ | ------------- |
57-
| `esp32c3-supermini` | ✅ valid | 10 | 20 | 21 | 4 | 8 (active-low)|
58-
| `esp32-devkit` | builds | 5 | 16 | 17 | 4 | 2 |
59-
| `esp32s3-zero` | builds | 21 | 4 | 5 | 9 | 21 |
60-
| `esp32c6-devkit` | builds | 8 | 4 | 5 | 9 | 15 |
66+
| Profile | Status | LED pin | Radar RX | Radar TX | Button | Status LED |
67+
| --------------------- | ------------- | ------- | -------- | -------- | ------ | ------------- |
68+
| `esp32s3-zero` | recommended | 21 | 4 | 5 | 9 | 21 |
69+
| `esp32c3-supermini` | ✅ validated | 10 | 20 | 21 | 4 | 8 (active-low)|
70+
| `esp32-devkit` | deprecated | 5 | 16 | 17 | 4 | 2 |
71+
| `esp32c6-devkit` | builds only | 8 | 4 | 5 | 9 | 15 |
72+
73+
The `esp32s3-zero` profile is structurally validated (the firmware
74+
builds and the pinmap is correct for the AliExpress S3-Zero / S3-Mini
75+
clones) but Ravi's bench currently only has C3s — full hardware
76+
validation pending arrival of S3 units.
6177

6278
Profiles defined in
6379
[`firmware/components/board/board.c`](../firmware/components/board/board.c).
@@ -147,6 +163,46 @@ or any serial terminal at 115200 baud. Logs are also mirrored to a
147163
16 KB in-RAM ring buffer accessible at `GET /api/logs` once PR #2's
148164
web server is up.
149165

166+
### Device boots but second one isn't visible (no AP, no STA)
167+
168+
**Symptom**: After flashing, the device serial output shows boot logs
169+
but no AP `AmbiSense-XXXX` shows up on a phone scan and the device
170+
never joins Wi-Fi. First device works fine.
171+
172+
**Most common cause**: stale NVS holding a board profile for a
173+
different MCU (e.g., `esp32-devkit` saved on a C3 from a prior test
174+
flash). v6.0 ships an MCU-mismatch boot guard that catches this on
175+
new boots, but if you're upgrading from an alpha build the safest
176+
recovery is:
177+
178+
```sh
179+
idf.py -p /dev/cu.usbmodemXXXXXXX erase-flash
180+
idf.py -p /dev/cu.usbmodemXXXXXXX flash
181+
```
182+
183+
The erase-flash wipes the NVS partition so the device boots with
184+
factory defaults. Confirm with `idf.py monitor` — you should see
185+
`Board profile (default): esp32c3-supermini (ESP32-C3 SuperMini)`
186+
followed by netmgr starting AP.
187+
188+
### Slider in web UI throws ERR_CONNECTION_RESET
189+
190+
**Symptom**: Dragging a slider in the LED or Motion screen flood-fires
191+
`POST /api/settings` and the browser console fills with
192+
`ERR_CONNECTION_RESET` / `ERR_EMPTY_RESPONSE`.
193+
194+
**Cause**: The C3 is single-core. The HTTP server, ESP-NOW broadcast,
195+
radar UART, motion smoother, and LED render task all run on one
196+
RISC-V core. Sliders fire `onChange` ~30 times/second; each one was
197+
posting + reloading at full rate, saturating the httpd's
198+
`max_open_sockets = 7`.
199+
200+
**Fix**: v6.0 adds a 300 ms debounced-save on the client side
201+
(`useDebouncedSave` in `frontend/src/screens.tsx`). The slider only
202+
POSTs once you stop dragging, and multiple slider changes within
203+
300 ms get coalesced into a single batched request body. If you
204+
build the UI yourself, make sure you're on commit `0b63b6e` or later.
205+
150206
### Brownout reset loop
151207

152208
The C3's brownout detector is configured at threshold level 7 (~2.7 V).

0 commit comments

Comments
 (0)