Skip to the content
2 layers70 × 83.5 mmBMS, the printed circuit board in 3D

BMS for 4S LiFePO4 battery packs running on the STM32L152RE. Features a custom FreeModbus port and a Dockerized Python telemetry stack.

Size
70 × 83.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
45
Nets
93
Pads
203
Tracks, vias
278, 35
Pours
50
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
15 Dec 2025
Updated
15 Dec 2025

Overview

BMS is an open-source printed circuit board by LauriAlanen, from the LauriAlanen/BMS repository on GitHub. It is a 2-layer board of 70 × 83.5 mm with 45 parts on 93 nets, routed with 278 tracks and 35 vias.

It is built around the INA2181A2QDGSRQ1, MCP6002T-I/MS-HX and CD4052BNSR, with the LMV331ILT, IPD031N06L3GATMA1 and CSNL2512FT3L00 among its other parts. Its parts include 18 resistors, 8 capacitors, 6 ICs and 3 connectors. It belongs with the power boards and the FPGA and CPLD boards of this library.

Main components

7

README

README.md

BMS for 4S LiFePO4 battery packs running on the STM32L152RE. Features a custom FreeModbus port and a Dockerized Python telemetry stack.

Firmware Architecture Highlights

  • MCU: STM32L152RE using LL (Low Layer) drivers.
  • Control Loops:
    • Fast Loop: Current sensing and Coulomb Counting.
    • Slow Loop (500ms): Voltage/Temp monitoring and slower safety checks.
  • SoC Algorithm: Coulomb counting with OCV (Open Circuit Voltage) recalibration during rest.
  • Protection: Over/Under Voltage, Over/Under Temp, Overcurrent sensing with analog WDT (includes cooldown retry logic).
  • Handle-Based: Encapsulates all state variables in BMS_handle_t, enabling modular, instance-specific logic.
  • Data Decoupling: Uses separate packed structs for Modbus communication (BMS_input_t/BMS_output_t), isolating internal state from the external protocol layer.
  • Runtime Configurability: Utilizes a nested BMS_config_t struct to allow hot-swapping of safety limits and parameters via Modbus without recompilation.

Telemetry Stack + Master

  • A USB-RS485 connection feeds data to a containerized dashboard.
  • Master supports multiple BMS nodes.
  • Ported freemodbus library to STM32L152RE
  • Dashboard: Python Streamlit app for control and live metrics.
  • Storage: InfluxDB for time-series data.
  • Visualization: Grafana for analytics.
  • image

Parts

45
QtyValueFootprintReferences
12ERA-3AEB103VSamacSys_Parts:ERA3AEB101VR3, R4, R6, R7, R8, R10, R11, R12, R13, R14, R17, R18
6C0603C104K4RACTU3rdparty:C0603C1, C2, C3, C4, C5, C8
4Conn_01x01_PinConnector_Wire:SolderWirePad_1x01_SMD_4x8mm-B1, -P1, +B1, +P1
4IPD031N06L3GATMA13rdparty:IPD031N06L3GATMA1CFET1, CFET2, DFET1, DFET2
2929975-01-19-RK3rdparty:9299750119RKJ4, J5
2C0603C103K1RACTU3rdparty:C0603C6, C7
2ERA-3AEB8661VSamacSys_Parts:ERA3AEB101VR1, R2
2ERA-3AEB9090VSamacSys_Parts:ERA3AEB101VR19, R20
2LOGOLOGOG***, G***
1CD4052BNSR3rdparty:SOIC127P780X200-16NIC1
1CSNL2512FT3L003rdparty:CSNL2512FT3L00R5
1ERA-3AEB102VSamacSys_Parts:ERA3AEB101VR9
1INA2181A2QDGSRQ13rdparty:SOP50P490X110-10NIC5
1LMV331ILT3rdparty:SOT95P280X145-5NIC4
1MCP6002T-I_MS3rdparty:SOP65P490X110-8NIC3
1OPA333AIDCKR3rdparty:SOT65P210X110-5NIC2
1TB001-500-10BESamacSys_Parts:SHDR10W100P0X500_1X10_5000X900X1250PJ3
1XC7SH08GW,125SamacSys_Parts:SOT65P212X110-5NIC7

Similar boards

  • 4 layers80 × 80 mmDriver Board, the printed circuit board in 3D

    Driver Board

    famesy/CuteSat

    This is an open-source CubeSat printed circuit board (PCB) project that includes both hardware and software components.

    145 parts3
  • 2 layers50 × 100 mmSpark AE PCB, the printed circuit board in 3D

    Spark AE PCB

    clectric-diy/Spark-AE

    Spark-AE is a synth module designed for the AE Modular format. It is based on the Daisy Seed embedded DSP platform.

    162 partsCERN-OHL-S-2.0
  • 6 layers24.9 × 51.5 mmDM0001, the printed circuit board in 3D

    DM0001

    dioderobot/demo

    Demo for diode boards

    147 parts3
  • 2 layers30 × 61.3 mmModuleV440, the printed circuit board in 3D

    ModuleV440

    stuartpittaway/diyBMSv4

    Version 4 of the diyBMS

    45 parts1.1k
  • 2 layers97 × 78.5 mmDumbpad, the printed circuit board in 3D

    Dumbpad

    imchipwood/dumbpad

    Simple 4x4 numpad with rotary encoder. Powered by QMK via ATmega32u4 Pro Micro

    45 parts517GPL-2.0
  • 2 layers49.8 × 88.9 mmLDG WING FOLD PLACARD, the printed circuit board in 3D

    LDG WING FOLD PLACARD

    jrsteensen/OpenHornet

    OpenHornet 1:1 F/A-18C Simulator Repository

    45 parts431
  • 2 layers26.5 × 34.4 mmPicoLoaderNSB, the printed circuit board in 3D

    PicoLoaderNSB

    makeo/PicoLoader

    A cheap and easy to install modchip for the Nintendo GameCube!

    45 parts320GPL-2.0

Questions

How big is the BMS PCB?

It measures 70 × 83.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the BMS use?

45 parts, built around the INA2181A2QDGSRQ1, MCP6002T-I/MS-HX, CD4052BNSR and LMV331ILT. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the BMS KiCad files?

From the LauriAlanen/BMS repository on GitHub, at the commit this page was made from: the board is Hardware/Schematics/KiCad/BMS.kicad_pcb and its schematic Hardware/Schematics/KiCad/BMS.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the BMS design in my own project?

Its repository states no licence, so its author keeps all rights: ask LauriAlanen before reusing the design.