Skip to content

Commit 80599b4

Browse files
committed
docs: update README to include battery monitoring features and commands
1 parent 97b910a commit 80599b4

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Firmware and tools for OpenIris — Wi‑Fi, UVC streaming, and a Python setup C
1515
- `tools/setup_openiris.py` — interactive CLI for Wi‑Fi, MDNS/Name, Mode, LED PWM, Logs, and a Settings Summary
1616
- Composite USB (UVC + CDC) when UVC mode is enabled (`GENERAL_INCLUDE_UVC_MODE`) for simultaneous video streaming and command channel
1717
- LED current monitoring (if enabled via `MONITORING_LED_CURRENT`) with filtered mA readings
18+
- Battery voltage monitoring (if enabled via `MONITORING_BATTERY_ENABLE`) with Li-ion SOC percentage calculation
1819
- Configurable debug LED + external IR LED control with optional error mirroring (`LED_DEBUG_ENABLE`, `LED_EXTERNAL_AS_DEBUG`)
1920
- Auto‑discovered per‑board configuration overlays under `boards/`
2021
- Command framework (JSON over serial / CDC / REST) for mode switching, Wi‑Fi config, OTA credentials, LED brightness, info & monitoring
@@ -158,6 +159,8 @@ Runtime override: If the setup CLI (or a JSON command) provides a new device nam
158159
`{"commands":[{"command":"switch_mode","data":{"mode":"uvc"}}]}` then reboot.
159160
- Read filtered LED current (if enabled):
160161
`{"commands":[{"command":"get_led_current"}]}`
162+
- Read battery status (if enabled):
163+
`{"commands":[{"command":"get_battery_status"}]}`
161164

162165
---
163166

@@ -241,10 +244,26 @@ Responses are JSON blobs flushed immediately.
241244

242245
---
243246

244-
### Monitoring (LED Current)
247+
### Monitoring (LED Current & Battery)
248+
249+
**LED Current Monitoring**
245250

246251
Enabled with `MONITORING_LED_CURRENT=y` plus shunt/gain settings. The task samples every `CONFIG_MONITORING_LED_INTERVAL_MS` ms and maintains a filtered moving average over `CONFIG_MONITORING_LED_SAMPLES` samples. Use `get_led_current` command to query.
247252

253+
**Battery Monitoring**
254+
255+
Enabled with `MONITORING_BATTERY_ENABLE=y`. Supports voltage divider configuration for measuring Li-ion/Li-Po battery voltage:
256+
257+
| Kconfig | Description |
258+
|---------|-------------|
259+
| MONITORING_BATTERY_ADC_GPIO | GPIO pin connected to voltage divider output |
260+
| MONITORING_BATTERY_DIVIDER_R_TOP_OHM | Top resistor value (battery side) |
261+
| MONITORING_BATTERY_DIVIDER_R_BOTTOM_OHM | Bottom resistor value (GND side) |
262+
| MONITORING_BATTERY_INTERVAL_MS | Sampling interval in milliseconds |
263+
| MONITORING_BATTERY_SAMPLES | Moving average window size |
264+
265+
The firmware includes a Li-ion discharge curve lookup table for SOC (State of Charge) percentage calculation with linear interpolation. Use `get_battery_status` command to query voltage (mV) and percentage (%).
266+
248267
### Debug & External LED Configuration
249268

250269
| Kconfig | Effect |

0 commit comments

Comments
 (0)