Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with Unreliable Battery and External Power Detection #222

Open
melkati opened this issue May 19, 2024 · 0 comments
Open

Issues with Unreliable Battery and External Power Detection #222

melkati opened this issue May 19, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@melkati
Copy link
Owner

melkati commented May 19, 2024

Description:
The current implementation of battery and external power detection in the "CO2 Gadget" meter is encountering reliability issues. This affects various aspects of the device's functionality, including CPU frequency fluctuation and inconsistent behavior in screen activation and deactivation.

Additional Clarification:

When the battery charge is low, the charger built into the ESP32 board initiates recharging, causing a drop in battery voltage. The extent of this drop varies based on hardware specifics. It takes time for the voltage to recover and surpass a threshold (approximately 4.45V), which the CO2 Gadget uses to determine external power usage. Consequently, there might be a delay in the battery icon reflecting the switch to external power.
Voltage fluctuations occur during CO2 sensor measurements, such as with an SCD30 sensor, where current spikes during measurements, potentially leading to voltage dips below the 4.45V threshold. This can cause the CO2 Gadget to incorrectly assume battery power, toggling between battery and external power modes.
Configuration settings, like keeping the display on when connected to external power and off on battery, can exacerbate the issue. Voltage drops when switching to battery mode may trigger the display to turn off. Subsequently, reduced power consumption can cause voltage to rise, resulting in a cycle of on/off states, reflected by the battery icon.
It's important to acknowledge that hardware variations contribute to these issues. While hardware control is limited, using quality wires, reliable power adapters, and good-quality batteries can mitigate these issues.
Proposed Resolution:
Implement a more robust detection mechanism tailored to each specific board, considering voltage thresholds and fluctuations during sensor measurements. Additionally, optimize functionalities dependent on power state to handle detection errors more effectively.

Impact Assessment:
Addressing these issues will enhance the stability and performance of the "CO2 Gadget" meter, ensuring a more consistent user experience.

@melkati melkati added bug Something isn't working enhancement New feature or request labels May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: Low priority
Development

No branches or pull requests

1 participant