Definitely sounds like something is up. If you send an email through to Core they can sort it out for you!
If your project is in a rush, you can still use it in the meantime, if the switch was completely removed, the charger would still work, just on the 50mA mode.
Problem is that a LiPo battery runs flat fairly quickly at the end; and how do you want to handle a flat battery ?
In this test, my DFRobot Solar Power “Manager” 5V board or the battery itself cut off power at 2.8V … but at 3.2v only had about an hour of charge left - not really long enough for me to notice, run around and fix it - and at 3.4V there was only 3 hours usage left. Your Mileage will of course be different.
I was disappointed (a) that the battery was allowed to run so low, but more (b) that the “manager” board is unable to give any warning to the connected microcontroller, and just cut power off.
Personally I would rather not let my LiPo battery run down so much. I also want my project to send a notification and power down semi-gracefully, not just suddenly die.
There are fairly simple steps you can take. Since then I have
added additional circuit to let the microcontroller detect the battery state,
added code to monitor the battery voltage and send notifications to Home Assistant when the voltage runs low, and
added code to extend the deep_sleep to 3 hours when voltage is below 3.4V to give me more time to recharge the battery.
started using the ESP32’s deep_sleep to wake for 2 minutes every 1/2 hour to make the battery last longer;
Single-cell LiPo batteries need some charge left in them to stay healthy. Depending on the manufacturer, most 3.7V LiPo batteries can only be discharged down to around 3V-3.2V before the battery’s internals start to sustain damage.
This damage normally results in an increased internal pressure and will start to degrade the battery capacity.
Because of this, a fair amount of LiPo batteries come with built-in over-discharge protection circuits. It never hurts to add in additional protection to your project, but in most cases, batteries with this function should do a decent job of managing this themselves.
thank you and thanks @Donald23173 - may I know how to add circuitry to protect the battery further? I only have a voltage divider now that I use to monitor the battery level, and have some code to put the ESP32 to deep sleep if the level falls beneath a threshold. Is there a way to implement a physical cut off system, that will open the circuit in case that minimum threshold is reached?
Thank you both for your notes, very useful and helps me understand more
My apologies, I missed the link to your specific lipo in your above post. Looking at the datasheet for that particular battery, it seems like its over-discharge protection will kick in around 2.5V, which is lower than I would personally feel comfortable relying on to get the longest life possible out of the battery.
Would you be able to tell us more about how you are powering your project? Do you have the battery wired directly into your ESP32-C3 or do you have some kind of voltage converter in between?
The following is all my personal experiences, presented for your consideration, and not as a recommendation or best practice - I am still learning. My own greenhouse project is currently going live, so my opinions may still change
monitoring battery voltage
Because i don’t trust my soldering I used breakout boards like Adafruit MAX17048 to monitor battery, and ended up with Adafruit’s INA3221 to also measure my solar panel and usb input power levels. [Beware of other INA3221 boards from Chinese sites as they are often wired differently for different usage.] This has proved overkill, with the battery voltage being the important measurement.
I assume your voltage divider is like Liam posted in #19 above, and it will do a very suitable job of indicating high and low battery voltages … though I expect it may take a bit of experimenting to find the actual values you want to use for your individual project.
physical cut-off
As you gathered from my previous post I am not happy with my power manager board’s “management capability”, and want to intervene before the battery voltage runs so low by adding my own protection. The makerverse charger CE08374 states it doesn’t do under-voltage protection, so you will also want to add your own.
The main protections are in the software, particularly extending the deep_sleep period on low battery … however I also added a relay on the solar panel circuit to disconnect the solar panel when the battery voltage is already high.
For low battery, the manufacturers apparently believe that our projects can either just die, or we will plug in a USB charger (which assumes there is mains power nearby). But I decided it would not be a good idea to take a USB charger on 15m mains power cord out to the greenhouse during the rain.
So I asked “how will I handle the situation when the LiPo battery runs down?”.
I considered using a relay to disconnect the microcontroller (the load) from the battery when battery is low … but this adds the complication of having to restart it later.
Instead, I thought I might run out to the greenhouse with a freshly charged powerbank and attach it to the USB In. Yes, there is a lot of inefficiency converting to and from 5V … but it intended as a last resort. Then I thought, what if I already have the powerbank in the greenhouse, but only connect it (via a relay) when necessary ? That should buy me enough time to get home before the greenhouse dies. In testing I found that this will work with my oldish 10,000mAh powerbank - though there is plenty of discussion about this not working.
Finally, after getting all this running on my bench and adding deep_sleep, I had a SNAFU … the relays only work while power is on … and deep-sleep physically powers OFF the ESP32 and relays. Answer was Gravity: Magnetic Latching Relay for ESP32 / Arduino.
And that’s where I am at the moment. Just moved it to the greenhouse last weekend, so not a final solution. My “power module” is probably overkill, and certainly has taken more planning and expense than the rest of the project I am considering swapping my ESP-S3 to a FireBeetle 2 ESP32 C6 IoT Development Board so I can connect LiPo and solar panel directly to the microcontroller … but not sure whether I will still need/want the latching relays.
Thank you so much for the long, detailed reply @Donald23173 . I don’t trust my soldering as well You have given me so much to think about. I think I will experiment with the Magnetic Latching Relay you mentioned, and will definitely explore the firebeetle 2 (I just wish I didn’t buy a a set of 5 ESP boards)
Thanks so much, I appreciate it
Regards, Eyas