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

Ways to check power status ? #61

Closed
dannybackx opened this issue Apr 22, 2024 · 2 comments
Closed

Ways to check power status ? #61

dannybackx opened this issue Apr 22, 2024 · 2 comments

Comments

@dannybackx
Copy link

Hey,
I bought this board to be able to send warnings even if the house network is down, or the power.
So can the board measure its supply voltage by itself ? Or do I need external circuitry ?
Same question for the battery : can I measure its voltage level ?

Thanks

@lewisxhe
Copy link
Contributor

This board has a PMU that can monitor the battery voltage. If it is an external voltage, you need to build your own circuit to measure it.

@dannybackx
Copy link
Author

Meanwhile I have been experimenting and found out it can measure quite some stuff so looks like I can both detect when the battery is low but also when external power goes out and comes back :

I (18:38:40.891) power: Battery voltage 4199, percentage 86
I (18:38:40.898) power: Power: isCharging: YES
I (18:38:40.903) power: Power: isDischarge: NO
I (18:38:40.908) power: Power: isVbusIn: YES
I (18:38:40.913) power: Power: getBattVoltage: 4199 mV
I (18:38:40.919) power: Power: getVbusVoltage: 4969 mV
I (18:38:40.925) power: Power: getSystemVoltage: 4940 mV

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants