Skip to content

Battery Management System Firmware

Modular firmware based on Zephyr RTOS for low-voltage Li-ion batteries.

build badge

GitHub repository: LibreSolar/bms-firmware

Features

  • Running on Zephyr RTOS
  • STM32F0 and STM32L4 series MCUs (can be easily adapted to other manufacturers)
  • Different cell chemistries: Li-ion NMC/NCA, Li-iron-phosphate LFP/LiFePO4
  • Pack current and voltage measurement
  • Monitoring of single cell voltages
  • Control of balancing switches
  • State of Charge (SOC) calculation using Coloumb counting and calibration based on lookup tables
  • Safety features
    • Overcurrent protection
    • Short circuit protection
    • Overvoltage and undervoltage protection
    • Overtemperature and undertemperature protection
  • CAN bus and serial interface with ThingSet protocol

Supported boards

  • Libre Solar BMS-5S50-SC: 3-5s (12V) BMS with TI bq76920
  • Libre Solar BMS-15S80-SC: 6-15s (24-48V) BMS with TI bq76930/40
  • Libre Solar BMS-8S50-IC: 3-8s (12V/24V) BMS with Intersil ISL94202

Supported ICs

The firmware allows to use different BMS monitoring ICs, which usually provide single-cell voltage monitoring, balancing, current monitoring and protection features.

The chips currently supported by the firmware are listed below.

ManufacturerChip# CellsStatusDatasheet
Texas Instrumentsbq769203s-5sfull supportlink
Texas Instrumentsbq769306s-10sfull supportlink
Texas Instrumentsbq769409s-15sfull supportlink
Texas InstrumentsBQ769523s-16sfull supportlink
Renesas / IntersilISL942023s-8sfull supportlink

API documentation

The documentation auto-generated by Doxygen can be found here.