-
Notifications
You must be signed in to change notification settings - Fork 239
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
how to get battery voltage with esp32-sim800L #222
Comments
Have you found any solution? I need to monitor battery voltage and also detect if USB connection is active or not. |
If the PMU version is used, the PMU function can be used to directly obtain the voltage. https://github.com/lewisxhe/AXP202X_Library/blob/master/examples/axp_adc/axp_adc.ino If the power management of IP5306 is used, only the adc voltage of IO35 needs to be read. You can refer to here |
@lewisxhe Thanks for reply! I think, that this is PMU version, because it doesn't power off, when I change power source from USB to LiPo. But I tried each one library separately. So, what I achieved using this axp_adc.ino
And this FactoryTest.ino#L80
Am I missing something? |
You use IP5306, do you read IO35?
|
@lewisxhe
Maybe you can help with one more thing, I need to monitor USB Type-C input, if it is available or not. (don't need to know USB voltage). I will be very grateful to you! |
For everyone struggling in the same situation, I figured out how to check power source, USB or Battery.
Complete version of IP5306 registers, corresponding to power you can find here |
@lewisxhe |
esp32-sim800L can directly insert the battery, which is good, but how to get the remaining battery information? Or battery voltage?
thanks
The text was updated successfully, but these errors were encountered: