Skip to main content

Sourced from docs/hardware.md in the firmware repo.

Nimbus Hardware Reference

Pinout, wiring, flashing ports and power for the hand-built Solide S3 board (ESP32-S3-DevKitC-1 N16R8). Use it when building or repairing a board, adding battery sensing, or when a fresh board will not flash. The pin map's source of truth is board_solide_s3.h in the public solide-drivers repository; its build guide and hardware notes cover the board itself. This page is the Nimbus-side view.

Board configurations​

A Nimbus device runs in one of two display configurations, one per board. The hand-built Solide S3 board drives a 2.8" color touchscreen alongside its LED ring (scrModel=tft). The other is an off-the-shelf all-in-one module, the Freenove ESP32-S3 Display (CYD), that arrives as a single part and runs its own firmware image.

ConfigurationDisplayInputscrModelBoardDetails
Touch TFT2.8" ILI9341, 240×320 RGB565XPT2046 resistive touchtftsolide_s3→ pinout, wiring, touch cal
All-in-one (Freenove CYD) (lowest effort)2.8" ILI9341, 240×320 capacitive touch (3.5" and 4.0" images are host-verified only)Touchtftfreenove_s3→ pinout & happy-path build

The Solide S3 pinout:

touch-TFT pinout

The all-in-one has its own complete pinout on its page: All-in-one (Freenove CYD).

For a hand-built Solide S3 board, python3 tools/setup_device.py stores scrModel=tft over UART before production firmware boots, so the board binds its display and touch drivers on the first boot. It is hardware identity, not a preference: read once at boot to pick the drivers, so a change needs a restart, and it is exempt from "Revert to Defaults". Surfaced as scrModel in /api/state and scr= in STATUS.

