Code Monkey home page Code Monkey logo

diebiems's Introduction

DieBieMS - Hardware

Introduction

My personal transportation environment is becoming more and more electrical. All my new vehicles so far contain Lithium based batteries and need some form of automated management to be utilized in a safe and easy way. All affordable alternatives that I could find were either to dangerous(extreme cell voltage limits), couldn't carry the desired current (>70A), not compact enough or were not customizable. With this fully opensource project I would like to contribute to a more safe and affordable Lithium based electric vehicle (or possible other usage) future.

alt text

alt text

Other parts of this project

This is the hardware repository containing all hardware source files (designed in altium) and the project outputs to build a BMS PCB. There are three more repositories for this project:
DieBieMS Firmware has to be flashed to the empty BMS STM32, the build .bin and hex file can be found in the BMS tool resource folder.
DieBieMS Bootloader can be flashed with the BMS Tool in the firmware tab.
DieBieMS Configuration tool the tool to configure the BMS and upload the bootloader / update the main firmware.

Latest hardware release (production files)

Production data for most recent version can be found here. The initial project blog/log can be found here. And the schematic in PDF here.

Features

This BMS is an all in one solution, combined with a lithium battery it is possible to replace an existing lead based battery pack (ideal for upgrading a bulky and heavy electric scooter with a much lighter li-polymer pack). In order to be a plug and play system the BMS carries all power electronics and controller systems to switch the main power path and communicate with external interfaces (displays, buttons or anything else you adapt to it). A small list of features:

  • Soft power switch input with LED (LOAD) on/off + charge indicator.
  • High side power switching to allow all grounds to remain connected at all times.
  • Charge input -> switched (high side) -> to charger output (to disable charger if a cell reaches the max cell voltage).
  • Charge input has optional input diode to eliminate current leakage or power on exposed pins (like the male charge connector). V0.10 is an experimental version that has a P-FET instead of the diode to limit heat production when charging.
  • Discharge input -> switched (high side)-> to LOAD e.i. motor controller / VESC (to disable the load when a cell reaches the min voltage).
  • Isolated CAN bus interface for cell voltage monitoring and charger detection, status monitoring + much more with future updates (like state of charge / state of health).
  • Pack current sensing (bi-directional).
  • Pre charge for high capacitive load (with shortcircuit detection, in case the motor controller is shorted / dead / wrong polarity).
  • USB interface for serial communication and firmware upgrades (no need for a programmer -> HW serial bootloader is used).
  • Buzzer to indicate possible Error state.
  • Compact footprint

Electrical specifications

  • Max load current +/- 100A for a short time, for long it is about 70A.
  • Max charge current 10A (with diode) or 30A (with diode bypass).
  • Cell voltage range 2.5V to 4.5V.
  • Pack voltage 12V to 54V

Realisation

Out of the many ways to realise an all in one BMS I chose the more simple but maybe more expensive way. Since there is a lot of desired functionality and the need for a small footprint many features are realized by complex chips.

Power-on state management

There are several ways to enable the BMS and put it into the corresponding operation mode. As of now the following modes of operation are present:

  • Normal operation

    This mode is triggered by a single pres on the powerbutton, when the button is released the microcontroller keeps the BMS on. A long pres will powerdown the BMS. The LED turns solid on when enabled and turn off when powerdown long buttonpress is detected.

  • Charging mode

    When the CHARGE+ input is brought >3V above the PACK+ terminal the BMS is booting into charge mode, the microcontroller will check the cell voltages and if desired enable the switch to allow current to flow from CHARGE+ to PACK+. In this mode the microcontroller knows the presence of the charge. If the charger is removed the microcontroller will keep the BMS on for a configurable amount of time to display a status message (show for example the charged amount) followed by powering down.

  • External mode

    When a USB cable is connected or 5V is applied on the CAN connector the BMS will boot into external power mode. Firmware updating trough the hardware bootloader or communication over CAN bus is now possible. The power on enable by CAN functionality allows an externally battery powered telemetry device to enable the BMS and request battery pack data (giving for example daily / weekly / monthly status updates).

Used technology

The IC's used with their corresponding functionality:

  • LTC6803-2 -> Battery stack cell voltage monitor.
  • STM32F303 -> Main microcontroller.
  • ISL28022 -> Pack voltage and current measurement.
  • BQ76200 -> Height side FET driver for LOAD+ CHARGE+ and Pre-charge switch driving.
  • LM5165 -> SMPS Buck converter, converting the pack voltage to +3.3V.
  • ISO1050 -> isolated CAN-Bus transceiver.
  • CP2104-F03 -> USB to serial converter for bootloader based firmware updates and debugging.

alt text

alt text

alt text

alt text

diebiems's People

Stargazers

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

Watchers

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

diebiems's Issues

Temperature with high current

Hi,

first of all i'd like to congratulate you for this awesome proyect, really really cool.
I have been analyzing the project and i have a doubt about the temperature in different mode: charging and discharging. In charging mode the information says "if desired enable the switch to allow current to flow from CHARGE+ to PACK+". I do not know how much current flows through the pcb for charging but i think is about 2-10 amps if this BMS is used for electrical vehicles. For discharging mode there is an 80 amps fuse between B+ and Batt+ all connected with poligon pours so i guess is designed for high current. Anyway, my question is: with high current what temperature reaches the PCB?

Thank you and best regards

How turn on this BMS?

Hi. I assembled the device.
HW 0.8
I connected battery. I upload firmware. Device connecting in DieBieMSTool.
I connect pin J14:2 to GND. Terminal DieBieMS says the button is pressed.

