Increasing Charge Current

Hello,
I have a Boron, which is running of a 10,400mAh battery. All seems to work fine while testing on bench, but I have noticed that the charge current is low (approx 70 - 80mA @ 57% SOC) while plugged into USB port.
I would like to charge the battery with >500mA, but I’m not sure how to implement that change.

I have read through all similar posts but I’m not getting it.:face_with_thermometer: What can I do to remedy the situation?

I have been tinkering with these few lines, but its not compiling for me. Any ideas?

PMIC pmic;
pmic.setInputCurrentLimit(1500);
pmic.setTermChargeCurrent(0,0,1,0);
pmic.setPreChargeCurrent(0,0,1,0);
pmic.setChargeCurrent(0,0,1,1,1,0);

Any help would be great…:blush:

You need pmic.begin();

 
PMIC pmic;   //  Initalize the PMIC class so you can call the Power Management functions below

void setup() {
  pmic.begin();
  // your pmic settings:
  pmic.setInputCurrentLimit(1500);
  pmic.setTermChargeCurrent(0,0,1,0);
  pmic.setPreChargeCurrent(0,0,1,0);
  pmic.setChargeCurrent(0,0,1,1,1,0);
  // the rest of your setup() "stuff" here
} //  End setup()

 void loop()   {
  }

But these are the values that I use for Boron LTE that result in ~800+ mA charging through USB:

  pmic.setInputVoltageLimit(4200);    //  Allows a voltage drop down to 4.2V on USB
  pmic.setInputCurrentLimit(2000) ;   // 2000 mA 
  pmic.setChargeCurrent(0,0,1,1,1,0); // 1408 mA [0+0+512mA+256mA+128mA+0] + 512 Offset

Make sure your USB power supply can handle more than 500mA. A USB v2 or earlier PC port can only supply 500mA as part of the specification. Although, a lot of wall chargers will support more.

Thanks for the quick replies. I have tried running an empty sketch with these parameters and a 2A USB supply. When measuring the current flow to battery, the multimeter reading that its charging the battery at 98 mA. The test sketch I’m working on is this:

PMIC pmic;   //  Initalize the PMIC class so you can call the Power Management functions below

void setup() {
  pmic.begin();
  // your pmic settings:
  pmic.setInputVoltageLimit(4200);    //  Allows a voltage drop down to 4.2V on USB
  pmic.setInputCurrentLimit(2000) ;   // 2000 mA 
  pmic.setChargeCurrent(0,0,1,1,1,0); // 1408 mA [0+0+512mA+256mA+128mA+0] + 512 Offset
  // the rest of your setup() "stuff" here
} //  End setup()

 void loop()   {
     delay(1000);
  }

During LiPo Charging, check the input Voltage at Vusb, and the LiPo Voltage at Li+.

Input Voltage while no battery is connected = 4.8v - 5v (not sure why this is varying so much form a 2A source)

During LiPo Charging: VUSB = 4.162v
During LiPo Charging: LiPo Voltage = 3.876v

When I try and get an amperage reading using the multi-meter, the orange light flashes rapidly, why would this be?:face_with_raised_eyebrow:

I’m going to get more reliable power source, just in case there is a connection issue within the USB connection…?

Thanks for help :yum:

Just wired directly from 5v power source (no connection issue).
Same result: During LiPo Charging: VUSB = 4.162v

Since the PMIC settings will try to maintain 4.2V minimum, it appears the Charging Circuit is operating correctly and that your source is not up to the challenge.

My results for reference:
830 mA charging current measured @ Li-Po,
5.205 V measured @ Power Supply, 4.35 V measured @ VUSB pin
(substantial loss in wiring at these "high" currents)

[Edit]
Note: Using 4.2V as the minimum setting, the PMIC actually started reducing current at 4.35 V measured at VUSB pin. I assume that's due to Voltage drop on-board since we can't measure the Voltage exactly at the IC ?

I see. Just added another more reliable source:
VUSB = 4.6v
LiPo Voltage = 4.00v
Low charge current persists. (approx 350mA)

Starting at Line 130 in spark_wiring_power.cpp, you can set the InputVoltageLimit as low as 3.88V if you want to get as much from your supply as possible.
This could represent a pretty significant load to the supply. I’m not sure of the consequences. That would be up to you to decide :wink:
pmic.setInputVoltageLimit(3880);

 * 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

Okay, thanks for the help so far, some testing done this AM. Results below.
Details are as follows:
Link to Battery Details
Unplugged battery details:
Battery#1 = 3.465V
Battery#2 = 3.934V

Battery #1
I am “publishing” battery Voltage & SOC to console. SOC on console = 80%. Battery Voltage value on Console = 4.11V but voltage measured via multi-meter (LiPO Voltage) = 3.465V. Charge current to battery = 57mA. VUSB = 4.3V. Charge light on constant (solid).
There also seems to be some issue keeping a reliable connection to the network, every 2-3 mins, the systems goes through flashing green to reconnect and then breaths cyan & sends data to console. Sometimes goes through the connection process several times before a connection is made. Any ideas what that may be?
Battery Removed:
VUSB = 4.8V. LiPo Voltage = 0, (but pulses every 20 seconds). No battery current as battery is removed.
Battery #2
I am “publishing” battery Voltage & SOC to console. SOC on console = 83%. Battery Voltage value on Console = 4.04V but voltage measured via multi-meter (LiPO Voltage) = 3.956V. Charge current to battery = 28mA. VUSB = 4.8V. Charging light flashing approx 10Hz. Reconnecting issue does not seem to occur.

