Lithium Battery Safety for Makers: Charging, Protection, and What Not to Do

A lithium-ion cell stores a large amount of energy in a small package and has no tolerance for abuse. Overcharge it, short it, puncture it, or charge it below freezing, and it can vent flammable electrolyte and ignite in seconds. Good lithium battery safety comes down to three controls: a charger that follows the correct profile, a protection circuit that cuts power when something goes wrong, and handling habits that keep the cell inside its limits.

Quick Takeaways

  • Charge to 4.2V per cell (Li-ion/LiPo) with a CC/CV charger, never a bare power supply and a resistor.
  • Cut off discharge at 3.0V (3.2V under load is safer) and never charge a cell below 0°C.
  • Use a protected cell or a protection board (DW01A + FS8205A) on every build. Add a fuse on high-current packs.
  • Stop using any swollen, dented, hot, or hissing cell immediately. Do not charge it again.

Why Lithium Cells Fail

Every failure mode ends the same way: heat. Internal resistance converts current into heat, and when the cell warms past roughly 130°C, the electrode and electrolyte chemistry begins to self-heat. This is thermal runaway. One cell failing can heat its neighbors and spread through a pack.

Four abuse conditions trigger it:

  1. Overcharge. Pushing a cell above 4.2V plates metallic lithium on the anode and breaks down the electrolyte.
  2. Over-discharge. Dropping below about 2.5V dissolves the copper current collector. The cell may look fine, then short internally on the next charge.
  3. Overcurrent or short circuit. Currents far above the cell’s C-rating overheat the cell and its wiring.
  4. Physical damage or temperature extremes. Punctures, crushing, and charging below 0°C (which causes lithium plating) create internal shorts.

Cell Chemistry Comparison

Pick the chemistry before you design the charger. The wrong charge voltage for a chemistry is a common beginner mistake.

Chemistry Nominal Voltage Full Charge Min Discharge Safety Profile Typical Maker Use
Li-ion (18650/21700) 3.6–3.7V 4.2V 2.5–3.0V Moderate IoT nodes, power banks
LiPo (pouch) 3.7V 4.2V 3.0V Moderate, swells when abused Drones, wearables, ESP32 boards
LiFePO4 3.2V 3.65V 2.5V High, stable chemistry Solar storage, outdoor sensors
Li-ion HV (LiHV) 3.8V 4.35V 3.0V Lower margin RC hobby only

A standard Li-ion charger set to 4.2V will undercharge a LiFePO4 cell. Charging a LiFePO4 cell with a Li-ion profile pushes it past its safe ceiling. Match the charger to the chemistry.

How Safe Charging Works: CC/CV

Lithium cells need constant-current/constant-voltage charging. The charger runs in two phases:

  1. Constant current (CC): The charger delivers a fixed current, usually 0.5C to 1C, until the cell reaches 4.2V.
  2. Constant voltage (CV): The charger holds 4.2V and lets the current taper. It terminates when the current falls to about C/10.

A 2000mAh cell has a 1C rate of 2000mA. Charging at 0.5C means 1000mA. Lower rates run cooler and extend cell life.

Never charge a lithium cell with a bench supply set to 4.2V and no current limit. The cell can draw far more current than it can safely accept, especially when deeply discharged.

Charge ICs Compared

IC / Module Max Charge Current Input Protection Included Notes
TP4056 (bare module) 1A (set by RPROG) 4.5–5.5V USB No Cheap, widely cloned
TP4056 + DW01A + FS8205A 1A 4.5–5.5V USB Yes The 6-pad version
MCP73831 500mA 3.75–6V Charge control only Compact, good for wearables
BQ24074 1.5A 4.35–6.4V Power-path Powers load while charging
BQ25895 5A 3.9–14V Configurable via I2C USB-C and fast charge

The TP4056 Protection Circuit Explained

Most makers start with the TP4056. The bare module charges the cell but does not protect it from over-discharge or short circuits. Look at the pad layout:

  • Bare module: pins labeled IN+, IN-, BAT+, BAT- (four pads, no protection chip).
  • Protected module: adds OUT+ and OUT- and carries two extra chips.

The protected board uses a DW01A battery protection IC and an FS8205A dual MOSFET. The DW01A watches cell voltage and current. It switches off the MOSFETs when:

  • Cell voltage exceeds about 4.3V (overcharge)
  • Cell voltage falls below about 2.4V (over-discharge)
  • Discharge current exceeds about 3A (overcurrent/short)

Always wire your load to OUT+/OUT- on the protected version, not to BAT+/BAT-. Wiring straight to the battery terminals bypasses the protection MOSFETs entirely.

Set the Charge Current

The TP4056 sets its charge current with RPROG:

ICHG ≈ 1200 / RPROG (kΩ)

RPROG Charge Current
1.2kΩ 1000mA
2.0kΩ 600mA
5.0kΩ 240mA
10kΩ 130mA

For a 600mAh cell, use RPROG = 2kΩ (600mA, 1C) or higher resistance for gentler 0.5C charging.

The Load-Sharing Problem

