-
Notifications
You must be signed in to change notification settings - Fork 964
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
fix: Wireless Paper (v1.0 & v1.1) not showing battery percentage #3208
fix: Wireless Paper (v1.0 & v1.1) not showing battery percentage #3208
Conversation
@code8buster I do realize the suggestion was that the deprecated interface should be avoided. #3131 (comment) I did look into the new API, but as far as I could tell (and I'm no expert), the required methods haven't yet been implemented in the Heltec Enviornment, despite recent releases. |
same as Heltec Tracker schematic, charge voltage is around 4.15V (average), isCharging in my case is working only with full battery as the lookup table i use measures anything above 4150mV as fully charged, so by going over that it recognizes it's connected. For the usbPower also there is the same problem. I don't understand why the charge output of the TP4057 isn't connected even if would be pretty simple to do so afterwards (DIY). |
@Gabrielerusso Sorry, that was an accident; I bumped the button. I know you've already reviewed it. Thanks for your input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really have hardware to test this with, but it does pass the smell test.
It's possible that your code for reading adc2 is actually better overall.
I never found anyone to test the "workaround" with a heltec v2/2.1 that was also connected to wifi.
Addresses #3131
Affects:
Boards which are both:
As far as I am aware, this is currently only Wireless Paper V1.0 and V1.1.
Presumably any new boards meeting the criteria will suffer from the same issue?
Caveats:
usbPower
andisCharging
are not working correctly.Looking at the schematic, it might not be possible to get the necessary information (?)
VBAT
hovers around 3.9VC̅H̅R̅G̅
pin of the TP4054 Li-lon Battery Charger IC does not connect to the MCU, only to an orange LED.Code changes:
ADC config in
variant.h
(both boards)Use gate
ADC_CTRL
to connect / disconnect voltage dividerFor ESP32S3: avoid "ADC2 wifi bug workaround". Not required for S3, and breaks compile:
firmware/src/Power.cpp
Lines 271 to 273 in 1d44815
Instead, check the
esp_err_t
returned byadc2_get_raw()
to confirm that read was successful.For ESP32S3: handle new enum value in logging:
firmware/src/Power.cpp
Lines 428 to 433 in 1d44815