Electron Charging?

I do recall that thread (post #2 :wink: ) and also the docs, but as I understood Brett there should be some more info than just the function prototypes :sunglasses:

Ok, if there is more information on the subject, Iā€™d love to get my hands on it!

Nopeā€¦ I tried with a 4AMP charger and did not work. Never goes above 85%. And red light always stays on.

I will try the PMIC solution. Just hoping to understand how the settings work to know what should I be concerned with. Why 4208 works and not 4112ā€¦ Also Should I set this every boot, or only once?

This refered to my comment that @BDub might have some extra info put together already but just not publushed yet (or I'm just too blind to find it)

Just put it in setup(). Thatā€™s what works for me. I have only tried 4208 so far. But I believe 4112 is the default setting. The FuelGauge gives a lower voltage than what I measure with a multimeter. So the actual voltage is a bit higher than what FuelGauge says.

But in my case the red LED always turns off. It just turned off before reaching 100%; which is now solved. So your case might be different than mine.

I've asked Brett now for that info, and he pointed me to this "backlog" entry

So there will be more, but might need some time :wink:

But that entry also contains a valid warning!

2 Likes

Also Iā€™d like to caution you guys @nodemand @frlobo @wtfuzz @RWB @kbowerma that there was a bug discovered in 0.5.0 and 0.4.8-rc.6 for the Electron where the 4208 setting would actually set the battery cutoff voltage to 4.4V which is much too high. Luckily the supplied battery has a protection circuit but any non-protected battery could be at risk of overcharge if you had used this function. This has been fixed on 0.5.1, so feel free to use the 4208 setting to achieve around 94% charge.

// ONLY use on 0.5.1 system firmware or higher
void setup() {
    PMIC power;
    power.setChargeVoltage(4208);
}

Be sure to keep your battery temps under 45Ā°C though. The % reading is based on the Fuel Gauge measurement, which is independent from the PMIC charging, which is why it will never be exactly 100%. Itā€™s either going to be a bit under, or over. Iā€™d prefer to error on the under side for safety, and I understand why 100% is desirable and intuitive to say ā€œfully chargedā€. There might even be a way to set the Fuel Gauge to programmatically expect a lower termination voltage, so we can show 100%. Will add that to my list :wink:

3 Likes

What I actually did, is in my code I interpret 85% as 100% :blush:

Thanks for all the info @BDub the actual real reason for 100% is to get more juice out of the batt :slight_smile:

1 Like

Would there be any point in setting it lower when using electron and battery in a setting that is usually powered, to extend battery lifetime (not runtime).
ie. when the psu/board cant supply enough current to run the electron without a battery attached.

Even setting it to 50% soc would be plenty to handle the electron spikes.

if runtime on battery is not a concern for you, battery lifetime can be maximized by never charging over 80% or discharging below 20%. Generally speaking, onboard protection circuitry will do the majority of the lifetime enhancing behavior for you.

I have some related questions, though:

  • How do you change the charge current? I see docs on this, but they arenā€™t explained. The included battery can be charged at up to 2A.
  • Why do the set and get methods for charge voltage use different data types?

@wtfuzz have you ever found a solution to this issue?

I am facing the same problem - my electron is only charging with ~50-100mA. That means it takes more than a day to fully charge the 2000mAh batteryā€¦! :confounded:

Does anyone else have an idea why my Electron is charging only about 3% per hour?

I am using the original 2000mAh Li-Po battery and the original USB cable. It does not matter whether I connect it directly to the PC or via an iPhone charger to a wall socket.

I do use the line:

SYSTEM_MODE(SEMI_AUTOMATIC);

In the setup loop I do have the following PMIC settings:

PMIC pmic;
pmic.setChargeCurrent(0,0,1,0,0,0);  //Set charging current to 1024mA (512 + 512 offset)
pmic.setInputVoltageLimit(4840);     //Set the lowest input voltage to 4.84 volts. This keeps the 5v solar panel from operating below 4.84 volts.

After setting these values, I read out all the relevant status and get the following:

getChargeCurrent = 100000
getChargeVoltage = 10011010
getMinimumSystemVoltage = 3500
readChargeTermRegister = 11001110
readInputSourceRegister = 1100011
readPowerONRegister = 11011
getSystemStatus = 1101100
isPowerGood = 1
isHot = 0

Any help would be greatly appreciated!

I have a 2000 Miliamp usb charger connected to the electron, the LIPO is connected as well. The electron is breathing cyan and it is constanty flashing the red LED but at lower speed, as I know when the red LED flashing when the LiPo is not connected. What is the meaning of this Red LED on and off meaning even though the LIPO is connected and the 2000 miliamp USB as well?

Sorry for my bad English, itā€™s not my native language.

Jiggle the white JST connector your plugging into the Electron, sometimes it needs a better connection. If itā€™s loose you may see this red led flashing at different rates.

1 Like

Thanks!

Did that work for you?

Yes it did. Thanks!

Meanwhile I figured out, why my Electron wasnā€™t charging properly. If you set the min. input voltage to 4840 mV it might be that the 5V source of the PC (USB port) is not sufficient.

If I change the min. input voltage to 4680 mV, the Electron charges properly.

pmic.setInputVoltageLimit(4680); 
2 Likes

Good point. Remember that the 5V USB voltage runs through a Schottky diode before it gets to Vin and the PMIC. The Vishay datasheet specifies Vf=0.43V for the diode listed in the Electron BOM. So the PMIC will only see 4.57V. (Assuming ideal conditions & voltages.)

3 Likes