The TP4056 cannot power a load and charge a battery at the same time without confusing its termination logic. The load steals current, so the charger never sees the C/10 taper and may keep the cell at 4.2V indefinitely. For always-on devices, use a power-path charger such as the BQ24074 or MCP73871, which feeds the load directly from USB and charges the cell with the leftover current.

Protecting 18650 and Series Packs

An unprotected 18650 cell (flat-top, no PCB) has nothing between it and your mistakes. Protected cells include a small board and are about 2–3mm longer. Use them unless your design has its own protection.

For packs with more than one cell:

  • Parallel cells (xP): Match voltage within 0.1V before connecting. A large voltage difference causes a high inrush current between the cells.
  • Series cells (xS): Use a BMS (battery management system) with balancing. Without balancing, one cell drifts out of range and the pack fails.
  • Add a fuse rated at roughly 1.25× your maximum continuous current, placed close to the positive terminal.
  • Size your wire for the current. Thin wire is a heating element.

Monitoring Battery Voltage in Firmware

Hardware protection is the backstop. Firmware should stop the system before the DW01A has to. This ESP32 sketch measures a cell through a 100kΩ/100kΩ voltage divider on GPIO34 and enters deep sleep at a low-voltage threshold.

// ESP32 low-voltage cutoff using a 1:2 resistor divider
// Wiring: BAT+ -> 100k -> GPIO34 -> 100k -> GND
// The divider halves 4.2V to 2.1V, inside the ESP32 ADC range.

const int BAT_PIN = 34;              // Input-only ADC1 pin
const float DIVIDER_RATIO = 2.0;     // (R1 + R2) / R2
const float LOW_VOLTAGE = 3.30;      // Warn and sleep below this (V)
const uint64_t SLEEP_US = 3600ULL * 1000000ULL; // Sleep 1 hour

float readBatteryVoltage() {
  uint32_t mv = 0;
  for (int i = 0; i < 16; i++) {
    mv += analogReadMilliVolts(BAT_PIN); // Uses factory ADC calibration
    delay(2);
  }
  mv /= 16;                            // Average 16 samples to reduce noise
  return (mv / 1000.0) * DIVIDER_RATIO;
}

void setup() {
  Serial.begin(115200);
  analogSetPinAttenuation(BAT_PIN, ADC_11db); // Full range up to ~3.1V

  float vbat = readBatteryVoltage();
  Serial.printf("Battery: %.2f V\n", vbat);

  if (vbat < LOW_VOLTAGE) {
    Serial.println("Low battery: entering deep sleep");
    esp_sleep_enable_timer_wakeup(SLEEP_US);
    esp_deep_sleep_start();            // Draws only microamps
  }

  // ... normal sensor reading and Wi-Fi code here ...
}

void loop() {}

A 100kΩ divider draws about 21µA at 4.2V. For battery-powered nodes that sleep most of the time, that adds up. Use a P-channel MOSFET to disconnect the divider except during measurement, or use a MAX17048 fuel gauge over I2C, which reports state of charge directly.

Voltage and Storage Reference

Cell State Voltage (Li-ion/LiPo) Action
Fully charged 4.20V Use; avoid long-term storage here
Nominal 3.70V Normal operation
LiPo storage voltage 3.80V Ideal for storing weeks or months
Low 3.30V Stop and recharge
Cutoff 3.00V Hard stop under load
Damaged Below 2.50V Do not recharge; recycle

Store cells at about 3.8V in a cool, dry place, ideally inside a fireproof LiPo bag or a metal ammo can. Storing cells fully charged accelerates capacity loss and raises risk.

Real-World Project: Solar-Powered ESP32 Weather Station

This build combines the safety layers into one working design.

Parts:

  • 1× protected 18650 cell (3000mAh)
  • 1× TP4056 protected module (or BQ24074 for power-path)
  • 1× 6V/1W solar panel with a Schottky diode in series
  • 1× ESP32 dev board
  • 1× BME280 sensor (I2C: GPIO21 SDA, GPIO22 SCL)
  • 1× low-dropout regulator (3.3V, low quiescent current)
  • 1× 1A fuse or polyfuse

Wiring order:

  1. Panel → diode → IN+/IN- on the charger. The diode blocks reverse current at night.
  2. Cell → B+/B- on the charger.
  3. Fuse in series with OUT+.
  4. Fuse → regulator → ESP32 3V3 and BME280 VCC.
  5. Divider from OUT+ to GPIO34 for monitoring.

Safety checks before first power-up:

  • Verify polarity with a multimeter. Reversed polarity destroys the charger and can ignite the cell.
  • Confirm OUT+/OUT- reads 3.0–4.2V with no load.
  • Confirm the charge LED behaves: red while charging, blue/green when full.
  • Mount the pack in a ventilated enclosure away from flammable material.

Run the firmware above, sleep 10 minutes between readings, and the station can run indefinitely on a few hours of daily sun.

What Not to Do: The Maker Checklist

Mistake Why It Fails Safer Alternative
Charging unattended on a bed or sofa Fire spreads to flammable material Charge on a ceramic tile or metal tray, awake
Using a damaged or swollen cell Internal short likely Recycle at a battery drop-off
Charging at -5°C Lithium plating, internal shorts Charge between 0°C and 45°C
Soldering directly to cell tabs Heat damages the separator Use spot-welded nickel strip or tabbed cells
Mixing old and new cells in a pack Weak cell is driven out of range Use matched cells from one batch
Using a charger with no chemistry label Wrong voltage is possible Verify 4.2V (Li-ion) or 3.65V (LiFePO4) with a meter
Puncturing or crushing for “tests” Immediate thermal runaway Never test destructively indoors
Powering a load from BAT+ on a bare module No over-discharge protection Use the protected OUT+ terminals

If a Cell Fails

  • Swelling or puffing: Disconnect the cell safely, move it outdoors on a non-flammable surface, and do not charge or puncture it.
  • Hissing, smoke, or heat: Back away. Do not handle the cell. Evacuate the area if smoke is heavy and call emergency services if a fire starts.
  • Fire: Small lithium cell fires are difficult to extinguish. Large amounts of water or sand help cool neighboring cells. Protect yourself first and let the fire service handle anything larger than a single small cell.
  • Disposal: Tape the terminals, place the cell in a non-conductive container, and take it to a certified battery recycler. Never put lithium cells in household trash.

Frequently Asked Questions

Is it safe to charge a LiPo battery overnight?

No. Even with a good charger, you should be present while charging. A single failed cell or faulty charger can cause a fire while you sleep. If you must charge long-term, use a smart charger with a timeout, a fireproof bag, and a smoke detector nearby.

Can I charge a Li-ion cell with a bench power supply?

Yes, if you use the supply’s CC/CV mode correctly. Set the voltage limit to 4.20V, set the current limit to 0.5C–1C, and stop when the current drops to about C/10. Never leave it unattended, and never leave the current limit uncontrolled.

What voltage is dead for a LiPo battery?

A LiPo is effectively empty at 3.0V per cell under load. Below 2.5V, permanent damage occurs. A cell that sat below 2.5V should be retired, not recharged.

Do I need a protection circuit if my charger already stops at 4.2V?

Yes. The charger controls charging only. A protection circuit such as the DW01A + FS8205A also guards against over-discharge, short circuits, and overcurrent during use, which a charger does not cover.

Hot this week

Raspberry Pi 500 and 500+: The Keyboard Computers Reviewed

Raspberry Pi 500 vs 500+ reviewed: specs, 2026 price hikes, GPIO wiring and code. Find out which keyboard PC fits your build. Read the guide.

Electronics Learning Roadmap: From Ohm’s Law to Your First PCB

Follow this step-by-step electronics learning roadmap from Ohm’s Law to your first PCB. Get the skills, parts, and projects you need. Start building today!

Arduino Projects for Beginners: 20 Builds That Teach Real Skills

Master electronics with 20 Arduino projects for beginners. Get wiring, code, and parts lists for each build. Pick your first project and start today.

What Is a Raspberry Pi? What It Can (and Can’t) Do

Learn what a Raspberry Pi is, what it can run, and where it falls short. See specs, GPIO pinout, code, and a project guide. Start building today.

What Is Arduino? A Beginner’s Guide to the Platform That Started It All

What is Arduino? Learn how boards, pinouts, and code work, then build your first LED project in minutes. Start your hardware journey today.

Topics

Raspberry Pi 500 and 500+: The Keyboard Computers Reviewed

Raspberry Pi 500 vs 500+ reviewed: specs, 2026 price hikes, GPIO wiring and code. Find out which keyboard PC fits your build. Read the guide.

Electronics Learning Roadmap: From Ohm’s Law to Your First PCB

Follow this step-by-step electronics learning roadmap from Ohm’s Law to your first PCB. Get the skills, parts, and projects you need. Start building today!

Arduino Projects for Beginners: 20 Builds That Teach Real Skills

Master electronics with 20 Arduino projects for beginners. Get wiring, code, and parts lists for each build. Pick your first project and start today.

What Is a Raspberry Pi? What It Can (and Can’t) Do

Learn what a Raspberry Pi is, what it can run, and where it falls short. See specs, GPIO pinout, code, and a project guide. Start building today.

What Is Arduino? A Beginner’s Guide to the Platform That Started It All

What is Arduino? Learn how boards, pinouts, and code work, then build your first LED project in minutes. Start your hardware journey today.

Where to Buy Electronic Components: DigiKey, Mouser, LCSC, AliExpress, and More

Compare DigiKey, Mouser, LCSC, AliExpress and more. Find the best place to buy electronic components by price, stock, and shipping. Read the guide.

Best ESP32 Boards in 2026 for Every Project

Compare the best ESP32 boards of 2026: S3, C6, C3, and P4 pinouts, specs, and code. Find the right board for your build and start wiring today.

Best Bench Power Supplies for Beginners in 2026

Compare the best bench power supplies for beginners in 2026. Learn specs, current limiting, and picks for every budget. Find your first PSU today.

Related Articles

Popular Categories