State of Charge Values

Hi

I have an electron which on the console says that the battery charge is 96%

If my code I have

int batteryLife = fuel.getSoC();
Particle.publish("SOC", String(batteryLife));

This publishes a value around 80 when the battery of the console is 96%. The 96% sounds right because it is on power.

Are we using the wrong function?

From the FuelGauge reference documentation:
Note that in most cases, "fully charged" state (red charging LED goes off) will result in a SoC of 80%, not 100%.

Thanks for the link

How is the 96% battery on the vitals in the console determined?

You got me there. :slight_smile: Maybe they're using raw voltage levels or something.

Device vitals represent scaled up SoC levels.

3 Likes

From what I can tell, the scaling factor is 85% - i.e. if SoC shows 85, then console displays 100%. At least that math works on the devices I’ve looked at. The charge controller is set to a safe level so as not to overcharge the battery.

I believe the Device Vitals assume that the default Li-Po termination voltage of 4.112 V is used.
The Fuel Gauge reports the actual SOC depending on the voltage when sampled.

Here’s an example for a Boron being recharged by a small Solar Panel this morning.
The Boron’s PMIC setting setChargeVoltage(4208) is used, instead of the 4.112 V (default).
Note: be sure to monitor the enclosure temperature when charging to 4.208 V.

Fuel Gauge reports 92% SOC @ 4.14V. This is the actual condition, regardless of the charge termination voltage.
image

Device Vitals reports 100% SOC (since it’s higher than 4.112V default), but it also shows as “Charging” since that’s indeed what’s happening to reach the 4.208 charge Voltage.
image

The Fuel Gauge will give you the best answer. It’s the percentage remaining of the Li-Po’s actual capacity.
That’s why Fuel Gauge reports ~85’ish % when “fully” charged to the 4.112 V (default), because the Li-Po isn’t actually “full”…for safety reasons.

3 Likes