E-Series not charging when in sleep mode

I have some of the latest E-series modules and using them in a design where we charge a LiPo which is the exact same as the one that comes with the evaluation module. The problem is that the battery is not being charged when we put the system to sleep (using the command System.sleep(D4, FALLING)).
When not in sleep mode, the battery is charging no problem. We didn’t have this issue on the previous E-series, just the latest release. Is there a firmware setting i’m missing that needs to be set?
Thanks!

I have never heard of that happening, and it’s kind of mystery to me why it would happen. The only thing I can think of is to reset the PMIC settings:

#include "Particle.h"

// Resets bq24195 charge controller

void writeRegister(uint8_t reg, uint8_t value);

void setup() {
    Serial.begin(9600);

    // REG00 Input Source Control Register
    writeRegister(0, 0b00110000);

    // REG01 Power-On Configuration Register
    writeRegister(1, 0b00011011);

    // REG02 Charge Current Control Register
    writeRegister(2, 0b01100000);

    // REG03 Pre-Charge/Termination Current Control Register
    writeRegister(3, 0b00010001);

    // REG04 Charge Voltage Control Register Format
    writeRegister(4, 0b10110010);

    // REG05 Charge Termination/Timer Control Register
    writeRegister(5, 0b10011010);

    // REG06 Thermal Regulation Control Register
    writeRegister(6, 0b00000011);

    // REG07 Misc Operation Control Register Format
    writeRegister(7, 0b01001011);

}

void loop() {

}


void writeRegister(uint8_t reg, uint8_t value) {
    // This would be easier if pmic.writeRegister wasn't private
    Wire3.beginTransmission(PMIC_ADDRESS);
    Wire3.write(reg);
    Wire3.write(value);
    Wire3.endTransmission(true);

}

Thanks Rick! Good to know. Turns out that I had a low resistance on my usb voltage input from a metal standoff to ground. Not sure why it acted the way it did but nevertheless it is solved.

1 Like

Hi again Rick,
I’m having some troubles once again with the charging circuit of the E-Series module on my pcb.
What I’m seeing now after purchasing a new higher current supplying charger (Insignia 2.4A usb charger), I’m getting unpredictable charging rates. Im still using your PMIC settings that you provided for resetting (only because I’m really unsure how else to set it up!).
I’m monitoring the current to the single cell lipo battery through a voltmeter and able to see the current change when it is charging. The most current I see going to the battery to charge it is when the E-series is set to sleep (I call this in my code: System.sleep(D4,FALLING);). After this is called, the battery is getting about 340 mA which is ok but still not anywhere near what the charger would be able to supply and what the current settings are set to from your suggested register reset settings from my previous message in this post.
When the device comes out of sleep mode, the battery is no longer charging, but instead it is supplying current to the E-series module. This is with the high current capacity charger connected to the usb (pins 3,13,and 14 on the E-series). The rest of my circuit that the E-series module is part of pulls between 230 mA and 400 mA which is all being supplied through pin 9 of the module (3V3) which is well under the max that the 3V3 can supply (800mA). I’ve been referencing the datasheet for the BQ24195 IC but is there a good example for how to configure the PMIC using Particle’s built in functions?

The odd thing is that when I connect the usb instead to my PC, i can actually charge the battery when it is not in sleep mode. It is able to supply ~180 mA to the battery while also supplying power to the rest of my circuit. I don’t understand why the PC is able to supply more current than the actual high current charger!

Very confused…
Thanks,
Craig