DIYBMS GIVES EVERY BLOCK OF RECYCLED LAPTOP CELLS ITS OWN SMALL MONITORING AND BALANCING BOARD

One small board per block of secondhand lithium cells, watching voltage and bleeding off the excess so the weakest cell does not get quietly overcharged.

by Stuart Pittaway

FULL CAD BOM FIRMWARE DOCS

EnergyOpen-hardware

Built withESP32

difficulty
●●●●○
time
a weekend-plus
license
CC-BY-NC-SA-2.0
repo
repo ACTIVE1,136 stars
1
Jump to section

COMPAREE VERDICT

diyBMS version 4 solves the central problem of building a lithium pack from mismatched secondhand cells: they drift apart in voltage, and without balancing the highest block gets overcharged while the pack as a whole looks fine. Each small module sits on one cell block, measures its voltage and temperature, bleeds off charge when the block runs high, and reports to an ESP32 controller with a web interface. The hardware repository has KiCad designs, ready-made Gerbers, schematics and BOMs for the controller and the modules, and the firmware lives in a separate repository (diyBMSv4ESP32). What makes this a weekend-plus rather than a weekend is the harvesting: stripping cells out of discarded packs, testing each one for capacity and internal resistance, and sorting them into matched groups is slow, repetitive work, and a single swollen or shorted cell is a fire risk. This is not a kit — you order PCBs from a fab house, source or have the components assembled, flash the chips, and wire the blocks yourself. The single thing most likely to go wrong is not the electronics; it is harvesting cells that should have gone to recycling or misjudging which packs are safe to strip. If you already have a tested pile of 18650 cells and want open monitoring and balancing hardware, this is the project. If you are starting from zero and the phrase 'test each cell for internal resistance' sounds like a research task, start smaller.

GOOD TO KNOW

  • —Full PCB designs in KiCad format and Gerbers for both cell modules and controller board.
  • —Bill of materials present with component references, but no consolidated per-module cost sheet in the repo.
  • —Firmware lives in a separate repository (diyBMSv4ESP32 for the current ESP32 controller; diyBMSv4Code only for the legacy ESP8266), compiles in PlatformIO, and includes the web interface.
  • —Documentation is the README, per-board READMEs, BOMs and schematic PDFs, plus the creator's YouTube playlist on using and building the system; no step-by-step cell harvesting guide.
  • —Licensed Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK — free for personal builds, explicitly not for commercial resale.

Parts to buy

7 items

From our check of the build. Exact quantities and part numbers are in the creator’s BOM.

  • PCBs (module boards and controller)Find
  • ATtiny1624 for current V4.50 modulesFind
  • ESP32 DevKit for the controllerFind
  • MOSFETsFind
  • Voltage regulatorsFind
  • Passives and enclosuresFind
  • BOMs areFind

BUILDS OF THE WEEK

Five open-source builds worth your weekend, every week.

Checked like this one: what’s really in the repo, what it costs, how hard it is. One email, unsubscribe anytime.

Can I build this?

Printnothing required — PCBs are ordered from a fab house
BuyPCBs (module boards and controller), ATtiny1624 for current V4.50 modules (ATtiny841 on legacy V4.40), an ESP32 DevKit for the controller, MOSFETs, voltage regulators, passives and enclosures; BOMs are in the repository
Toolssoldering station, multimeter, a battery tester or charger that measures capacity and internal resistance, and a safe workspace for handling lithium cells
Skillsconfident SMD soldering, basic firmware flashing in PlatformIO, and the discipline to test and discard questionable cells rather than gambling on them
Timeassembly is a weekend; harvesting and testing cells from laptop packs can be another weekend depending on how many you need and where they come from
Cost$$ — the creator publishes no total; you pay for PCBs (fab house minimum orders), components, and cells, which are free if you harvest them yourself
Safetyharvesting lithium cells is the genuinely risky part — never puncture or short a cell, and anything swollen, dented or hot goes to a recycling point, not into a pack; the finished system runs at low voltage (under 30V for a 7S pack) but incorrect wiring can still short a block

Build at your own risk. Projects involve tools, electronics and sometimes mains voltage — follow the creator’s safety notes.

Videos

A year with the diyBMS

Adam Welch's one-year review of a diyBMS powerwall; for build steps, see Stuart Pittaway's official diyBMS YouTube playlist linked from the README.

More builds like this

All projects

Gallery

Start here