The all-in-one is different: its pinout is a compile-time identity chosen by SOLIDE_BOARD=freenove_s3 at flash time, and scrModel is fixed to tft. There is no display setting to pick and nothing to wire. The only choice is the panel size (2.8", 3.5" or 4.0"), which picks the firmware image when you flash: the installer asks once, or takes --size 28|35|40. The 3.5" and 4.0" images are host-verified only.

Everything below this section covers the Solide S3 board. The all-in-one carries the same peripherals on a different, fixed pinout, covered in full on its own page.

First flash of a fresh board: use the UART port​

The DevKitC-1 has two USB-C ports, and only the UART port can flash a factory-fresh board. On the wrong port a fresh board looks dead.

Port (silkscreen)Goes toAuto-reset into download mode?
UARTCP2102N bridge → GPIO 43/44, and DTR/RTS wired to EN + GPIO 0YES - electrical, always works
USBthe ESP32-S3's own USB peripheral (GPIO 19/20)Only while the ROM owns it

For the first flash of a fresh board, plug into UART. esptool toggles DTR/RTS, the auto-reset circuit physically pulls GPIO 0 low and pulses EN, and the chip enters download mode. No buttons, and it does not care what firmware is running, because the path is electrical rather than software-cooperative. For a production install, use the guarded installer:

python3 tools/setup_device.py

It finds the connected boards by their USB descriptor (the UART bridge or the native USB port; with several, it lists them and can blink one to identify it), reads the chosen board's factory MAC and saved settings (NVS) without changing them, asks only what it cannot detect (the operating mode on a blank board, and the display size on a Freenove that has none saved), and confirms before any upload. A temporary serial diagnostic then seeds and verifies the board's settings, and production firmware is installed last. NVS is never erased: a configured board keeps its Wi-Fi, keys, pairings, and device sign-in code. Do not run a bare pio run ... -t upload with more than one board connected, because PlatformIO may select a different serial device than the one you intended.

The full flashing guide - the installer in detail, reflashing a running board, recovery, and which build environment to use - is Flash the firmware.

[env:provision] is a standalone serial network diagnostic, not the product firmware. It does not serve the Nimbus setup network or web settings. If it was flashed accidentally, run python3 tools/setup_device.py to replace it with the production firmware.

The board appears as a CP210x (10c4:ea60, /dev/cu.usbserial-* or /dev/cu.SLAB_USBtoUART) rather than an Espressif device.

Why the USB port can leave a fresh board unflashable​

The native USB port talks to the S3's own USB peripheral. Whoever owns that peripheral decides whether a reset is possible:

  • ROM owns it → USB-serial-JTAG (303a:1001), and esptool can reset it.
  • An app owns it (any TinyUSB/Arduino USB-CDC firmware, including the demo these kits ship with) → a plain CDC-ACM device such as 303a:4001 ("Espressif CDC Device"). DTR/RTS are then virtual: they do nothing unless that app implements a reset handler. The shipped demo does not.

In that state there is no software path to download mode at all - verified against a factory-fresh unit: --before default-reset, --before usb-reset, --before no-reset, the 1200-baud touch (every DTR/RTS polarity), a libusb bus reset, and racing esptool against repeated resets all reach Connecting… and never sync.

⚠ A libusb bus reset (tools/usb_reset.py) resets the USB link, not the CPU. It is the right tool for a wedged CDC on a Nimbus board; it cannot restart the chip or reach download mode.

Do not strobe DTR/RTS on this board. Repeated strobing has wedged a board's native USB CDC into silence.

Once Nimbus is on it​

Nimbus also owns the native USB, but its [env:test] build has the REBOOT console command and a task watchdog, so it stays reachable and either port works for reflashing. The UART port remains the guaranteed path if a build ever wedges.

Shared peripherals​

These are present on the Solide S3 board. The display + touch pins are on the Touch TFT page. The all-in-one carries the same peripherals on its own fixed pinout - see All-in-one (Freenove CYD).

PeripheralBusPinsRailNotes
microSDSPI2 (FSPI)CS 10 · MOSI 11 · SCK 12 · MISO 133.3 VMust be FAT32: exFAT (the factory default on cards above 32 GB) mounts as cardType!=0, ok=false; reformat as FAT32 ("MS-DOS (FAT)" on macOS) before first use. Holds the Orchestrator's memory store. Needs a shared GND (a cold GND joint reads cardType=0).
LED ring WS2812B ×45RMTDIN 215 V pwr / 3.3 V logic~372 mA worst case @ brightness 30
Speaker MAX98357A I²S ampI²S1 (std)BCLK 7 · LRCLK 8 · DIN 17amp 5 VClass-D, built-in thermal/over-current protection (V0.1)
Mic I²S MEMS (INMP441/ICS-43434)I²S0 (std)BCLK 15 · WS 18 · SD 163.3 V only ⚠L/R→GND (left slot); VDD/data follow VCC - 5 V damages the S3
Battery sense (optional)ADC1GPIO 4-resistor divider off the pack - see Battery voltage sampling
A warm or hot SD card is an electrical fault

Disconnect power immediately and remove the card. Do not reinsert it while the device is powered. Formatting and firmware cannot make a card hot: verify the socket/module orientation and pin numbering, confirm its VDD is 3.3 V (never 5 V), check continuity from every ground to system GND, and check that 3.3 V is not shorted to ground before applying power again. Nimbus runs safely without the card, using its reduced internal-flash tier.

The SD card uses dedicated SPI2 pins (10/11/12/13). TFT + touch use a different SPI3 bus (42/41/1 plus their selects). They do not share SPI data lines, but they do share the 3.3 V rail and ground; an SD power fault can therefore brown out or damage the display even though its bus is separate.

Reserved (never assign): 0·45·46 strapping · 19·20 native USB · 43·44 UART0 · 26–32 flash · 33–37 OCTAL PSRAM. GPIO 48 drives the DevKit's on-board RGB LED and is the touch CS on the Touch TFT build. Free spares: 3 · 4 (battery sense) · 5 · 6 · 9. (18 = I²S mic WS/LRCLK.)

Nimbus V0.1 moves audio to two separate, well-protected breakouts: a MAX98357A I²S amp + an INMP441/ICS-43434 I²S MEMS mic (replacing the old combined PDM-mic + NS4168 board). Mic RX (I²S0) and speaker TX (I²S1) are independent controllers, so record + play run concurrently.

Power​

USB-C → 2S BMS → 2×18650 (series) → DC-DC → 5 V bus. The 3.3 V rail (MCU, display, SD, audio, mic) is always on; the 5 V bus (LED ring, amp volume) is switchable - so the ESP32 + display + SD + input + mic all run on USB alone.

Battery voltage sampling (how to add it)​

The board has no built-in gauge. Two options; the firmware supports both behind build flags (default = NullMonitor, i.e. desk-powered, battery UI hidden):

Option A - resistor divider + ADC (implemented, NIMBUS_HAS_BATTERY_ADC)​

Cheapest path, no extra chip. Tap BAT+ before the DC-DC - the regulated 5 V rail is flat and tells you nothing about charge. Wire a divider into a free ADC1 pin (GPIO 1–10; Wi-Fi owns ADC2 = GPIO 11–20, which reads garbage while Wi-Fi is up):

  • Ratio: (220k+100k)/100k = ÷3.2, so 8.4 V → 2.63 V, inside the ADC's ~0–3.1 V range.
  • Firmware: AdcBatteryMonitor (src/hw/power_battery_adc.cpp) averages analogReadMilliVolts(GPIO4), multiplies by the divider ratio (3.2 by default) → pack mV, divides by the cell count (2 by default) → per-cell mV → the chemistry's SoC curve (host-tested).
  • An optional divider that is not fitted leaves the ADC pin floating. Firmware accepts telemetry only across a broad 2.5–4.5 V/cell plausibility window; outside it the board behaves as desk-powered with no battery gauge. This keeps a USB-only fresh board awake instead of mistaking a floating reading for a dead pack and entering low-battery sleep during setup.
  • Config: the sense pin (GPIO 4) and the default 2S cell count come from the board map (board_solide_s3.h in solide-drivers); the divider resistors and the cell count are runtime settings (see Battery hardware settings in the web UI). NIMBUS_HAS_BATTERY_ADC is on in every firmware build, and the NIMBUS_BATT_* values in include/nimbus_config.h are only fallbacks (NIMBUS_BATT_VBUS_PIN -1: no USB-present pin).
  • Single-cell LiPo instead? Fit a ÷2 divider (e.g. 100k/100k) on GPIO 4, then under Device > Settings > Battery set Sense resistor (top) and Sense resistor (bottom) to the fitted values and Cells in series to 1S (one cell), and save. No rebuild is needed.

Measured on a 2S pack with NIMBUS_HAS_BATTERY_ADC enabled: 7923 mV, or 3962 mV per cell. The S3 ADC under-reads near full. The ÷3.2 node at 8.4 V is 2.625 V, above the ADC's linear region at 11 dB attenuation (accurate to about 2.45 V, compressed above), so a truly full pack reads about 7.9 V, roughly 72 % rather than 100 %. The firmware allows for this: charge state comes from the voltage trend rather than absolute voltage (there is no VBUS pin, NIMBUS_BATT_VBUS_PIN -1, so external power is inferred), and a full-charge anchor (BATTCAL on the console, or Calibrate Full Charge in the web UI) stretches the compressed top band so full reads 100 %. A lower divider (about ÷4, keeping the full-charge node at or below 2.1 V) would make the top of the range linear and remove the need for calibration; a candidate for the next board revision.

⚠ Cautions: use ADC1 (1–10) not ADC2; keep the divider high-value (≥100 kΩ legs) so it barely drains the pack, and never let the divider node exceed ~3.3 V. GPIO 3 is a strapping-adjacent pin - GPIO 4/5/6/9 are cleaner choices (the board doc designates 4).

Option B - I²C fuel gauge (stubbed, NIMBUS_HAS_FUEL_GAUGE)​

A MAX17048-class gauge (I²C addr 0x36) models SoC in hardware (more accurate, survives sag). Impl exists at src/hw/power_fuelgauge.cpp; wire SDA/SCL to a free I²C-capable pair + a VBUS-sense pin, set the pins in nimbus_config.h, build with -DNIMBUS_HAS_FUEL_GAUGE.

Either monitor feeds the same portable power::Manager → the battery header glyph, the T1 (force the Dark battery mode + Telegram ping) / T2 (flush + deep sleep) thresholds, and the VBUS→Full battery-mode auto-switch.

Security note​

Web/LAN surfaces are token-gated - see security.md.

Battery hardware settings in the web UI​

Boards differ: some carry the design 220k/100k divider (÷3.20), others 270k/120k (÷3.25), and packs range from 3500 mAh cells to reclaimed ~500 mAh cells. These are runtime settings, not build flags. Under Device > Settings > Battery, the Battery hardware fields are Pack capacity, Chemistry (Li-ion / LiPo or LiFePO4), Cells in series (Board default, 1S or 2S, capped at the board's physical cell count), an optional Custom curve, and Sense resistor (top) / Sense resistor (bottom). They are stored in NVS (battCapMah, battChem, battCells, battCurve, battRtop, battRbot; see Config and NVS) and applied live (the ADC is re-armed and the model capacity updated on the main task). The cell count defaults to the board's value (2S on the Solide S3, 1S on the Freenove all-in-one) and can be overridden. Defaults match the compile-time constants, so an unset board is unchanged.

Set the resistors actually fitted: with the 220k/100k default on a 270k/120k board, voltage reads about 1.6 % low across the whole range, and calibration only corrects the top. /api/state reports dividerX100 as the effective ratio the ADC applies (the configured resistors on a hand-built board; the fixed onboard divider on an all-in-one, which hides the resistor fields), so host-side tools can correct without double-counting. ⚠ A divider change re-scales every mV, so the BATTCAL full-anchor goes stale - re-run Calibrate on a full pack after changing resistors (the web UI prompts for this).

Measured battery reality (curve run #4, Board 2, 2026-07-16)​

The first complete full→cutoff drain on real hardware. 5.75 h, 3940 samples, 25 settle reads, zero thermal trips (die held ~50 °C). Owner-measured ground truths from a dedicated analyzer: capacity 3500 mAh, full = 8.40 V. Raw data + snapshots live with the Battery Lab, its own project at ristllin/nimbus-battery-lab (data/rescue/run4_FINAL_brownout.{json,csv}).

What it measured​

  • Total system power at LED bright=77/255: 4.21 W (608 mA average at the pack over 5.75 h to deliver 3500 mAh). This is the hard number every estimate below is anchored on.
  • Load-model correction k = 0.60: the datasheet model (200 + 45·60·b/255) predicted 1015 mA where the truth was 608. Two errors multiply: it returns 5 V-rail mA but is consumed as pack mA (a 2S pack behind the buck ⇒ ~1.33×), and the per-LED full-white constant (60 mA) is high - the run bounds real white at ~45-50 mA, since 45 LEDs × 60 mA @5 V would exceed the entire measured system draw.
  • Device base draw ≈ 0.6-1.0 W (derived, not measured: total 4.21 W minus the bounded LED share). ⚠ The one measurement that would collapse this range to a number is a drain at bright=0 - one pack cycle, highest-value next experiment.

Battery modes change what you see, not what the board draws​

Posture::Dark only stops lighting LEDs; it does not touch Wi-Fi, Bluetooth, or the CPU. The three battery modes (Dark / Balanced / Full) are a table of LED, screen and telemetry settings (profile.cpp), not radio or clock decisions. There is no power management: no esp_light_sleep, no esp_pm_configure, no setCpuFrequencyMhz, CONFIG_PM_ENABLE unset, CPU pinned at 240 MHz. The only esp_deep_sleep_start() is the critical-battery give-up path. Modem sleep is on only because Arduino defaults WIFI_PS_MIN_MODEM - never by intent, never tuned.

PosturePack drawLife on 3500 mAh
Drain @77/255 (run #4)608 mA5.75 h (measured, to cutoff)
Ring at 1% (run #7)209 mA16.7 h (measured)
Dark ≈ Calm ≈ Full-idle150 mA (1.11 W)~23 h (two-point solve)
For a week20.8 mA✗ not reachable
For a month4.9 mA✗ not reachable

The load model is now MEASURED, not derived (run #7, 2026-07-17)​

I(b) = 150 + 5.95·b mA at the pack, from two measured points - b=77 (run #4, 608 mA over 5.75 h to real cutoff) and b=10 (run #7, 209 mA over 15.39 h, 73 settle reads).

⚠ The derived 86-143 mA band MISSED. The true idle draw is 150 mA (1.11 W) - above the top of the estimate, so idle life is ~23 h, not 24-40 h. The optimistic end of that table was never real. Quote ~1 day, never "a day and a half".

⚠ 1% ring brightness is NOT ~0. It draws 60 mA on top of the 150 mA base - 29 % of total draw, costing 6.7 h of runtime (23.4 → 16.7 h). 45 LEDs make "1 %" collective.

Independent cross-check that passed: the measured slope implies ~42 mA/LED at full white vs the datasheet's 60 - the same over-estimate the k=0.60 capacity correction found by a completely different route (a measured 3500 mAh vs a two-point current solve). Two unrelated methods, one conclusion: the datasheet per-LED constant is ~30 % high.

⚠ Run #7 stopped at a 6000 mV FLOOR, not cutoff - 281 mAh (8 %) was still in the pack, so 3500 / runtime would OVERSTATE the current by 9 % (227 vs 209 mA). The delivered charge was recovered by reading its final settle voltage off run #4's measured curve. A floor-stopped run is also barred from the SoC curve (no 0 % anchor). Known bias: run #4's curve was built at 0.17C and run #7 ran at 0.05C, so its settle reads recover higher and the curve over-reads its SoC, so the true I(10) is a little above 209 mA and the true base a little above 150 mA. A drain at brightness 0 would measure the base directly, with no extrapolation.

Idle draw is the same within noise whichever battery mode is active: the LEDs are not the idle load, the always-on radios and the 240 MHz CPU are. A week is not reachable by tuning, and not even by deleting the LEDs: 45 WS2812Bs draw 0.6-1.0 mA each with every pixel black (~19-30 mA at the pack, no load switch on the LED rail) - the dark strip alone exceeds the whole 20.8 mA week budget. An S3 at 240 MHz with Wi-Fi associated is ~10× the month budget by itself. A week needs a MOSFET on the LED rail + light-sleep with duty-cycled wake; a month needs deep sleep

  • architecturally incompatible with "Notifier shows live BLE-pushed status".