How to Charge Electron Batteries

Hi all, I’m making an Arduino and Electron powered rover. The electron is on an asset tracker shield which sends commands to Arduino via i2c and the arduino is powered by two of the electron lipo batteries wired in series. Anyways, I have a 6v solar panel on top and I was wondering if there was any way I could use a 5v regulator circuit I have to charge the batteries if there is enough light providing the power. I’m curious if you guys have any ideas for how to get the solar panel to charge the lipos while the batteries are powering the Arduino at the same time. Ideally the solar panel would be hooked up to the regulator which would somehow charge the batteries. I figured I should ask you guys for your advice so that way the batteries don’t accidentally catch on fire!! :joy:


Are you sure you have the 2 batteries wired in series? If so your feeding Arduino & Electron 3.7 x 2 volts = 7.2v ?

I would use the batteries in Parallel so they both operate at 3.7v together and then connect them to the battery input pins on the Electron. You can then connect the 5v solar panel to the Vin pins on the Electron and then the solar panel will charge the dual 3.7v batteries when there is sufficient light available.

I can provide code that will bump the solar input current to the full 2 amps. I can also provide code that will keep the solar panel from operating below 4.8v which keeps the 5v solar panel from operating out of it’s peak power range.


I would’ve done that but I have sensors that require 5v volts. The solar panel doesn’t always have to charge the batteries, but i’m already using the Vin pins on the electron…

Just use a 3v to 5v boost converter to power your 5v sensors. That’s cheaper than trying to find a good 7.2v solar charger.

@RWB @ScruffR

Just to be clear, the two batteries in series power the Arduino mega through the external jack. The electron has its own battery which the Arduino is constantly charging so they share the same logic level for i2c(I couldn’t get my logic level converter working properly)… Why couldn’t the solar panel be connected the the 5v regulator and be wired to the Arduino’s Vin pin? (Sorry I’m 12 :joy: )


It’s pretty cool, a servo motor turns the solar panel to whichever side is brighter on the rover!
The back beam is for a robotic arm-I’ll do that later- but I just wanted to make use of the solar panel currently. You can’t see the Arduino but it’s in the middle where all the wires are going.

Just out of curiosity, what is the reason to use an Electron and an Arduino?
Couldn’t the Electron do it all?

What sensors are these?

I2C should not need logic level shifting since the only “active” level is LOW which is common to all clients on the bus.


  1. I use both because there is not enough GPIOs on the Electron.
  2. Hc-sr04 distance sensors(x4), memsic 2125(1), neopixel(1), and a few electronic components
  3. It’s actually really funny you mentioned the logic level on i2c, as I discovered this one day before you commented ironically! :joy:

Can I have the solar panel charge the lipo (they power the arduino) batteries while the batteries are being used?

OK, using two micros is one way to deal with that.
But have you considered port extenders and dedicated controler boards (e.g. “smart” motor drivers) to reduce the need for GPIOs?
Also software multiplexing might be a way to reduce the number of pins needed.

About LiPo charghing @RWB is the greater authority here, but I’d say with a 6V solar panel you’ll have a job to charge a 7.2V (7.4V) battery and charging each 3.7V cell indidually while they are supplying your circuit in series just doesn’t seem right (to say the least ;-))