24S+ LTC6804 BMS with various Sensors and Logging Function

A few weeks ago I decided to build a Battery Management System based on the LTC6804-1. The reason that made me build a BMS was the lack of economically priced high grade systems that are also customisable and extendable. The last few Battery Management Systems I used were also absolutely not serviceable (sealed with black epoxy and/or markings scraped off) and they were only usable for one chemistry. I want to have a little more control over my battery packs. Most importantly I want to have a cell logging function. So here’s a list of what my BMS can/will do (not all software features will be fully implemented. The hardware is working though):

  • 16 Bit ADC reading resolution (I expect around 13-14Bit of accuracy)
  • Balancing indicator led (balance current ~120mA)
  • Easily customisable for different chemistries and cell numbers
  • Daisy-chainable (Standard Version is 24S)
  • Very low power consumption during standby
  • No discharge current limit
  • High charge current limit (20A+)
  • Temperature and humidity sensor on the PCB
  • Temperature sensor for the battery pack
  • Altitude/Pressure sensor
  • 3 Axis accelerometer
  • Bluetooth interface
  • RFID interface (supporting MIFARE and NFC)
  • Throttle & Brake Input/Output
  • SD Card slot for data logging
  • Speedometer Input (via Hall or Reed)
  • Buzzer

Well that’s quite a list… but I’m pretty sure it will grow with the next major Revision. I’m thinking about adding a display and some buttons and use a more powerful microcontroller. Depending on the project I certainly won’t assemble/use all of the features but it’s nice to have the option for additional features without redesigning the PCB. And since the sensors etc. don’t really use much space on the PCB they don’t add much to the cost. Due to the high pin count on certain components and the overall complexity I decided to design a 4-layer PCB rather than a 2-layer PCB. A 4-layer PCB also reduces the sesceptibility of EMI and generally improves the quality of the cell measurements if a solid ground plane is used. It’s certainly not hobbyist friendly to use multilayer boards and almost exclusively SMT components, but I really dislike THT components. They are bulky, less serviceable than SMT components and render much more effort assembling a PCB. In the case I decide to sell the BMS, I’d most certainly sell them with the SMT components preassembled.

The basic function

The brains of the BMS is an Atmega128A in the QFN-64 package. The LTC6804 is connected to the Atmega128A via the standard SPI interface which operates at 1Mhz. All following LTCs are connected via their isoSPI Port. When the BMS is in low power mode, the Atmega shuts down the secondary power source (DC/DC converter) and only draws a few microamperes from the first cell. All components except the Atmega and the LTC6804 are then completely shut down. This way the BMS won’t drain the battery when it’s not in use. If the BMS is in use the Atmega will power up the secondary power source, which supplies power to the rest of the components (max. 350mA). While in use, the BMS draws current from cells 1-12 and not only from cell 1. If the BMS is used in an electric vehicle, the throttle can be passed through the BMS and shut it down or reduce the power of the vehicle when a cell or the whole pack reaches a programmable low voltage threshold. There is also the possibility to connect a speed sensor to an interrupt pin of the Atmega. (Preferably a hall sensor from the motor). If a charger is connected to the battery, the BMS automatically wakes up und manages the charging and the balancing of the cells. After the battery is fully charged, the BMS disconnects the charger from the battery. When the BMS is active, either while charging or when the vehicle is turned on, the cell voltage and sensors can be read via bluetooth and the corresponding android app (which I probably won’t program myself). If an RFID Reader such as MFRC522 or PN532 is connected, it can be programmed as a keylock. Using the SD card interface, the sensor data can periodically be saved on a micro SD card.

Balancing algorithm

You may ask yourself if he’s already building his own BMS why the heck doens’t he use active balancing instead of passive balancing? Well the answer is quite simple: complexity. Although it would have been possible to implement active balancing I consider it to be an immense overkill. Active balancing is nice but its also very expensive in development. It is much harder to implement safe balancing/charge redistribution algorithms than just a “charge and cut off” algorithm. In addition, most battery packs stay fairly well in balance unless the cells are of very low quality. Since I don’t want to spend months developing intelligent algorithms I’m just going to use easily implementable algorithms. So far I haven’t decided wheter I will use the cell voltage based cut off method or actually balance the SOC.

First prototype and testing

Once again I ordered the PCBs at smart prototyping. This time I tried the yellow soldermask. In my opinion it looks quite ugly but that’s just my opinion. There’s a small disadvantage though: Because the soldermask is highly translucent it is hard to see wheter an area without tracks is covered or not. The spaces between the pads of the larger ICs -even the TSSOP14- are not covered by the soldermask. The next time I’m going to order red PCBs ^^.

The size of the BMS is 130 x 83mm. With the connector plugged in it’s about 150 x 83mm. I dindn’t want to use the same connectors as most chinese BMS (the crappy EHR/XH/XHP) because crimping is just too time consuming and and I really think it’s a necessity to use connectors that won’t fall apart in a high vibration environment. The balancing connector is a 50 pin IDC lockable connector while all other signal connectors are WAGO type 733.


I left some tracks uncovered so I’ll be able to solder some wire on it. The current rating of the tracks would be too low for high current applications.  image023

The assembly took about 2 hours and went without any problems. Surprisingly, I had the whole thing except the second LTC6804 working within a couple of hours. I haven’t verified the measurements but they seemed to be quite accurate (less noise than a millivolt). The pressure/temperature/accelerometer and current sensor also gave plausible results. I havent tested the SD card and the buzzer but I already used those parts of the circuit successfully in another project. I didn’t test the charge FET at all but I don’t doubt it’s going to work.

After an hour of looking for the problem with the second LTC6804 in the software (it’s usually always the software 😛 ) I decided to have another look at the schematic. Soon the culprit was found. Two wires were connected incorrectly. Unfortunately the tracks of the corresponding wires are hardly accessible even thugh they are on the top layer of the board. Now I have to wait for the second revision. Because I only had very little time doing the revision I just corrected the error and changed a few package sizes for resistors and capacitors.


In order to test the BMS I built a small test rig with the two remaining packs of the Überbike project. It just a very quick and dirty (and dangerous) solution but it keeps up to the task.



Second prototype and testing

The new PCBs arrived a few days ago and I couldn’t wait to get it working. This time I only soldered the parts for necessary for voltage reading/balancing.



Unfortunately the second LTC still didn’t work altough the hardware seemed to be working. The second LTC6804 did actually respond. Let’s take a closer look at the signals. The trigger was set on the wake-up call.


What do we have here? The pulses look like they interfere with each other. No wonder the LTCs don’t understand each other.


The single pulse looks quite clean but the rest is just gibberish.image106

It looked like the LTCs couldn’t handle the speed. The isoSPI interface only allows a maximum clock frequency of 1MHz whereas the normal SPI interface seemed to work just fine with a clock speed of 4MHz. I didn’t capture the signals after fixing the problem.

The cell voltage readings are more or less accurate (1 mV difference compared to the SANWA PC5000a) but there’s still some room for improvement. The last cell shows a slightly too low value but I guess I already know where the problem is. I’ll keep you updated.