Electron turn on charging programmatically?

Hi,
I have a project where I have the Electron off-site at a remote location running from its battery.
I also attached a 5V USB battery to it - the problem is that the board shuts that off automatically after a few hours (alias the red led showing charging is no longer on).

The question is, whether would it be possible to turn on the charging from the USB programmatically?
What I would do, I would set a criteria, like if the battery level drops below 20% then turn on the USB charging from the already connected USB charger.

So is it possible to turn on the charging (red led) somehow from the application?

Thanks
Zoltan

The red charging LED stays on until the charging current drops below 50mA which means the battery is fully charged. Then the Power Management IC sources power from the USB port if there is power avaliable there and only uses battery power if the USB port can not supply the needed power for the Electron radio.

As long as the USB port is plugged in it’s keeping the battery voltage at the fully charged voltage. So even thought the RED charging LED turns off it’s still charging the battery.

1 Like

Thanks, I thought that when the red charging LED goes off then no more charging from the USB, but it sounds like that isn’t the case.
Based on how you described, I don’t need a programmatic way to turn on “charging” again, as it seems it stays on as long as the USB is plugged in.

Thanks!

Yes its all automatic.

When the USB power is avaliable the battery is always charging.

Perfect! Thanks