Electron not charging connected battery

electron
Tags: #<Tag:0x00007f038e18ee10>

#1

Hi!

There are certainly a lot of similar sounding posts in this forum, but I haven’t seen any that touch on this issue directly. I submitted a support ticket to Particle, but wanted to share with the community to see if anyone else has had success digging into this problem (and hopefully finding a workaround!).


I’ve been seeing an issue intermittently across at least 6 devices in our “fleet” of 50 Electron units over the past year. In scenarios I have not yet been able to reproduce, the Electron will not charge the connected LiPo battery until the USB connector has been unplugged and plugged back in a number of times. Obviously this is a big headache when these service-critical devices are deployed and can only be charged overnight. To remedy this challenge I have actually built in an external 500mA charger onto the backplane board in future builds and will disable onboard PMIC charging… but I really don’t love this solution.

I finally caught a device which was doing this in the shop and was able to dig in a little deeper (though by no means did I resolve the issue). Here’s the process I went through, in as much detail as possible:

  • Noticed charge light was not illuminated on the Electron, despite being plugged in to a 5V,2A wall charger overnight
  • Measured battery voltage with a multimeter (probed the BAT pin on the device) and saw it was around 3.25V
  • Plugged unit into my laptop with a charge monitor and confirmed negligible current was going to the device
  • Wrote a test program to output all available fuel gauge and PMIC data:
     PMIC pmic;
     FuelGauge fuel;
     void setup() {
         Cellular.off();
         pmic.enableCharging();
         Serial.begin(9600);
     }
     void loop() {
         Serial.print("System Status Register: "); 
         Serial.println(pmic.getSystemStatus());
         Serial.print("Fault Register: ");         
         Serial.println(pmic.getFault());
         Serial.print("Charge Timer Register: ");  
         Serial.println(pmic.readChargeTermRegister());
         Serial.print("Minimum System Voltage: "); 
         Serial.println(pmic.getMinimumSystemVoltage());
         Serial.print("Charge Voltage Value: ");   
         Serial.println(pmic.getChargeVoltageValue());
         Serial.print("Charge Voltage: ");         
         Serial.println(pmic.getChargeVoltage());
         Serial.print("Charge Current: ");         
         Serial.println(pmic.getChargeCurrent());
         Serial.print("Battery Voltage: ");        
         Serial.println(fuel.getVCell());
         Serial.print("Battery Value: ");          
         Serial.println(fuel.getSoC());
         delay(5000);
     }
  • NOTE: When I loaded this firmware onto the device, I had not noticed the build environment was set to Device OS v1.0.0 (the Device OS running on the Electron at the time was 0.8.0-rc.4). The issue persisted across the automatic Device OS update (and we have seen it with devices running v0.7.0)
  • The script reported back the following:
    System Status Register: 0
    Fault Register: 0
    Charge Timer Register: 138
    Minimum System Voltage: 3500
    Charge Voltage Value: 4112
    Charge Voltage: 154
    Charge Current: 96
    Battery Voltage: 3.27
    Battery Value: 0.02
    • So, what’s curious is the Status Register, which (referring to the BQ24195 datasheet) is indicating VBUS is unknown. However, I was still able to program the Electron
  • At this point, out of curiosity, I unplugged the battery while leaving the Electron plugged into USB. All power to the board extinguished. Thinking it may be a micro USB connector issue, I measured the voltage to the VUSB/VBUS pin with a multimeter and it measured at 5V. So 5V is presumably still getting to the PMIC.
  • With the battery still unplugged, I unplugged and plugged in the USB connector (from my laptop) several times. Suddenly, the board revived. The charge LED rapidly blinked for a few seconds and then turned off (which I think is odd, because that light should keep blinking until a battery is connected)
  • I opened the Serial Monitor again and got the following:
    System Status Register: 69
    Fault Register: 0
    Charge Timer Register: 138
    Minimum System Voltage: 3500
    Charge Voltage Value: 4112
    Charge Voltage: 155
    Charge Current: 96
    Battery Voltage: 0.05
    Battery Value: 57.26
    • This appears to be normal, other than that I would have expected to see a Charge Fault
  • Now I unplugged USB, plugged in the battery, and plugged USB back in. The charge light turned on, and I saw 500mA of current being drawn from my USB port. Looking at the serial monitor once again:
    System Status Register: 109
    Fault Register: 0
    Charge Timer Register: 138
    Minimum System Voltage: 3500
    Charge Voltage Value: 4112
    Charge Voltage: 154
    Charge Current: 96
    Battery Voltage: 3.34
    Battery Value: 0.01
    • This all looks to be nominal

Any notes on this behaviour and how to work around it (e.g. a consistent way to reproduce it, and/or a consistent way to resolve it) would be greatly appreciated!

Thank you!

Jonathan