ESP32 Firebeetle - Charging 2 batteries in parallel but using both in series

Hi All. First post here but I've used the resources here many times to help me out.

I'm building an ESP32 Firebeetle powered "safe" for my 11 yo kid. It's a simple combination of a rotary encoder (to enter the code) and a 5V solenoid powered "latch" (6 ohms) that allows the door to open. To work without having to plug it in, I'm using 2 x 3.7v Li-ion batteries. One powers the Firebeetle, a piezo beeper and the encoder. The second battery is wired in series with the first to provide a higher voltage supply (via two MOSFETS) to drive the latch.

I use a double-throw, double pole switch on the battery pack and Firebeetle's built-in Li-ion battery charger so that with the switch in one position, the batteries are in parallel and can be charged from the Firebeetle's USB port. In the other position the batteries are wired in series and the second provides the additional voltage required to power the Latch via a MOSFET switch.

It works well. I use interrupts to wake up the ESP when the batteries are switched to series ("In Use" mode) and go to sleep when the batteries are switched to parallel ("Charge Mode").

However, it's not without its design faults...

There's no actual "Off" switch. Just sleep or operate.

You have to remember to switch from "On Mode" to "Off/charge Mode" after using it. That's probably not going to happen... If not, one battery will slowly discharge over time and/or only one battery will be charged by the built-in Firebeetle charger.

If the two batteries end up with one a lot more charged than the other, and you flick the switch from series to parallel, there could be a lot of current and a possible BANG! As the box is made of (rather nice oak) wood, I'd rather not start a fire in my kid's bedroom...

I'm trying to keep the external controls (switches, inputs, outputs etc.) as simple, minimal and elegant as possible.

Has anyone had experience of using a single 5v supply to charge two Li-ion batteries yet used them in the same project in series? Any ideas for how to improve my design would be welcome.

Why not charge them in series. A BMS board will cost about a buck from your favorite china supplier. That would be a lot cheaper then replacing your kids room

Thanks Gilshultz

I hadn't thought of that. Simple. It also lets me use a plain on/off switch too.

Great solution :slight_smile:

I knew there were clever people on here!

When you use battery cells in series, but also take current from the mid-point connection,
you risk wrecking one of the cells through backwards charging it.

In series all the cells should ideally see the same charge and current history so they drain down
at the same time - if not the over-used cell will be reverse driven by the other cell and
wrecked (reverse charging a cell will make it pretty useless by reducing the usable capacity
to a fraction of the original capacity).

The proper way to do your powering is use both cells in series for 7.4V to power the latch
and a buck-converter that is used to power the lower-voltage parts.

However it may be the case that you also stop discharging the battery once the ESP32 browns-out,
saving the bottom cell from damage.

If you are taking different currents from cells in series its important to use a balancing charger
to recharge so the fitter cell isn't over-charged too... (Of course most lithium chemistry
batteries need balancing chargers anyway).

Batteries in parallel with a step up converter for the lock is another option. It makes charging simpler.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.