-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Battery Status in "esp32dev" #221
Comments
There is no need to enable battery reading on a generic esp32 because the circuit is not present. I suggest to delete the lines
Battery status could be implemented/fixed also for a generic esp32 board but some components must be external. |
Fixed in sponsor version |
Previously (version 2.0), I've used a voltage divider as described, shown and implemented below...
Schematic Code from the old version ... and it worked quite well. Should I add something else? Any other external component or additional code line? I've checked the sponsors-only version of the code and it solved my previous problem, but the battery indicator did not show up. I've noticed, that almost all code lines connected to the battery status indicator are greyed out and labeled as undefined "BATTERY2". Do You have any idea how to solve this problem and unlock the Battery Status Indicator for "esp32dev"? Kind Regards |
Battery status has been abandoned on esp32dev because the generic board doesn't have enough hardware. |
I understand. I would really like to switch to TTGO, but it would be extremely difficult to modify my current setup. I've put quite a lot of work into that, and it would be pretty painful to abandon it without even finishing it. I'm using four 18650 3.7V cells, so it lasts pretty long. Adding a switch wouldn't be a problem either. I already did that for the MIDI DIN Diodes circuit. I don't know if this fix is time-consuming, but it would mean the world to me. If it is a problem, then don't worry - I totally understand and I don't want to be a problem for You. |
Really nice and clean job. |
Posted the new code.
|
It works perfectly! video-1622229156.mp4
I'm using a battery shield with a constant output voltage of 5.12 V, so the battery indicator based on values from that output would constantly show "full battery" / "charging" till the very end, then the battery would simply die out. Because of that, I had to connect to the plus side of the first cell in the circuit, to read the real cell voltage. The value shown in Pedalino Info is almost identical to the multimeter reading of this cell (± 0,03V). All four cells are discharged almost simultaneously (the biggest difference at about ± 0,15V), so this solution works quite fine. Thank You very much! |
Hello!
Do You have any plans to implement the "Battery Status" option in ordinary ESP32 without a battery connector?
In the older releases, it was implemented with the usage of the voltage divider and one GPIO (32 to 39).
I've tried to add it manually.
After uploading, it shows an error that "BATTERY_ADC_EN" is not defined.
"BATTERY_ADC_EN" is defined only in HELTEC_WIFI_KIT_32 and TTGO_T_DISPLAY. In other cases, only the "BATTERY_PIN" is defined.
I've tried to change "BATTERY_ADC_EN" into "BATTERY_PIN" in the above code, and the upload was successful, but the battery indicator didn't show up.
Kind Regards
The text was updated successfully, but these errors were encountered: