Skip to content

thi-voltage-visionaries/team-bms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to control batteries with Daly-Smart-BMS and Raspberry Pi via UART

Quick-Start-Guide

Before you start:

  • In the folder FINAL you can find two python scripts bms_reader.py and i2c_display.py.

  • Both python files needs to be started with two different ssh-connections via the terminal of your computer.

  • If you want to quit both files, a keyboard input is necessary. Use ctrl + c to quit.

  • Raspberry Pi name: test@bp1 and bp2@bp2

  • Raspberry Pi password: batteryproject

Explanation bms_reader.py:

  • When you start the bms_reader.py, every fifteen seconds a new json file is generated.

  • Json file contains: soc, voltage, current, temperature and capacity.

  • All json files have an individual Unix timestamp in their file name.

  • Json file name example: battery_data_{timestamp}.json.

  • They're all saved in the folder: battery_data_json.

Explanation i2c_display.py:

  • When you start the i2c_display.py, it checks if a new json file arrived in the folder.

  • If a new file is found, it extracts the battery data from the json file.

  • And is then visualized on the I2C-display.

How to start the BMS-reader for Daly-Smart-BMS

  1. Open this folder:

    cd Desktop/team-bms
    

    This folder contains:

    • folder: battery_data_json (includes all generated json files)

    • python file: bms_reader.py

  2. Start the python script:

    python3 bms_reader.py
    

How to start the I2C-display for Raspberry Pi

  1. Open this folder:

    cd lcd
    

    This folder contains:

    • display drivers

    • python file: i2c_display.py

  2. Start the python script:

    python3 i2c_display.py
    

How to make your own battery reader from scratch

Required components

Step-by-Step Guide

1. Setup the Hardware

  • Wire the three Li-Ion battery cells to the Daly-Smart-BMS:
Bildschirmfoto 2024-06-10 um 19 25 10

For more information check this website: Daly

  • Connect the Daly-Smart-BMS with the enclosed UART-USB-A cable to Raspberry Pi.

  • Connect the I2C-display to Raspberry Pi with the help of this Pinout:

Bildschirmfoto 2024-06-10 um 19 25 06 Bildschirmfoto 2024-06-10 um 19 25 02

For more information check this website: Tutorials-RaspberryPi

2. Package installments

• Python Module for Daly-Smart-BMS:

pip install dalybms

For more information check this website: PyPi

• GitHub Repository for I2C-Display drivers:

git clone https://github.com/the-raspberry-pi-guy/lcd.git

Important: i2c_display.py needs to be saved in this folder, so that drivers are working correctly.

For more information check this website: GitHub

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published