You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ Firmware and tools for OpenIris — Wi‑Fi, UVC streaming, and a Python setup C
15
15
-`tools/setup_openiris.py` — interactive CLI for Wi‑Fi, MDNS/Name, Mode, LED PWM, Logs, and a Settings Summary
16
16
- Composite USB (UVC + CDC) when UVC mode is enabled (`GENERAL_INCLUDE_UVC_MODE`) for simultaneous video streaming and command channel
17
17
- 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
18
19
- Configurable debug LED + external IR LED control with optional error mirroring (`LED_DEBUG_ENABLE`, `LED_EXTERNAL_AS_DEBUG`)
19
20
- Auto‑discovered per‑board configuration overlays under `boards/`
20
21
- 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
158
159
`{"commands":[{"command":"switch_mode","data":{"mode":"uvc"}}]}` then reboot.
159
160
- Read filtered LED current (if enabled):
160
161
`{"commands":[{"command":"get_led_current"}]}`
162
+
- Read battery status (if enabled):
163
+
`{"commands":[{"command":"get_battery_status"}]}`
161
164
162
165
---
163
166
@@ -241,10 +244,26 @@ Responses are JSON blobs flushed immediately.
241
244
242
245
---
243
246
244
-
### Monitoring (LED Current)
247
+
### Monitoring (LED Current & Battery)
248
+
249
+
**LED Current Monitoring**
245
250
246
251
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.
247
252
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 (%).
0 commit comments