PMIC (only sometimes) not charging when battery voltage is below 3.5V

@RWB @calebatch we do not currently use the USB data lines to my knowledge to set the charing rate, and we specifically disable that data feature. As @RWB points out both inputs VUSB and VIN lead to the same input on the PMIC. The charging rate should likely not be set to 512mA unless the system firmware is running when the power source is applied. I’m going to ping @mohit and see if he has any ideas here on what might be going on.

It’s hard to tell exactly what is going on without a schematic of what his setup is.

He said there are other sensors pulling from the battery also so maybe his solar panel is not up to the task of powering all the sensors + charging a dead Electron?

@calebatch can you measure how much current is being supplied when you supply 5v to the VIN pins on the Electron with all your other equipment hooked up the same as it is out in the field?

I’m curious how much power everything except the Electron is supplying.

I found out literally 5 minutes ago there is a diode on our board that brings the 5v to about 4.93v. The head scratcher is about half of the boards charged just fine and the other half would turn on but not charge. I removed the diode and it charges 100% of the time. This was with nothing connected but the electron and the pcb board so no other power drains. So @RWB you were right the board was the fault, but I am still confused as to why. The pmic should charge at that lower voltage.

If you were powering the Electron via the USB port, then the power was flowing through the Vbus line to another diode which may have been pushing the voltage even lower which may be low enough to keep the PMIC from charging.

I see you’re using this code : pmic.setChargeVoltage(4208); to set the charging voltage limit but maybe when the Electron goes back to the default state when VUSB/VIN power goes away and returns while asleep?

he PMIC will change it’s charging rate to the default of 50mA, and it may also reset the minimum input voltage to something above what you’re getting with the dual diodes in the Vin/Vbus line?

@BDub Do you know what the default input voltage limit is on the Vin/Vbus input line?

@calebatch could you provide a simple schematic. I’d like to understand where the diode is. Forgive me if you already provided this sometime ago, I don’t think so though. You can PM to me if you’d like.

Default input USB voltage should be 4.36V https://github.com/spark/firmware/blob/develop/system/src/main.cpp#L333

1 Like

This is what got me stuck. On my pcb we have a 5v regulator that goes though a protection diode and into the Vin pin on the electron. So the Vin pin was getting ~4.3-4.4V so diode tolerances would explain why sometimes devices would charge and other times it wouldn't. I removed the diode and it charged up at 1.2A as expected from 3.2v to 4.192v.

So I guess @RWB solved it. So my last question is can I lower the charging voltage on units stuck in the middle of nowhere so that they charge up? There are people who can turn the electrons into safe mode for me but they can't do much else.

1 Like

@calebatch Yes you can :slight_smile:

Alright, I’m gonna go for it. If this works I owe you a beer.

While that will work, there is a reason the default is left at 4.36V. The VUSB on the Electron goes through a Schottky diode before it gets to VIN, so your VIN doesn’t backfeed VUSB with more than 5V. Remember VIN can handle higher voltage on the Electron (up to 12V). Same is true for Photon though (up to 5.5V). 4.36V is the minimum we require at VIN because the PMIC needs some overhead to ensure it can charge the battery up to 4.2V (4.112V by default for safety at wide temperature range).

If you lower the input voltage requirement in software, it may charge, but won’t fully charge.

Best advice would be to replace your (and I’m guessing here based on what you said) standard fast acting rectifier diode which likely has 0.7V drop with a low forward voltage diode like the Schottky on the Electron. This should produce only a 0.2V drop at 512mA charging current… a bit more to run the Electron while charging but no more than 0.3V I’d say (even with your 1.2A charging).

:warning: BTW, be careful with the 1.2A charging. Make sure you are not running the Electron in hot environments because I believe we turned the charging rate down to 512mA to avoid situations where the Electron is in a hot ambient environment and not getting any cooling. Definitely recommended to validate changes to default settings, stay curious!

3 Likes

Changing diodes is probably what I will do. And I am also monitoring the internal temps as well. We think we can fast charge in the morning when it is relatively cool outside and be near max battery capacity by the time it gets too hot to charge at a high rate.

2 Likes

My very new battery went dead (for the first time) and now it won't charge. I've read this thread, and a couple more, but I'm not sure what the fix is, if any. Right now I have a voltage of 3.05 and charge level is 0. Battery will not charge; I've tried different chargers, all night, etc.

I'm probably hitting this case:

The LiPo battery has a protection circuit in it that will open circuit (with high impedance) the battery terminals when the battery voltage goes below 3.0V. It will look like the battery has 0V on it if you measured it. It will close the protection circuit once a charging voltage is applied to the battery. This can usually be done by plugging the Electron into a USB power source.

Is the only solution to this the addition of more hardware? I dont understand how to trick the PMIC to charge the battery, or if this is even possible.

Thanks!

A Li-Po at 3.0 Volts is completely discharged and many people would consider re-charging that cell dangerous, especially if it drops any lower.

If you've tried multiple chargers, I'd vote that it's time to properly dispose of that battery.

Just a note to anyone: Please use a fire-proof Li-Po bag when attempting to revive 3.7V lithium ion chemistry.
A Li-Po bag is cheap.....

1 Like

Agreed, but I thought the PMIC was supposed to stop this from happening. This is a brand new battery and the first time that it had been discharged completely. (Where “completely” == no Electron power)

So, I’m curious as to the actual problem - hardware? software? both? battery? Maybe it’s the battery connector voltage drop? Maybe it’s the fact that I’m in no cell reception and the modem is searching for towers, which means power draw and not much extra for battery charging?

For others that have this problem - I was able to get it to start charging by simply unplugging and plugging the battery multiple times, in multiple combinations. Such as:
1. Power on without battery, then plug in battery.
2. Power on with battery only, and before it runs down (<1min), plug in power.
3.Repeat 1 and 2 several times due to frustration. :slight_smile:

Then, I noticed via Serial output that the charge level was starting to increase and voltage had made it up to 3.8v. Charging is slow - I expect it to take most of the night to fully charge, which seems about normal to me, given I am not in cell phone reception, so it’s searching for signal, and probably using max power.

The PMIC will not stop the battery from draining flat.

You have to program when to put the Electron to sleep based on the battery SOC and or battery voltage level. That’s what many people have done successfully to prevent over discharges and data corruption that can happen during low voltage conditions.

I have some code on here that shows how to easily do this if your interested in looking or trying it out.

Also the PMIC charges in Precharge mode, low current charging when the battery voltage is in a low region like yours I think, I could be wrong about if this feature is enabled by default but if it is that could be a reason for the slow initial recharging of the empty cell.

2 Likes

Thanks for the answers. Yes, if you could point me to your code examples, I would like to implement Electron sleep at low battery. I was getting ready to start with the sleep features of the Electron anyway…

@szman22
I have some code to stop extreme discharge. It checks the battery charge (SOC) and sets the deep sleep time accordingly. It was inspired by @RWB but uses a slightly different approach. See the code in file particlesolar18a.ino starting around line 240 at the link below:

I also implemented code to prevent prolonged searching for cell connection (also inspired by @RWB) see code starting around line 375 at the above link. It will search for only 3 minutes before going back to sleep. It requires that one use SYSTEM_THREAD(ENABLED)
hope this helps.
john

2 Likes