DIY Lithium Battery Health Monitor (SoC/SoH LED Display)
by DIY GUY Chris in Circuits > Electronics
173 Views, 5 Favorites, 0 Comments
DIY Lithium Battery Health Monitor (SoC/SoH LED Display)

🔧 What You'll Build:
A compact device that displays State of Charge (SoC) and State of Health (SoH) of lithium batteries using LED bars. Perfect for salvaging old cells or DIY power banks!
📊 Key Features:
✅ Real-time monitoring via BQ27441 fuel gauge IC
✅ Dual LED bars for SoC/SoH (WS2812B NeoPixels)
✅ USB-C charging (BQ24075 IC)
✅ Open-source design (PCB/code/3D files included)
🎥 Demo: See it in action 👇🏻
Supplies
Supplies
Core main Components
- BQ27441 Fuel Gauge IC (Texas Instruments)
- BQ24075 Charger IC (Texas Instruments)
- ATmega328P MCU (Arduino-compatible)
- WS2812B LED Bars (10x2 configuration)
- 18650 Battery Holder
- 0.01Ω Current-Sense Resistor (1206 package)
- USB-C Connector (TYPEC-304-BCP16)
Full BOM list here ➡️ (GitHub repo)
PCB & Assembly
- Custom PCB → Order from JLCPCB
- Solder Paste (ChipQuik SMD291AX)
- MHP50 Hot Plate
- Flux Remover (Chemtronics Flux-Off)
Tools
- Soldering Station (Hakko FX888D)
- LINKMICRO Digital Microscope
- ESD-Safe Tweezers (5-piece set)
- ANENG AN8008 Multimeter
3D Printing
- PLA Filament (Overture Black)
- M2 Threaded Inserts
Software
- Altium Designer → Full Project design files (Altium 365)
- Arduino IDE
Circuit Designing



🔌 Schematic Overview
I designed this system around three core ICs:
- BQ27441 Fuel Gauge - For accurate SoC/SoH measurement via I²C
- BQ24075 Charger - Handles USB-C power input and battery charging
- ATmega328P MCU - Processes data and drives LED indicators
Key Design Challenges Solved:
- Precision Sensing: Added a 0.01Ω current-sense resistor (R10) for coulomb counting
- Thermal Safety: Designed dual NTC support (onboard and external battery sensors)
- Noise Reduction: Used star grounding and 100nF decoupling caps near all ICs
🛠️ Design Tools Used
- Schematic Capture: Altium Designer
- Component Sourcing: Selected JLCPCB-compatible parts for easy assembly
Pro Tip:
Always run a Design Rule Check (DRC) before finalizing! My schematic passed with zero errors thanks to Altium's real-time validation.
📁 Design Files:
PCB Assembly (SMD Soldering Guide)
🛠️ Tools You’ll Need
- Solder Paste (ChipQuik SMD291AX)
- MHP50 Hot Plate
- LINKMICRO Microscope
- PCB Stencil (Included in GitHub repo’s Gerber files)
🔬 Assembly Process
1. Apply Solder Paste
- Secure the PCB stencil over the board using tape.
- Spread solder paste evenly with a squeegee (or old credit card).
- Pro Tip: Chill the paste for 5 mins first for better viscosity!
- I 3D printed a support to help me apply solder paste → (3D STL File here)
2. Place Components
- Use ESD tweezers to position tiny parts (0402 resistors, ICs).
- Start with the smallest components (resistors/caps) → larger ICs last.
3. Reflow with Hot Plate
- Preheat the MHP50 hot plate to 150°C.
- Place the PCB on the plate and heat until paste turns shiny (~220°C, 2-3 mins).
- Critical: Let it cool naturally, no fans!
4. Inspect Under Microscope
- Check each joint with the LINKMICRO microscope:
- Good joint: Smooth, concave fillet.
- Bad joint: Dull or ball-shaped (reflow with hot air).
- Pay special attention to:
- BQ27441’s tiny pins (SON-12 package)
- USB-C connector (easy to bridge)
⚠️ Troubleshooting
- Bridged Pads? Use copper braid w/ flux to wick excess solder.
- Tombstoning? Redo paste application, uneven amounts cause this.
- Cold Joints? Reheat with hot air gun at 250°C.
📌 Pro Tips
- Stencil Alignment: Use PCB fiducials for perfect paste deposits.
- Double-Sided Boards: Assemble bottom side first (larger components last).
- No Hot Plate? A skillet works in a pinch (monitor with IR thermometer).
Final Device Assembly (3D Housing + PCB)
🛠️ What You’ll Need
- 3D-Printed Parts (STL Files)
- M2 Threaded Inserts and screws
- Assembled PCB (from Step 2)
- Soldering Iron (for insert installation)
🔧 Assembly Steps
1 Install Threaded Inserts
- Heat the inserts with a soldering iron at 200°C and press into housing holes.
- Pro Tip: Use an M2 screw to align inserts vertically while cooling.
2 Mount the PCB
- Secure the board with M2 screws, ensuring USB-C port aligns with the housing cutout.
- Connect the 18650 holder/JST connector.
3 Attach LED Diffusers
- Snap the 3D-printed light guides over the WS2812B LEDs for even glow.
Firmware Upload & Real-World Testing
💻 Programming Setup
- Tools Needed:
- USBASP Programmer (for bootloader)
- Arduino IDE (for firmware)
⚡ Flashing Process
- Upload Bootloader (ISP Port)
- Connect USBASP to the PCB’s 6-pin ISP header.
- Select ATmega328P and burn Arduino Nano Bootloader.
- Upload Firmware
- Open Battery_health.ino in Arduino IDE.
- Set board to "Arduino Nano" (same chip).
- Adjust BATTERY_CAPACITY in code to match your cell (e.g., 3000 for 3000mAh).
- You can get the code from here → GitHub direct link
🔋 Testing with Used Batteries
- Insert Cells (try 3 scenarios):
- Healthy cell: SoH ≈100%, SoC updates smoothly.
- Aged cell (e.g., laptop pull): SoH <80%, LED bar shows degradation.
- Dead cell: SoH <20%, verify charger blocks over-discharge.
- Validate Accuracy
- Compare SoC readings to a bench power supply at known voltages.
📌 Pro Tips
- Bootloader Issues? Double-check ISP pin connections with a continuity tester.
- No USBASP? Use an Arduino-as-ISP (tutorial in here).
- Calibration: For lab-grade accuracy, log data in BQStudio (Texas Instruments’ tool).