Electron charging fault 1 hz

I have been having some trouble keeping Lipo batteries charged in our products that use the Electrons. The charging circuit faults, then of course, the battery charge drops to ~50% and I have to reset (remove briefly) the power to our product to reset the fault. This is not going to be acceptable in our application.

In our application, the electron connects to the cloud intermittently, but most of the time it is asleep, so there should be plenty of time for the batteries to charge, even if at only a trickle charge.

For the charging circuit, I have a shunt regulator supplying 5 volts, but by the time the charging voltage reaches the electron, passing through a Schottky diode and a fuse, to the VM pin the voltage was 4.37 volts. The battery voltage was 3.3 v to 3.4 volts. Occasionally I would measure the battery voltage and it was 3.29 v and the charging fault lite was on.

So, I assumed that the charging voltage was too low, and after observing that the charging circuit on the electron already has a diode isolating the USB port, I took out the fuse, and the Schottky diode I had in my charging circuit to raise the charging voltage. The charging voltage rose to 4.95 volts. Inserting my meter into the charging circuit, the voltage dropped to 4.79 volts and the charging current was 260 mA, which is too high for my shunt regulator. After disconnecting the power a couple of times, for some reason the charging current dropped to 90 mA, and has been staying there. I don’t know why.

I need to limit the charging current to no more than ~100 mA. If I could keep it below that, I’d like to.

So, I have a couple of questions: What voltage should the Lipo battery maintain?
What is the minimum voltage necessary to charge it?

Looking at the code below that I found in the community forum I see that there may be a way to limit the charging current, but there are two commands related to charging:

 // Set charging current to 1408mA (512mA + [0+0+512mA+256mA+128mA+0])
_pmic.setChargeCurrent(0, 0, 1, 1, 1, 0);

// Set input current limit to 2A
_pmic.setInputCurrentLimit(2000);

To limit the charging current that is drawn from my charging circuit, what commands do I need to employ? I would appreciate some guidance. The 512mA setting within the 1408mA command above is confusing to me. Is 512mA the lowest setting possible (000000)?

Code found on community forum:

// Configure PMIC
 _pmic.begin();

 // Set charging current to 1408mA (512mA + [0+0+512mA+256mA+128mA+0])
_pmic.setChargeCurrent(0, 0, 1, 1, 1, 0);

// Set input current limit to 2A
_pmic.setInputCurrentLimit(2000);

// Set input voltage limit to 4.8V (preventing the solar panels from operating below during charging)
_pmic.setInputVoltageLimit(4840);

What would that be?
If you mean the red chargning indicator LED (next to the LiPo connector) it's not a "fault" indicator but indicates whether the LiPo currently gets charged (LED on) or not (LED off) - the colour of the LED (even if red) does not indicate any fault condition.

Can you explain why?
The default charging current limit is set to 500mA.

But there is an elaborate thread about PMIC and LiPo charging in this forum already.
Try to work through that and maybe pin @RWB and/or @Rftop who are main contributors in that said thread.

@ScruffR said, “What would that be?
If you mean the red chargning indicator LED (next to the LiPo connector) it’s not a “fault” indicator but…”
Thank you ScruffR for commenting. I refer to the 1 hz red blinking charging LED as the fault LED. Yes, On is charging, Off is not charging. But 1 hz blinking is a fault indication.

“The default charging current is 500 mA.”
My question is, can the charging current be set to 100 mA instead? I could not see how it can be set lower than 500 mA. Is it possible to set it lower than 500 mA?

I don’t know why the charging LED went into fault condition when the charging voltage was 4.9 volts. My charging voltage must have been just a little too low. At a charging voltage of 4.9 volts it seems to be charging fine without a charging fault indication. 4.37 volts was just too low.

I would still like to know if I can limit the charging current lower than the default current, however. It doesn’t look like it can be set to lower than 500 mA to me. But I don’t know. The posts by @RWB and Rftop only talked about increasing the charging voltage I think. Not lowering it. I’ll look again.

1 Like

The reason I want to keep the charging current lower is that I already have the shunt regulator in my charging circuit in a product that I have in Beta test and I don’t want to have to re-design it. I designed the charging current with that shunt regulator because I observed that the charging current was normally less than 100 ma. I want to make sure it never goes higher if possible (through programming if possible).

Tom,
If your product is constantly re-charged with a 5V Supply, it should have no problems maintaining the Li-Po with the low duty cycle you mentioned.

I'm not sure why/if you would need to limit the current to 100 mA, but take a quick look at spark_wiring_power.cpp that Shows you the available Voltage Limits starting at Line #127. After a quick bench test of your power supply, choose the corresponding "Voltage Under Load" that produces ~100 mA from the 5V Supply.

 * Function Name  : setInputVoltageLimit
 * Description    : set the minimum acceptable input voltage
 * Input          : 3880mV to 5080mV in the increments of 80mV
                    3880
                    3960
                    4040
                    4120
                    4200
                    4280
                    4360
                    4440
                    4520
                    4600
                    4680
                    4760
                    4840
                    4920
                    5000
                    5080

Then, the PMIC will automatically vary the Total Current pulled from the external supply to maintain the Source's voltage output (with the max being ~ 100 mA). Note: this would also use the Li-Po as a source when the Electron is Awake and performing Cellular Tasks, which can be higher than 100mA at times.

As @ScruffR said, 512 mA is the minimum charge current that we can set w/ the PMIC. Using the setInputVoltageLimit is just an in-direct method to limit the Total Current. Again, I'm not sure why you would do that if you have an "endless" external supply source.

You have two choices, 4.112 V (default) or 4.208 V, see line #676 in spark_wiring_power.cpp
Be careful w/ 4.208 V, you will need to monitor the Temperatures before/during charging.

That depends on a lot of factors, but I think of it more as the relationship of the Current Demand verses the Resulting Supply Voltage. Read the 8.3.1.3.2 Input Source Qualification of the PMIC datasheet

You said the Li-po is @ 3.3 V, which isn't helping your testing.
But that shouldn't be a show-stopper when you have a 5V external supply and a Sleeping Electron.
Are you sure the Electron is actually getting into a low power sleep mode?

In theory, you could test your external supply to determine the lowest operating voltage (max current) that it can still produce clean and stable power. Then the only PMIC setting would be set setInputVoltageLimit to slightly higher than this value. Let the PMIC do the rest on it's own.

1 Like

Hmmm… your shunt voltage regulator probably changes things. I missed that.