Cannot stop charging LiPo Battery using Particle Electron

I have a Particle Electron 3G and I would like to use it for an indoor environmental sensing project. The Particle Electron will be connected to a permanent 5V supply via the micro USB input.

To maintain battery life I would like to cycle the battery. I have been trying to get the advanced functions of the PMIC (Power Management IC) to work without success. My Particle Electron stays fully charged (around 93% and 4.12V).

The code implementation includes

PMIC pmic;

in setup I include the following

pmic.begin();
pmic.disableCharging();

I use FuelGauge to measure the battery voltage and then use this reading to either pmic.disableCharging() or pmic.enableCharging()

But when I check the battery status it always remains full. I want to use the PMIC to control the charging / discharging of the LiPo battery without having to use a relay to control the 5V supply to the Particle Electron.

Any help would be appreciated. Thanks

It’s not possible to discharge the battery while there is power on USB or VIN. The reason is that when in power good state (sufficient voltage and current) the PMIC bypasses the battery and draws power only from USB or VIN. This is done to minimize the charge-discharge cycles on the battery.

Thanks for qualifying. It seems that its probably best to stay with all the default power management settings on the Particle Electron for my application. I will take out all the references to the PMIC. Appreciate your quick response to this question.