April 2022, reviving the project
There have been some reasons why this project became stalled for a while. One of them was that the prototype was just working too well, there was no urgent need for continuing on this project. I got busy and distracted by a lot of other things that came up.
Things have changed though: our power consumption went steadily up, we are now also cooking full time on electricity and we need to upgrade our system somewhat with more lithium capacity. With the planned installation of an additional lithium battery bank, I have to build a new prototype and change the other one so they can cooperate on managing our power storage together. Instead of building yet another prototype I decided to finalize the design and organize a small production run for some professionally made Printed Circuit Boards.
In the mean time we have had lots of opportunity to talk with other cruisers and listen to their experiences and needs. This is what we learned so far:
Some people liked the idea of the BMS, but really didn't want to have a lead acid battery anymore in their system. I still believe that having at least some lead acid capacity makes it a lot more easier to control charge sources and that it makes the system more robust and fault tolerant, but ok, if that is what people want, the BMS should at least be able to work in a "no lead acid" mode.
We learned from our own situation that there always comes a moment where you want to upgrade your system. So the BMS topology should be extensible. One should be able to add more lithium capacity later on and instead of mixing "old" and "new" (possible different) cells into one battery bank, it is better to maintain two separate banks. Still though, you don't want to have two independent BMS fighting over when the solar charger needs to be shut down, there should be only one master controlling multiple "bank slaves".
We also learned that people want to buy large lithium banks, despite our warning that you should use lithium only for "short term storage" and use lead acid for "long term storage". We have to admit that we are also moving into that direction, to increase our lithium storage and use lead-acid only for buffering and with less reserve for long term storage. It is however still true that long term storage damages lithium batteries, and the only way to prevent that is to charge them to a partial charge only, like 80% max. The problem here is that due to the flat voltage curve of lithium batteries you can't see what "80%" is unless you once in a while charge up until you see the voltage increase (which indicates 100%), and start precisely counting all the amps going in and out to keep track of the 80%-spot. To my knowledge, so far no other BMS can do that reliably.
If the battery is full (or hits the 80% target), the charging needs to be terminated. Until now this is done by taking the lithium battery offline (which is why at least some lead-acid battery buffer capacity is needed). But I'm working now on some code to dynamically adjust the voltage of the popular Morningstar MPPT chargers so that they still power the ship but 0 amps are going in and out of the lithium batteries. And no, this is not going to work if you set a "fixed" charging voltage, it can only work if it is done dynamically.
We met some people that had problems with their lithium batteries. Always it was due to a failure of their (third party) BMS (or lack of a BMS at all). These things are often derived from a BMS which was originally developed to maintain the batteries of cordless drills or e-bikes. They are in no way up to the complex task of maintaining a big battery that is not either being charged or being discharged, but where charging and discharging alternate frequently (clouds blocking the sun, heavy loads switching on) without reaching one of the endpoints "full" or "empty" undisturbed. Some BMS simply broke down (boat life is harsh for sensitive electronics), wires came loose, and due to the lack of redundancy, there is no fault indication and the user has no way to know that his batteries are no longer protected against over(dis)charging. Dangerous!
We also learned that BMS are particularly sensitive to nearby lightning strikes and SSB transmissions. There are a lot of wires to be connected to a BMS, and all these wires work like little antenna's. Combined with the sensitivity required to measure small cell voltages and currents, it is no surprise that it creates havoc. In my BMS design I took a lot of measures to make the system insensitive to EMI (ElectroMagnetic Interference). Most BMS are not designed with EMI insensitivity in mind because it adds to the cost, and after all for cordless drills and e-bikes you don't have to worry too much about these kind of things.
Our own experience is that despite having a nice status "webpage" in the WiFi accessible BMS, on board ZwerfCat we heard too many times "It is a sunny day. How are we doing with the batteries? Can I run the washing machine and still have enough juice for the oven?". Sure, we can go to the LCD or take our laptop or mobile phone and have a quick look onto the integrated webpage, but actually it would be nice if we would get an automated verbal update once in a while, something like "Ding! Battery state of charge just passed the 80% mark". It would signal us that it is a good time to start running the watermaker, washing machine or some other "manual" load. So that is going to be an option too.
I also had an independent project where I automatically switch on the warm water boiler as soon as the batteries are fully charged and solar power is still available. It would be nice if this could be controlled by the BMS instead. So it should have some configurable automatic switch outputs as well and guess what, it became part of the new design because it fits so well into "battery management" or "power management".
Design changes
The new design is focused on :
- Modularity, flexibility and extensibility
- Redundancy
- Easy of installation, maintenance and daily use
- Low power use
In the new design the BMS is divided into networked modules, connected by a standard Cat5 network cable. I have thought about making this network wireless, but that would make the system less robust, more difficult to configure, and would use way more electrical power. None of the components of the BMS are "portable" and one has to run a couple of wires anyway, so it makes actually no sense to accept these disadvantages just to save connecting a few more wires. A wireless "bridge" module is still an option though if you really don't want to run a piece of cable.
The system is designed in such a way that failure of one module (or disconnecting it, resetting, or updating) will not result in a loss of lithium battery protection. Both the master module and the battery module are safeguarding the lithium battery, so two independent processors are protecting your batteries and system. Also, the modules are locally fed and don't share a common ground. This makes the system more robust against ground loops, EMI (SSB) problems, or induction peaks due to nearby lightning strikes.
Let's discuss the most important modules:
Master module
This module, built around a powerful ESP32 processor, is responsible for making all strategic power management decisions. It can be installed in a convenient user accessible place away from the batteries. It performs the following tasks:
- Powering the "network" bus
- Communication with:
- the client modules
- UDP/TCP clients
- the users (integrated website, LCD, acoustic alarm)
- NMEA2000
- Serial devices
- Maintaining copies of battery status
- Controlling battery connection states
- Controlling cell balancing
- Controlling chargers
- Controlling 1 external load
- Reporting
- System configuration
- System upgrades ("over the air")
Lithium battery module
This module is to be installed next to the actual battery bank. There can be more of these modules if you have multiple independent battery banks.
This module, built around an "Arduino" ATMega168 processor, deals with everything related to a lithium battery bank. There can be 12V, 24V and "cheap" versions of this module. Although all battery related decisions are made by the master module, it can safeguard the battery on its own if the master module is not available, thus adding redundancy to the system.
These modules perform the following tasks:
- Measuring and reporting individual cell voltages
- Measuring and reporting battery current and local bus voltage
- Measuring transfer losses
- Measuring temperatures
- Measuring its own current consumption
- Tracking battery SoC
- Balancing of the cells
- Watchdog, safe battery shutdown if master module fails
- Controlling (and timing) of (bi-stable) battery relais
- Controlling of local cooling fan, battery heater, or load
- Shutting down local components after battery shut-down
The actual "BMS chip" is not some Chinese "e-bike BMS" but a LTC6810 (LTC6811 for the 24V version), the same chip used for Tesla's and other "high power high reliability" applications. These IC's are very high quality, high precision, and have extensive internal diagnostic, fault detection and built-in redundancy, and will even detect broken wires.
For high precision current measurement (needed to establish a reliable Battery State of Charge) another high quality IC, the ISL28023 is used.
Current sensor module
This optional module, built around an "Arduino" ATMega168 processor and two ISL28023 current sensors, can be used as a (remote) current sensor for Lead Acid batteries, and/or current sensor for charging sources.
With the addition of this module you can get a complete oversight of what is going on with your powerhouse. You can see what is going in or out of a lead-acid battery, and if you use one sensor for measuring the current coming in from your (solar)chargers, then (with adding or subtracting what is going in or out of the lithium banks) you can also know how much current the ship is using. Of course the BMS master module is doing all the math for you and presenting a nice comprehensible table showing what current is coming in and where it is going to.
In addition it also comes with an output to control via the BMS master module an external load, such as a boiler, fuel polisher, or other stuff that you might want to run automatically depending on the availability of charge current and/or battery state.
Status
The new hardware design is ready. I'm now designing the circuit boards. The software needs to be adapted to the new design, but that is not going to be an awful lot of work.
Within a week or so, I'm going to order a small production batch of PCB's. The samples of this batch will be available for a reduced price, and will be used to test the system in a variety of configurations.
There is a small problem though: due to the popularity rise of EV's, there is a run on high quality BMS-chips, and the factory of the LTC6810 IC's has a lead time of over one year... I could secure a small batch of these IC's for delivery in july, so we will have to wait a few more months and I have to hand assemble them on the boards. I have considered to settle on some other (inferior) IC, but my aim is to make the best BMS possible, so for now I decided to stick to my initial choice.