EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: ebastler on May 08, 2022, 07:32:44 am

Title: 18650 with integrated BMS -- how to charge?
Post by: ebastler on May 08, 2022, 07:32:44 am
For some WiFi-based sensor gadgets, I am looking into power supply (battery) options. Hobby project only, I intend to build a handful of these.

The devices will be based on an ESP-12F module which requires a 3.3V supply. It will be in deep sleep most of the time, with 20µA standby current, and wake up once an hour or so for a short burst of activity, with ~ 200 mA peak current during WiFi transmission. The battery should last at least a year under those conditions. Hence a supply with minimal self discharge and 200 mA peak current is required.

A single 2000 mAh 18650-style LiPo battery looks like a good option. I might simply use this with a dropper diode, and I like the idea of a removable battery: Just swapping the battery against a freshly charged one would be the most convenient way to recharge the sensors "in the field".

I guess I would still want a BMS in the sensor device, to protect the battery against deep discharge or overcurrent if a short circuit should develop, say due to the device getting wet. I have found 18650 batteries with integrated BMS (e.g. https://www.ansmann.de/en/rechargeable-batteries/lithium-battery-18650 (https://www.ansmann.de/en/rechargeable-batteries/lithium-battery-18650)), but am unsure how these would be charged:

Can any LiPo-capable charger deal with the BMS integrated in the battery? (Is it fully "transparent" to the charger?) Or are there special BMS-capable chargers? (Haven't seen that feature advertised yet.) Electrical properties aside, is the extra 3 to 4 mm length added by the BMS a problem with typical chargers?
Title: Re: 18650 with integrated BMS -- how to charge?
Post by: abyrvalg on May 08, 2022, 08:02:52 am
The BMS of a protected cell is transparent (unless you overcurrent/overcharge the cell). Many chargers have adjustable spring-loaded contacts to support different cell sizes (i.e. slightly bigger 21700).
Title: Re: 18650 with integrated BMS -- how to charge?
Post by: Gyro on May 08, 2022, 08:59:03 am
Yes. It's not a BMS as such (think of it as a protection circuit), just an 'emergency' overcharge and overdischarge protection. It doesn't ensure healthy battery life or interfere with charging.

A better option mighr be to just use one of the cheap ebay micro USB DW01 / TP4056 based charger boards (either integrated, or maybe to knock together a simple external charger). eg. https://www.ebay.co.uk/sch/i.html?_from=R40&_trksid=p2334524.m570.l1313&_nkw=charger+pcb+tp4056 (https://www.ebay.co.uk/sch/i.html?_from=R40&_trksid=p2334524.m570.l1313&_nkw=charger+pcb+tp4056) (UK search)
Title: Re: 18650 with integrated BMS -- how to charge?
Post by: Peabody on May 08, 2022, 03:13:16 pm
If you will be replacing discharged batteries in the field, then you don't need a charger in your circuit.  They do make little protection circuit modules, but the simplest thing would be to just use 18650s that have protection built in.  The protection will be invisible to any charger.  In fact, you can use a protected battery in a protected charger, and it won't notice the double-up protection.  Not that you would want to do that though, because each protection chip (DW01) does use some current.

I don't think you want to use a dropper diode.  If you drop a fully charged 4.2V to 3.3V, then you'll be too low when the battery is at 3.8V even though it has some useful charge left.  I think the best option is a 3.3V linear regulator.  If you can find them in stock these days, you can find very low dropout regulators that should work very well.  The MCP1700 for example has a typical dropout voltage of 178mV, so you would still get regulated 3.3V output with a battery voltage as low as 3.5V - at which point the battery is probably 95% discharged anyway.  It also has a quiescent current of 1.6uA.

While a switching regulator can be more efficient than a linear one, that is often not the case at very low current levels.  And since your circuit will be sleeping almost all the time, I don't think a switching regulator would provide any advantage, and might actually be worse for battery life.

A couple of other things to think about.  If you find that battery life is a problem, you might just use two 18650s in parallel, with no change to your circuit.  You would just have to make sure the two are charged to the same voltage as nearly as possible when you insert them into the holder.

The other option is to have a separate real time clock module, powered by its own coin cell, which would actually switch on the main battery power once an hour.  So almost all the time there would be zero current flowing from your 18650.  I think both the coin cell and the 18650 would last a very long time.
Title: Re: 18650 with integrated BMS -- how to charge?
Post by: ebastler on May 08, 2022, 07:14:40 pm
Thank you all for the reassurance and advice!

Right, I don't need a charger inside my sensor device, just basic protection for the battery. Since batteries with an integrated protection circuit are available, and can be charged in regular consumer-type LiPo chargers (outside of the device), that's the option I will go with.

Peabody -- you are right of course, a low dropout, low quiescent current regulator would indeed be the "proper" option. I'll see what is available; the choice is rather limited at the moment. But in a pinch a 0.6V diode drop should also work, since the ESP chip should run nicely with any voltage between 3.0 and 3.6V. (It is actually specified down to 2.5V.) And it adds zero quiescent current, which is nice in this application.

I had thought about options to further reduce the standby current, or use larger batteries. But a 2000 mAh battery should (theoretically) last for > 10 years of standby at 20µA. With burst operation of, say, 100 mA for one second per hour, total battery life should still be a few years. Let's see how those estimates hold up in practice, but I hope I'll be OK with the single 18650.

Now on to finding a battery clip which accommodates the extra-long 18650 with protection circuit... (Would that be an 18690?  ::))
Title: Re: 18650 with integrated BMS -- how to charge?
Post by: pigrew on May 08, 2022, 07:48:31 pm
But in a pinch a 0.6V diode drop should also work, since the ESP chip should run nicely with any voltage between 3.0 and 3.6V. (It is actually specified down to 2.5V.) And it adds zero quiescent current, which is nice in this application.

A dropper diode would likely put an overvoltage on the ESP32 while it is in sleep. With 20uA, a 2N4148 drops 0.4V at room temp and 0.3 at 70C (according to LTSpice). 4.2V minus 0.3 is 3.9V, which fries your ESP-12F.

A good design would have a 2S battery (with undervoltage protection for each cell) and a 3.3V LDO /buck-converter, or 1 cell and a buck-boost converter. If you're willing to sacrifice battery capacity, I'd also think about a single cell with a 3.1V LDO or buck converter.

I had thought about options to further reduce the standby current, or use larger batteries. But a 2000 mAh battery should (theoretically) last for > 10 years of standby at 20µA. With burst operation of, say, 100 mA for one second per hour, total battery life should still be a few years. Let's see how those estimates hold up in practice, but I hope I'll be OK with the single 18650.

Self-discharge: Expect 1 or 2% per month.
Title: Re: 18650 with integrated BMS -- how to charge?
Post by: viperidae on May 08, 2022, 10:35:16 pm
The datasheet i found for an esp 12f says it needs at least 500mA peak for transmitting but it will also run from 3.0 to 3.6V

I'd be looking for a low quiescent current LDO, rated for at least 800mA and 3.2V.

Running the esp at the lower end of its voltage range *may* reduce the current consumption slightly
Title: Re: 18650 with integrated BMS -- how to charge?
Post by: Peabody on May 08, 2022, 11:00:39 pm
I don't know of an 800mA LDO with decent quiescent current.  I think you would be looking at 50-60 uA, or even more.  Maybe a large capacitor would handle the peak current and let you use a lower current LDO.  I don't know if you could gang three MCP1700s.  Would they share the load?


Title: Re: 18650 with integrated BMS -- how to charge?
Post by: Peabody on May 09, 2022, 02:45:52 am
Well in case you want to consider an RTC-controlled power switch, it would look something like the circuit below.
Title: Re: 18650 with integrated BMS -- how to charge?
Post by: ebastler on May 09, 2022, 06:18:51 am
Claims about the peak current draw of the little ESP8266 modules vary quite a bit, probably depending on how closely (i.e. with which time resolution) people have monitored the current.

The datasheet states "< 500 mA", which I take as a guaranteed value with some headroom. Users on the internet give values between 200 mA and 320 mA peak, where I tend to believe the 320 mA value. (Given in a forum post by someone who is concerned with peak current and seems to know what they are doing.) Hence no need for an 800 mA regulator, I think.

Still, I have not found a suitable low-drop, low quiescent current regulator yet. There are several types with an Enable input which have very low quiescent current when disabled, e.g. the MIC5219. These might be used in a scheme as suggested by Peabody without the need for the discrete FET. Maybe that's the way to go?
 
Title: Re: 18650 with integrated BMS -- how to charge?
Post by: Peabody on May 09, 2022, 02:31:59 pm
The INT/SQW pin of the DS3231 is an open-drain output which goes low when the alarm time is reached.  But the ENable on most regulators with that function is active high.  So to use the RTC with the MIC5219, you would need to add a PNP transistor or a P-channel mosfet to invert the polarity, and probably a pulldown resistor on the ENable pin.  There are linear regulators with active-low ENables, but the ones I've found on previous searches were either too low current, or too high dropout, or came in packages that were useless to hobbyists (DFN, for example).

I still wonder if using two or three LDOs ganged together would work.  The "18650 Battery Shield V3" has three ganged XC6206 LDOs.  You would have twice or three times the quiescent current, but the dropout voltage wouldn't change.  Of course they would not share the load equally at all current levels, but when the one with the highest output voltage started to sag, the next one might kick in.  I think it's possible that would work.  And you could stack them together, using one set of input and output capacitors.  But maybe an EE here would like to opine on that idea.

Title: Re: 18650 with integrated BMS -- how to charge?
Post by: NiHaoMike on May 10, 2022, 12:30:35 am
A dropper diode would likely put an overvoltage on the ESP32 while it is in sleep. With 20uA, a 2N4148 drops 0.4V at room temp and 0.3 at 70C (according to LTSpice). 4.2V minus 0.3 is 3.9V, which fries your ESP-12F.

A good design would have a 2S battery (with undervoltage protection for each cell) and a 3.3V LDO /buck-converter, or 1 cell and a buck-boost converter. If you're willing to sacrifice battery capacity, I'd also think about a single cell with a 3.1V LDO or buck converter.
Simplest solution is to use LiFePO4, which matches up perfectly with 3.3V devices. Or use a NPN transistor with base connected to collector as a "diode connected transistor", which behaves closer to an ideal silicon diode when forward biased.
Title: Re: 18650 with integrated BMS -- how to charge?
Post by: ebastler on May 10, 2022, 05:34:58 am
Simplest solution is to use LiFePO4, which matches up perfectly with 3.3V devices.

Thank you, that's a thought. I have not paid much attention to rechargeable battery options over the past decade(s); had missed LiFePO4 entirely... It seems that most LiPo-capable (external) chargers will also happily charge LiFePO4?

I can find these in 16850, 26700 etc. form factors, but none of them seem to have built-in protection circuits. Is that because LiFePO4 can tolerate deep discharge, or should I plan to include a protection circuit in my device?

(In my present application, the battery will see very few charge/discharge cycles, max. one per year. But if a deep discharge should occur because I neglect to recharge in time, that state might last for a few months.)
Title: Re: 18650 with integrated BMS -- how to charge?
Post by: Peabody on May 10, 2022, 03:02:35 pm
I think you still have to follow the lithium rules on charging voltage and current, charge termination, and protection, but they just all have different levels for LiFePO4.  Here's a charger module:

https://www.ebay.com/itm/275259709796 (https://www.ebay.com/itm/275259709796)

and here is a 1S protection module that it looks like you just mount across the battery, but it's not clear where ground connects to the board.  It should be separate from the negative battery terminal.

https://www.ebay.com/itm/192621900398 (https://www.ebay.com/itm/192621900398)

I didn't find a module that has both charging and protection like you find on the TP4056 modules.
Title: Re: 18650 with integrated BMS -- how to charge?
Post by: ebastler on May 10, 2022, 08:36:04 pm
Thanks! To clarify -- charging would be done in an external stand-alone charger (with the battery removed from my device). The charger should take care of charging voltage, current, and termination.

So I only need to worry about protection during the discharge cycle. Or maybe I don't need to worry, that's what I was wondering. I have found contradictory statements regarding the sensitivity, or lack thereof, of LiFePO4 batteries to a deep discharge.
Title: Re: 18650 with integrated BMS -- how to charge?
Post by: wizard69 on May 11, 2022, 12:38:18 am
To drift a tiny bit off topic, when you say "in the field" is that literal?   I ask because if that was the case you could most likely solar power this sort of sensor for years.   That would mean finding an IC to support this but such IC's often provide other useful functionality.   While I'm no solar cell expert this TI product might do: bq24210 and I'm sure there are others.

Again what you mean by in the field counts here, but going this route pretty much takes battery removal out of the equation.   Further if in the future you decide to get data more frequently you should still have plenty of power.  You still will need to implement some sort of voltage regulation, as a regulator would be required now.
Title: Re: 18650 with integrated BMS -- how to charge?
Post by: Peabody on May 11, 2022, 03:19:12 am
I've never heard that LiFePO4 is somehow immune to overdischarge damage.  Anyway, the protection IC for those batteries appears to be the HY2112.  It's the same as the DW01, but with voltage levels appropriate for LiFePO4.

Title: Re: 18650 with integrated BMS -- how to charge?
Post by: ebastler on May 27, 2022, 03:02:28 pm
Just a quick follow-up to mention what I eventually used: I went for a single 18650 LiPo cell and a 3.0V LDO (MCP1700-3002).

The MCP1700 is rated for 250 mA, which (according to the ESP8266 literature) might be marginal during the ESP8266's startup phase. Measuring the current at the LDO input in my unit, I see that it peaks at 220 mA. The LDO output does show +- 100 mV over-/undershoot at the sudden load peaks, but that should not be an issue as long as I take my (analog) sensor readings before starting up the WiFi.

For the battery I am trying this one, which comes with an integrated charger module: https://www.reichelt.de/de/en/industrial-cell-li-ion-18650-3-6-v-3400-mah-incl-micro-usb-km-18650-pro-3-4-p241184.html (https://www.reichelt.de/de/en/industrial-cell-li-ion-18650-3-6-v-3400-mah-incl-micro-usb-km-18650-pro-3-4-p241184.html). It has a USB-C jack (not micro USB as stated in the description), and even a little pushbutton and 5 LEDs to read the charge level. Time will tell whether that comes at the expense of an increased self-discharge rate, in which case I would switch to a 18650 with protection circuit only.

Thank you again for your help and suggestions in this thread!
Title: Re: 18650 with integrated BMS -- how to charge?
Post by: Peabody on May 27, 2022, 04:01:11 pm
Could you double-check that link.  I get a 404.

Anyway, I assume you've confirmed that the ESP8266 and your sensors will work ok at 3V.  If they do, then this has the likely added benefit of drawing less current at 3V than at 3.3V.  If the over/undershoots are a problem, they might be solved by just adding capacitance.  There's also the idea of adding another LDO ganged with the first one.  I don't know if that actually works, but I've seen it done.
Title: Re: 18650 with integrated BMS -- how to charge?
Post by: ebastler on May 27, 2022, 05:56:19 pm
Ah, sorry -- I fell into the SMF trap where the forum software appends the period at the end of a sentence to the preceding link. Should be fixed now.

Yes, the circuit seems to work just fine at 3.0V. Maybe the < 250 mA current consumption are helped by the lower supply voltage; the ESP8266 datasheet does not bother with that kind of detail... It does specify a supply voltage range from 2.5 to 3.6 V though, so I should be nicely in spec.