Navigation into the creator’s own docs — we don’t rewrite the guide, we route you to the source.

  1. 1.Read the repository README and the assembly documentation to understand the full system before ordering anything. (The main repo covers hardware; firmware for the ESP32 controller is in diyBMSv4ESP32.)
  2. 2.Order PCBs from a fab house using the Gerber files in the repository.(You need one module board per cell block and one controller board.)
  3. 3.Source components from the bill of materials and solder the boards.(Most parts are generic; the ATtiny and ESP32 are the only programmable chips.)
  4. 4.Flash the firmware to the modules and controller using PlatformIO. (The code repository includes instructions for compiling and uploading.)
  5. 5.If harvesting cells, test every single one for capacity and internal resistance and discard any that are swollen, dented, or read outside safe limits.(This step is slow and non-negotiable — one bad cell can ruin the pack or start a fire.)
  6. 6.Wire the modules to the cell blocks and connect them to the controller, then configure the voltage limits and balancing thresholds in the web interface.(Check the creator's YouTube playlist and the schematics before wiring; one module goes on each series block.)

Resources

Documentation, files and community threads for this build — we link straight to the original sources and never rehost the creator’s files.

KNOWN ISSUES

  • The licence is Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK, so you cannot sell a pack or a product built with diyBMS — this is for personal builds only.
  • Harvesting cells from laptop packs is the step most likely to go wrong: packs from unknown sources may have been stored discharged for years, and a cell that reads normal voltage can still have high internal resistance and fail under load.
  • The creator does not publish a per-module price; PCB minimum order quantities and component prices mean a small first batch costs more per board than a larger order.
  • Testing cells properly requires a charger or tester that measures internal resistance, not just voltage — a five-dollar USB tester will not catch a cell that is about to fail.
  • The modules balance passively, bleeding excess charge off as heat through resistors (the README gives about 1.1 to 1.3 A for V4.40 modules), so give the modules room to shed heat; the V4.40 board was made physically larger for exactly that reason.
  • The repository assumes you understand lithium cell safety and does not include a harvesting guide — if you have never stripped a laptop pack before, watch community videos first and work in a fireproof container.

Can I use this with new cells instead of recycled ones?

Yes. diyBMS is a battery management system for lithium-ion packs and cells, and it does not care whether the cells are new or recycled; set the voltage limits in the controller to match the chemistry you use and check that your cells fall inside the module's supported voltage range.

How many cells can one system manage?

The current ESP32 controller firmware is written for up to 200 cell modules, split into up to 16 banks, so one controller covers far more than a typical home pack. You need one module per series cell block.

Do I need one module per cell or per block?

One module per series block. Cells wired in parallel sit at the same voltage, so a block of many parallel cells is monitored and balanced by a single module.

What happens if a module fails?

The controller logs the last reading from every module, so a dead module is obvious in the web interface; the system can trip a relay to disconnect the pack if voltage goes out of range.

Can I sell packs built with diyBMS?

No — the licence explicitly prohibits commercial use. You can build it for yourself, document your build, and share the design, but you cannot sell a product that uses it.

Community builds

No community builds yet — be the first, we feature the best ones.

Discussion1

FROM THE COMPAREE TEAM

Adam Welch looked back on a year since he started building his diyBMS and reviewed the ups and downs on camera. Where would you source your cells, and what capacity would you aim for?

CompareeTEAM2mo agoedited

Practical notes from our verification: the footage in our video comes from Adam Welch's 2019 build, which used the earlier diyBMS generation (the obsolete version 3 with a Wemos D1 mini controller). The current repository is version 4, with separate repositories for the hardware and the code, and newer module revisions (V4.50 switched to the ATtiny1624). Unlike what you might assume, the creator does publish videos: the README links an official YouTube playlist on using and building the system, plus a video on ordering the PCBs from JLCPCB. The single biggest variable is not the electronics, it is whether you already have a tested pile of 18650 cells or are starting from laptop packs, because harvesting and testing cells is slow, repetitive work, and one damaged cell is a fire risk. The README is blunt that the project involves voltages that can kill and may not comply with local regulations. The licence is CC BY-NC-SA 2.0 UK, so non-commercial use only. Correction (4 October 2026): we re-checked this page line by line against the project's own repository, documentation and videos, and fixed errors in earlier versions.

Stuart Pittaway

Stuart Pittaway published the first diyBMS in 2017 and started version 4 in 2019. Version 4 is the current design, with hardware and firmware in separate repositories and discussion on the Open Energy Monitor forum.

GitHub

Star the project on GitHub

DISCLAIMER

  • Comparee is not the author of the projects featured here. All rights to each project belong to its creator — every page links to the original source, and we never host creators’ files.
  • Information is provided without warranty and may become outdated as projects evolve. Prices are indicative bands only — always check the creator’s parts list for current costs.
  • Building and operating any project is at your own responsibility. Protective equipment, safe workshop practice and compliance with local regulations are the builder’s responsibility.