biologist79 / ESPuino

RFID-controlled musicplayer powered by ESP32

Home Page:https://forum.espuino.de

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Battery Visualization while Charging

SZenglein opened this issue · comments

I have been asked if it were possible to display charging progress while plugged in and turned off. Apparently it can be annoying to not see the charging state easily.

As this is not straightforward to implement, I want to gather a few ideas. Here is what I think is necessary:

  • Hardware for "plugged-in" detection: charge controller or if USB has 5V
  • A separate charging "off" state: muted, only LED active
  • (Optional) An interrupt for instantly detecting being plugged in/out

Maybe it could be implemented without much effort by keeping the LEDs powered on in Deepsleep and waking up every few seconds to update the charging state.
Alternatively, just idling with everything off and only showing percentage on the regular button combination would be a good solution.

This is already possible using my fepo or lipo-board. TP5000 provides a pin to indicate charge-state, so I routed it to a breakout pin "CHRG" of the develboard.
Please note: this pin is already used by the chrg-LED soldered on the develboard. Keep this in mind if you want to connect another LED. If this LED is removed, this chrg-pin could be connected to the port-expander. As chrg changes it's state when chrg is done, an interrupt is fired in this case. This would cause the ESP to wake up.