The re-connection issue seems to be something which is new. But seems to be limited to when Battery#1 is plugged in (Low charge). Has not happened with Battery #2. (charged)

Battery #1 again:
I am “publishing” battery Voltage & SOC to console. SOC on console = 80%. Battery Voltage value on Console = 3.465V and the voltage measured via multi-meter (LiPO Voltage) = 3.465V, (was not expecting it to be this similar). Charge current to battery = 0.000mA. VUSB = 4.8V. Charge light (orange) flashes momentarily every 20s, (every time “pmic.enableCharging();” is called, I guess)

FYI - the particle runs off only battery#2 without the power supply attached. When I try this with battery #1 it disconnects and continues to flash green.

Any ideas for a test which might highlight the underlying problem?
Is it my particle? // the PMIC might be damaged?
Power source? // I have
My Code:

PMIC pmic;   //  Initalize the PMIC class so you can call the Power Management functions below
FuelGauge fuel;

void setup() {
  pmic.begin();
  // your pmic settings:
  pmic.setInputVoltageLimit(3800);    //  Allows a voltage drop down to 4.2V on USB
  pmic.setInputCurrentLimit(2000) ;   // 2000 mA 
  pmic.setChargeCurrent(0,0,1,1,1,0); // 1408 mA [0+0+512mA+256mA+128mA+0] + 512 Offset
  // the rest of your setup() "stuff" here
} //  End setup()

 void loop()   {
     pmic.enableCharging();
     float value = fuel.getVCell();
     float value1 = fuel.getSoC();
     String output = "{\"batt-value\": \"" + String(value) + "SOC" + String(value1) + "\"}";
     Particle.publish("fuel-level1", output);
     delay(20000);
  }

Changed:

pmic.setInputVoltageLimit(4200);    //  Allows a voltage drop down to 4.2V on USB

Now charging at 126mA on battery #1. LiPo-V = 3.7 VUSB = 4.3V.

Something still not right. Surly this is low even without changing any code? This is the wiring setup. Am I doing something stupid?

Test B: Connected battery directly to power source. Details:
Unloaded power source voltage = 5.2V

Test B1 - Connected directly to battery#2, Voltage = 4.3V Current = 600mA
Test B2 - Connected directly to battery#1, Voltage = 3.9V Current = 1.3A

@Rftop What do you think?

What you are reporting is strange.

A few thoughts that may, or may-not be relevant:
My charging current tests were performed with 0.9.0 firmware, Boron LTE
I haven’t repeated the tests with the newer firmware.
The 20 second delay() is not optimal.
I didn’t use any breadboard connections in my tests.
I used the actual Li-Po connector on the Boron.
( I measured current through the Neg Conductor between Li-Po Connector & Battery w/ a µCurrent GOLD)

You can simplify your testing with the Modem OFF.
The PMIC performs several checks and makes a few decisions so give the Boron a minute of runtime before you take Voltage and Current measurements.

SYSTEM_MODE(MANUAL);
SYSTEM_THREAD(ENABLED);

inline void softDelay(uint32_t t) {
  for (uint32_t ms = millis(); millis() - ms < t; Particle.process());   //  safer than delay()
}

void setup()  {

  // Li-Po Power Management :
  PMIC pmic;                                //Initalize the PMIC class so you can call the Power Management functions below.
  pmic.begin();

  pmic.setInputVoltageLimit(3800);          //
  pmic.setInputCurrentLimit(2000) ;         // 2000 mA
  pmic.setChargeVoltage(4208);              //  Set Li-Po charge termination voltage to 4.21V, CAUTION! not for everyone, Monitor Enclosure TEMPS
  pmic.setChargeCurrent(0, 0, 1, 1, 1, 0);  // 1408 mA [0+0+512mA+256mA+128mA+0] + 512 Offset
  pmic.enableDPDM();
  pmic.enableBuck();
  pmic.enableCharging();

  Cellular.on();        // Turn the Modem ON then OFF to ensure it's powered down correctly.
  softDelay(2000);
  Cellular.off();
  softDelay(2000);

} // End Setup()

void loop()   {
  // Do nothing in Loop.... you will be measuring Voltage and Charging Current externally.
} // End LOOP()

Thanks again,
So I ran your code, and measured the current between the negative of the battery and the GND pin of the particle.
Battery state: uncharged & unplugged - 3.468V
Connected to the above setup (same as yourself @Rftop ) approx 257mA current and this raises the voltage on the battery to 3.487V, while charging.
Out of curiosity, I connected the positive to the VUSB. Got the same result, 250mA charge rate.
:thinking::thinking::thinking::thinking:
Seems like a physical issue no? Does anybody know at what stage does the particle switch from termination charge to fast charge? Also, there are documents showing registers for the PMIC that I cannot seem to find anywhere. Where can they be found?
@Rftop thank you for your prompt replies…
My rig for test below.

The datasheet is very detailed.

I'd suggest to get rid of that Long, small gauge USB cable.
That could be your bottleneck.
I'd sacrifice a USB connector for short, large wires to my Power Supply for initial testing.
Check Voltage on both ends to confirm.

I've seen maybe a dozen scenarios on this forum where the PMIC was expected to be the culprit for low charging currents (myself included). To my knowledge, the PMIC was never the problem......but I could be wrong.

@Rftop thank you for all the input.

I think the problem was with the connections in the breadboard I was using.

Kind regards, Micheál.

That's good news...... what's your typical current now ?