-----Battery Pack Status-----
Pack voltage : 24.52V
Pack current : 0.04A
Low current : 0.04A
High current : 0.00A
State of charge : 0.0%
Remaining capacity : 0.00Ah
Operational state : Power down
Load voltage : 0.00V
Cell voltage high : 3.506V
Cell voltage low : 3.503V
Cell voltage average : 3.505V
Cell voltage mismatch : 0.003V
Discharge enabled : False
Charge enabled : False
Power button pressed : True
---End Battery Pack Status---

But BMS not connected LOAD and battery. OpState remains Power down.

How turn on this BMS?

Power cutting off. Vesc indicating low vaultage Fault

When running on the bench, everything works fine but the moment I step on the board, power is cut off to the vescs and the board dies. Checked all the wiring and updated to v.27. running 16Ah 10s6p Li-ion pack with DBMS

Boot 0 question

Hi again,

i see that BOOT 0 pin is used for selecting which memory the MCU reads from. Connecting that pin to GND forces the MCU to read from the main flash memory while setting it to 3v3 allows the MCU to read from the system memory. Could you please tell me why you did not use the option for system memory (BOOT0=3v3)? In this mode you have a default bootloader for the MCU.

Understanding Problem? (R39)

Hello!

The last days I have seen your BMS.
Fully interested I have looked at the scematic.

Is there anywhere a description of the different parts or can you answer me few questions?

Now one question. For what is R39, its look like shorting the cell.
Should it a solder brigde? It isn't in BOM.
I don't have enough experience in altium for "understanding the whole schematic".

When you say BMS from 6S to 12S.
When I am connection different series of packs need i have to solder R39 on unused cells?
Or is this only software config?

Why is 6S the minimum?
Or isn't it? Only 12V?

I hope you can help me.
Thank you a lot.
Regards
Andy

2018-10-03 07_07_51-diebiems_db10005_diebiems pdf at master diebieengineering_diebiems github

BMS

Hi,
I am TOM from China. I am interested in BMS. Are you interested in our cooperation in developing a commercial BMS?

SAFETY Signal on LTC6803 GPIO2

Hello,

first of all really nice project! I am currently making a special Version for a custom battery pack.
So thank you very much for sharing!

I have a question:
What is the purpose for connecting the SAFETY signal to GPIO2 of the LTC6803?
I guess its for the reason when something went wrong with communication due to a uC brownout for example?
But why did you use GPIO2 for that? I think the WDTB pin is a better choice for that?
Like the datasheet suggests on page 15:

WATCHDOG TIMER CIRCUIT
The LTC6803 includes a watchdog timer circuit. The watchdog timer is on for all modes except CDC = 0. The watchdog timer times out if no valid command is received for 1 to 2.5 seconds. When the watchdog timer circuit times out, the WDTB open-drain output is asserted low and the configuration register bits are reset to their default (power-up) state. In the power-up state, CDC is 0, the S outputs are off and the IC is in the low power standby mode. The WDTB pin remains low until a valid command is received. The watchdog timer provides a means to turn off cell discharging should communications to the MPU be interrupted. There is no need for the watchdog timer at CDC = 0 since discharging is off. The open-drain WDTB output can be wire ORd with other external open-drain signals. Pulling the WDTB signal low will not initiate a watchdog event, but the CNFGO bit 7 will reflect the state of this signal. Therefore, the WDTB pin can be used to monitor external digital events if desired.

If using GPIO2 and the uC sets this pin to zero, the power stage can be switched on. When the uC gets stucked or something went wrong the pin of the LTC6803 stays at low level, so the power stage will remain enabled!?
This would not happen if SAFETY is connected to the WDTB pin, which uses the LTC6803 internal watchdog?

Or is there any special purposes why you used GPIO2?

Here is my current implementation of the WDTB watchdog feature:
WDTB_implementation

This also has the additional advance that the ISL28022 can also interrupts discharge/charge if an error occurs. (Overcurrent for example).
I think this should be much faster than doing this with the uC.
And once the ISL28022 is successfully configured and the software later stucks the overcurrent protection is still available.

Kind Regards
Danie

What is the licence?

I see in the readme file:

With this fully opensource project I would like to contribute to a more safe and affordable Lithium based electric vehicle (or possible other usage) future.

But under which licence are these materials available? In other words - what can we do the materials? As per https://ohwr.org/licences

Copyright law defaults to 'all rights reserved', and other IP rights are similarly restrictive, so designers need to provide certain freedoms to users explicitly.

Update DieBieMS Readme

The Readme could be improved with a couple of quick typo fixes and removes some trailing white space. Feel free to use the upcoming PR or just close this Issue and PR and wrap the changes into your own work :)

Diode D5? One or two shunts?

Hi Danny,
Big comliments on this. It looks really nice, and I thought I might give it a try to build this myself.

When I looked at the schematic, I had some questions.

  • When a charger is plugged in, Chargedetect is pulled low. The voltage difference between charger and battery will turn on the optocoupler D2. First I thought D5 was some Zener Voltage Regulator diode, but then I saw that it isn't a zener. Why is D5 there then?

  • Also, in the schematic you have R11 and R64 as shunt resistors (1mOhm), but on the pictures I only see one shunt placed on your boards. R11 is rated for 5W. Isn't that short when using proper discharge loads (electric board)? If R64 is added, does this imply a software setting that has to be changed?
    Capture

Thanks in advance

Not saved config

I saved motor configuration in DieBieMS tool, but after reconnect battery my config set to default.

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.