Disclaimer: I am far from being an electrical engineer, I'm only a DIY enthusiast trying to stay safe.

I'm building a collection of sensors using little ESP-01 chips, but having them running free on batteries would allow far better projects. I'm thinking of Li-ion (cylindrical or pouch) 3.7V batteries, old or new.

There are many warnings here and there about potential hazards, but I could not find any comprehensive resources about how to use them safely. Moreover, most resources don't differentiate batteries for scooters and for microchips so I don't know what security rule applies.

For instance, I often hear about a "protection circuit" for overcharge or over-discharge, but:

  • How to know which circuit should be used with which battery?
  • In the case of a scraped battery (in my case an old Blackberry 3.7v 1270mAh Li-ion), how to (safely) know if a protection circuit is already in place?

PS: I'm not discussing what I will need to keep my sensor running for long, that will be for later.

  • \$\begingroup\$ One easy solution (which doesn't answer your question, so a comment) is to use power banks rather than raw batteries. As an advantage, the charging circuit and USB connector are included and you get a regulated (though maybe noisy) 5V output. \$\endgroup\$ Commented Nov 11, 2022 at 15:28
  • \$\begingroup\$ @SpehroPefhany indeed but they are usually very large which is bad for what I want to do. \$\endgroup\$ Commented Nov 11, 2022 at 15:51
  • \$\begingroup\$ Batteries used in consumer products will almost certainly have protection circuits already. I think your best bet here is going to be to use metal cased batteries because mechanical damage during handling is going to be a much greater hazard than electrical issues. Make sure you don't overcharge your batteries. Make sure you don't charge them or discharge them too fast. If they are getting hot you are doing something wrong. Buy new cells from reputable sources and don't obsess over it. There are a LOT of crappy cells out there that don't meet specs. It can be hard to find reputable sources. \$\endgroup\$
    – user57037
    Commented Nov 11, 2022 at 15:51
  • 1
    \$\begingroup\$ The downside to power banks is that many of them shut off the USB output if the load is too low. If your sensor doesn't draw enough current, the power bank will shut it off. Been there, done that, had to find another solution. \$\endgroup\$
    – JRE
    Commented Nov 11, 2022 at 15:52
  • 1
    \$\begingroup\$ Let me clarify my previous comment. Battery packs used in consumer products will almost certainly have protection circuits already. If you strip out the cells from the pack, then you are removing them from the protection circuit. The 18650s used in some laptop battery packs and power tools do not have protection on each cell. After you strip them out of the pack, they are not protected. Most pouch cells used in name-brand products do have protection inside the pouch. \$\endgroup\$
    – user57037
    Commented Nov 11, 2022 at 16:05

2 Answers 2


As per @mkeith's comments above, the OEM removable Blackberry battery module such as F-S1 definitely includes protection circuitry. Most 3rd party compatible batteries should also. In general, some batteries such as cell phone batteries include 'gas gauge' ICs as well as protection that you may (or may not) be able to find information on.

If you are trying to make a charger for it, consult sites such as batteryuniversity.com. Typically 0.5 to 1 C is used for charging. Modules using the TP4056 can be programmed from 130mA to 1A using a single resistor. At 0.5C you'd want about 600mA for your 1270mAh cell, which corresponds to a 2K resistor. Charging circuits in consumer products such as cell phones may use custom ICs (such as the 'Tristar' fine BGA part used in iPhones) that have no publicly available documentation so charging and gas gauge might involve some work.

It's easy enough to tell if 18650 cells contain a protection PCB (the cell is a few mm longer than the 65mm nominal and you can see the PCB and maybe the conductor running up the outside inside the shrink wrap), but it's harder to tell how functional that PCB is (it might be fake, it might only protect against some things and not others), and its hard to find reliable sources for the cells (they're not sold by Digikey/Mouser etc, last I looked). Shipping (legally and safely at reasonable cost) is an issue, so many of the sources are using shady methods and are therefore not the most honest folks to be dealing with. The best resources for shopping may be vaping and flashlight forums.

In any case, when you're working with partial information on an unknown battery, it would be prudent to take reasonable precautions against catastrophic failures and not push the charging or discharging current too far.


Generally the same applies to small lithium-ion cells that apply to huge lithium-ion battery banks. The outcome of not doing so is the same. Potential explosion and fire hazards. Damaged devices. Human injuries. Cats and dogs living together.

Obviously the danger of a pack of gum sized battery and a car sized battery will be different. But the practices you should follow is the same.

Do not over charge or under discharge or charge too fast or discharge at too high a rate. Keep it under the max operating temperature. Do not puncture the casing. Protection circuits designed to prevent such conditions should be used and often have most of these situations covered with minimal parts. Especially for small individual cells like you would use. The power involved in a 3.7V 5Ah cell is trivial to managed compared to the circuits needed for multi series multi parallel banks like a car or house or bigger would use.

You can buy pre-built modules on the bay for like 50 cents.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.