finds.dev← search

// the find

kanocarra/smart-battery-management-system

★ 57 · C · updated Sep 2017

Using machine learning to estimate the state of charge of lithium ion batteries for electric vehicles

A bare-metal BMS implementation for the STM32F334 that estimates lithium-ion state of charge with a small neural net, used to sit on top of a cell-monitoring IC (the PEC15 CRC code points to something in the LTC680x family) with SD logging and RTC timestamping. For embedded engineers curious how SOC estimation and cell balancing get built without an ML framework or an RTOS.

The neuron.c/layer.c pair is a hand-rolled feedforward net written directly in C for a Cortex-M4 with no CMSIS-NN or framework dependency, worth reading if you want to see what inference looks like with no abstraction layer. It's a genuinely complete BMS stack, not a proof of concept — SPI comms to a cell-monitoring chip, ADC sampling, an FSM for control flow, SD card logging via FatFs, RTC timestamping, and UART all wired together into one firmware image.

Dead since 2017 — no commits, no issues addressed, nothing confirming it ever ran in a vehicle versus a bench test. The README has zero model detail: no architecture, no training data, no accuracy numbers, so you can't judge whether the SOC estimate is any good or just there. Build instructions are Mac-only with a shrug for Windows users, and the actual cell-monitoring IC is never named, you have to reverse-engineer it from the PEC15 CRC code. No license file, so technically you can't use any of it.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →