Description
Generally, an ESP32 is natively able to measure the full scale of its battery voltage. Unfortunately, in case of the Seeed Studio XIAO ESP32-C3 boards (used in this project), ESP32-C3 cannot do it because there is an LDO between it and the battery. The LDO limits the voltage to 3.3V, so, while the battery voltage is higher or equal to 3.3V, the ESP32-C3 "sees" only those 3.3 volts. The ESP32-C3 starts "seeing" the actual battery voltage only after it goes below 3.3V. Such a low voltage indicates that the battery has a very low charge left.
Currently, the device can detect that the battery is getting low by measuring the ESP32's VCC voltage once the battery voltage falls below the LDO's regulation range. This allows us to detect the low-battery range, but it does not provide any useful information about the battery charge level while the battery is within the normal regulated voltage range.
Implement a software-based battery charge estimator capable of providing an approximate charge level across the full usable battery range, from 100% to 0%, without requiring additional hardware.
The solution should:
- Work without a battery-voltage sensing circuit or other hardware modifications.
- Have as little impact as possible on the device's power-saving behavior and Deep Sleep operation.
- Estimate battery charge primarily from the device's own power-consumption history.
- Make use of VCC measurements in the LDO dropout region as a reliable low-battery reference.
- Detect charging and completed charging where possible using information already available to the ESP32 (including temperature).
- Account for battery aging and gradually adapt the estimated effective capacity over time.
- Avoid requiring manual characterization or calibration of each individual battery; the only battery-specific value expected from the user should ideally be its nominal capacity in mAh.
The detailed design, investigated approaches, constraints, and open questions are documented in the attached Software-Only Battery State Estimator for Seeed Studio XIAO ESP32-C3.md document.
Acceptance Criteria
Related Documentation
See the attached Software-Only Battery State Estimator for Seeed Studio XIAO ESP32-C3.md document for the detailed design and research notes.
Description
Generally, an ESP32 is natively able to measure the full scale of its battery voltage. Unfortunately, in case of the Seeed Studio XIAO ESP32-C3 boards (used in this project), ESP32-C3 cannot do it because there is an LDO between it and the battery. The LDO limits the voltage to 3.3V, so, while the battery voltage is higher or equal to 3.3V, the ESP32-C3 "sees" only those 3.3 volts. The ESP32-C3 starts "seeing" the actual battery voltage only after it goes below 3.3V. Such a low voltage indicates that the battery has a very low charge left.
Currently, the device can detect that the battery is getting low by measuring the ESP32's VCC voltage once the battery voltage falls below the LDO's regulation range. This allows us to detect the low-battery range, but it does not provide any useful information about the battery charge level while the battery is within the normal regulated voltage range.
Implement a software-based battery charge estimator capable of providing an approximate charge level across the full usable battery range, from 100% to 0%, without requiring additional hardware.
The solution should:
The detailed design, investigated approaches, constraints, and open questions are documented in the attached Software-Only Battery State Estimator for Seeed Studio XIAO ESP32-C3.md document.
Acceptance Criteria
Related Documentation
See the attached Software-Only Battery State Estimator for Seeed Studio XIAO ESP32-C3.md document for the detailed design and research notes.