GithubHelp home page GithubHelp logo

shreyasmaitreya / battery-management-system Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 3.0 13 KB

BMS capable of SOC/SOH determination, passive cell balancing, over voltage, over current and over temperature protection determination using Arduino and BQ769X0 ICs. Make connections as per datasheet of BQ 769X0 IC.

C++ 100.00%
arduino bms

battery-management-system's Introduction

Battery Management System (BMS) Code

Overview

This repository contains the Arduino code for a Battery Management System (BMS) designed to monitor and manage the health and state of a battery pack. The system uses the bq769x0 library for BMS operations and focuses on State of Charge (SOC), State of Health (SOH), and protection against overcurrent, overcharge, and overdischarge. It must be noted that this code is compatible ONLY with the BQ769X0 ICs from Texas Instruments.

Features

  • SOC Calculation: Monitors and calculates the State of Charge of the battery.
  • SOH Calculation: Determines the State of Health of the battery based on internal resistance.
  • Protection Circuits: Includes overcurrent, overcharge, and overdischarge protection.
  • Data Storage: Uses EEPROM for storing vital parameters.
  • Hardware Interrupts: Manages multiple hardware interrupts for overcurrent protection.

Hardware Requirements

  • Any compatible microcontroller (e.g., ATMEGA328P, ATMEGA1280, ATMEGA2560, MSP430 or any other microcontroller compatible with the Arduino development platform.)
  • bq769x0 Battery Management IC
  • Shunt resistor
  • External circuitry for voltage and current measurement

Installation

  1. Clone the repository or download the source code.
  2. Install the bq769x0 library in your Arduino IDE.
  3. Connect the BMS hardware as per the schematic (not provided in this README).
  4. Upload the code to your microcontroller.

Usage

  1. Initialization: The BMS is initialized with the BatteryManagement function, setting up various parameters like temperature limits, shunt resistor value, and protection settings.
  2. SOC and SOH Calculation: The SOC_Calc and SOH_Calc functions are responsible for calculating the State of Charge and State of Health, respectively.
  3. Data Storage: The SOC, SOH, and Depth of Discharge (DOD) values are stored in EEPROM for persistence.
  4. Protection Mechanisms: The code includes functions to handle overcurrent situations and to adjust the battery capacity based on its degradation over time.

Configuration

  • The pins for the BMS alert and boot are defined at the beginning of the code.
  • Adjust the BMS_I2C_ADDRESS according to your setup.
  • Modify the battery capacity, internal resistance, and other parameters as per your specific battery specifications.

Contributing

Feel free to fork this project and contribute by submitting pull requests with improvements or by reporting issues.

Disclaimer

This code is provided "as is" and without any warranty. The author is not responsible for any damage caused by the use of this code.

battery-management-system's People

Contributors

shreyasmaitreya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.