Coder Social home page Coder Social logo

bobdeng1974 / bms-firmware Goto Github PK

View Code? Open in Web Editor NEW

This project forked from libresolar/bms-firmware

0.0 0.0 0.0 507 KB

Firmware for LibreSolar BMS boards based on bq769x0 or ISL94202

Home Page: https://libre.solar/bms-firmware/

License: Apache License 2.0

C++ 42.87% C 55.43% CMake 1.11% Python 0.24% Shell 0.35%

bms-firmware's Introduction

Libre Solar BMS Firmware

build badge

This repository contains the firmware for the different Libre Solar Battery Management Systems. Originally, the firmware was based on ARM Mbed OS. The current version also supports using Zephyr RTOS for some boards.

Warning: This firmware is under active development. Even though we try our best not to break any features that worked before, not every commit is fully tested on every board before including it to the master branch. As soon as the status of the firmware is considered stable enough, we will test the core features on all boards and generate a release.

Supported devices

ARM Mbed OS:

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

Zephyr (preliminary):

  • Libre Solar 3-8s (12V/24V) BMS with Intersil ISL94202: BMS-8S50-IC

Building and flashing the firmware

This repository contains git submodules, so you need to clone (download) the repository by calling:

git clone --recursive https://github.com/LibreSolar/bms-firmware

Unfortunately, the green GitHub "Clone or download" button does not include submodules. If you cloned the repository already and want to pull the submodules, run git submodule update --init --recursive.

ARM Mbed OS

It is suggested to use Visual Studio Code and PlatformIO for firmware development, as it simplifies compiling and uploading the code a lot:

  1. Install Visual Studio Code and PlatformIO to build the firmware.

  2. Select the correct board in platformio.ini by removing the comment before the board name under [platformio]

  3. Connect the board via a programmer. See the Libre Solar website for further project-agnostic instructions.

  4. Press the upload button at the bottom left corner in VS Code.

Zephyr RTOS

The BMS-8S50-IC is currently only supported in Zephyr. PlatformIO has built-in support for Zephyr, so you can use it the same way as explained above for Mbed. (see platformio.ini for configured Zephyr environments)

If you want to use the native Zephyr build environment, you need to call west from within the zephyr subfolder, where prj.conf and CMakeLists.txt are located.

API documentation

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

Unit tests

Writing the tests is still work in progress. New functions should be implemented in test-driven development fashion. Tests for old functions will be added step by step.

Run the tests with the following command:

platformio test -e unit_test_isl94202 -e unit_test_bq769x0

bms-firmware's People

Contributors

martinjaeger avatar case06 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.