Showing posts with label Lithium Batteries. Show all posts
Showing posts with label Lithium Batteries. Show all posts

Tuesday, February 6, 2024

New Inverter System

In this earlier article I talked about my less than satisfactory experience with Outback's newer VFXR inverters.  That cliff-hanger left the obvious question of what replaced the Outbacks.  Well, here you go....

I considered a couple of alternatives, but wanted something with proven power boost capability since that's the key feature that I need, and that kept pointing back to Victron.  They were certainly the popular choice, and I had good access to several example systems working exactly as I wanted.  So that became the default answer.

Limited space for new inverters

 
Limited space in breaker panel

One constraint I now had vs a new build was the available space, existing wiring, existing breaker configurations, available space in breaker panels, etc.  In my experience, a retrofit is driven at least as much by the as-built configuration of a boat, as it is driven by what you ideally would want.  Compromises are almost always required.  Also, Victron's product line is not exactly consistent.  They have the Multi inverters, and also the Quattro inverters.  The big difference with the Quattros is that they have two AC inputs, and the inverter will do a priority selection of which it draws power from.  This is handy is you have one shore power connection and one generator because the Quattro becomes your transfer switch and automatically switches between the two.  But I have two shore power connections and two generators, so need separate power switching regardless.  That means a Multi would be just fine, but it's not that simple.  The transfer switch in the Multi is rated for 50A, where it's 100A in the Quattro.  One of my generators is 100A, so the higher rated switch is important.  Also, the Quattros are available in higher power ratings, at least in 24V models.  All this meant that Quattros fit the bill better than Multis.

But wait, there's more.  At the time (this was all 18 months ago), Victron was rolling out the Multi II model line, with some capacity & voltage versions available, but not all.  And there were hints of a Quattro II line as well.  But the product line was not fleshed out, and some of the II models could not be paralleled where the older versions could.  Their form factor is also quite different, and they simply wouldn't fit without major reconfiguration of the laz.  Now you can see why trying to figure this out initially started to make my head explode and drove me to Outback.

Then there are all the different control buses that Victron has, and trying to figure out what uses what, how they are different, how they connect, and to what benefit.  It was another brain scrambler.  There is VE.bus, VE.CAN, VE.Direct, VE.net, VE.Smart, USB, Ethernet, NMEA 2000, each with different topology rules, different cable length limits, and different devices to interconnect them with different capabilities.  And then there are all the configuration software programs. VEBus, VEConfigure, VictronConnect, VRM, and the GX devices.  Each works with different devices, to manage different things, requiring different physical connections, and running on different platforms/devices.  Compared to other product lines where there is one communications system that connects everything, and one set of tools to configure it all, this was frustratingly complicated.

Anyway, the final decision was to use dual 8kva Quattro inverters, linked to my existing OctoGX that already tied my solar charge controllers together.  The Octo is an odd-ball device that has never had any documentation, and is no longer shown as an available product.  But it has 4 VE.Direct ports which I needed for my solar charge controllers, a VE.Bus port needed for the Quattros, a VE.Can port to connect to my Skylla chargers and my MG BMSes, a second CANbus to connect to N2K for monitoring, and an ethernet port to display and control the device itself.  Most of the Victron GX family of devices include their own display, but the Octo has none.  However you can access it via a web browser over ethernet and you get the same user interface as the built-in displays.  I planned to do the majority of my monitoring over N2K, so this all worked out fine for me.

When you go to install a Victron product, you quickly realize that it's not designed for the North American market.  4/0 DC cables are common for high current devices, and big inverters are exactly such a device.  But 4/0 cables and lugs won't fit in a Victron inverter.  Below you see two 4/0 cable lugs on the power post in a Quattro, and can see that there isn't enough space for them to lie next to each other.  The only way to get them to fit is to cut them down.

 

Not enough space for side by side 4/0 lugs


Lugs must be cut down to fit
 

Also, 4/0 cables won't fit through the opening in the chassis if there is any heat shrink on them, which of course there should be to seal the cable lugs.

4/0 cable doesn't fit through chassis opening

From this I learned that the trick is to use 3/0 cable, not 4/0.  You lose a bit of cross sectional area in the cable, but the lugs and cables fit as intended.

Victron's inverters pose another challenge when you want to build a high capacity inverter system, which is that they are 230V single phase only, and do not have support for North American split phase 120/240V power.  So you somehow need to convert the single phase inverter output into split phase.  You can do that with a full-on isolating transformer where the input side is 230V from the inverter, and the output is a 120/240V split phase.  This is how shore power is handled with an isolation transformer, and it works very well.  However 100% of the power has to run through the transformer, so it needs to be rated accordingly which makes it big, heavy, expensive, and always wasting power.

The alternative is an autotransformer which does not provide isolation, but can be used to derive a neutral for a split phase system.  And in this application, the autotransformer only needs to be sized for the imbalance between the two 120V halves of the split phase system.  So where a 100A isolating transformer would be needed on my boat, I can instead use a 25A autotransformer.   It's smaller, lighter, cheaper, and wastes less power.  The catch, which we will have to save for another day, is that autotransformer selection, grounding, and neutral to ground bonding on the boat can be very tricky, and leave you with surprising circulating current in the system when there are no loads, or a neutral for the inverter loads that is elevated several volts relative to ground.  Both of these things are cause for alarm for anyone inspecting or operating an electric system, so can create quite a problem, even if not particularly dangerous.

I decided on the autotransformer route and selected one from - wait for it - Outback Power.  They have had this product, unchanged for decades, and I have used it before successfully.  The power rating was what I wanted, and it's a nice package with a cooling fan, etc., at a reasonable price.

Outback autotransformer


Then there is another challenging issue with an autotransformer used this way.  An inverter installation will have over current protection on the inverter output sized for it's max current.  In my case that's 100A.  But my autotransformer has a max current rating of 25A, so I need a breaker for it that is 25A.  The challenge is that if the autotransformer breaker trips, the loads lose their neutral, but they still have 240V across L1 and L2 from the inverter.  With an open neutral, the line to neutral voltages will depend on the various 120V loads, and could be anything between 0V and 240V.  120V appliances do not react well to 240V, and damage is almost certain.  Worse yet, starting a fire is a distinct possibility.  So you can't, under any circumstances, allow an open neutral while still applying 240V across L1 and L2.  This means you need some sort of interlocked breaker system such that if the 25A autotransformer breaker trips, it also trips the 100A inverter output breaker.  I accomplished this using an auxiliary contact on the 25A breaker, and a shut trip on the inverter output breaker.  These are snap-on "side-car" devices for ABB breakers, designed for just this sort of thing.  Power from the Inverter output runs through the aux contacts, and to the shut trip device.  Anytime the 25A breaker is opened, it sends any 240V power that is present to the shunt and opens the inverter breakers.  So it's impossible to have the autotransormer breaker open witout the inverter breakers also opening, and you have to close the 25A breaker first, followed by the 100A breaker.  It seems complicated at first, but once you sort it out it's actually a really simple and dependable setup.

Autotransformer breaker with auxiliary contact

 

 

Inverter output breakers, each with a shut trip "side car"

It was quite the wrestling match to get the old equipment out, cables re-routed, breakers moved around, new cable access holes cut, and the new equipment mounted in place.  All I can say is that getting old sucks.  Stuff that I would just push through in my 20s and 30s, even my 40s and 50s, is noticeably more difficult in my 60s.  I'm forever thankful for a young, capable, and enthusiastic son-in-law who lives nearby.

It's good to have youthful help

 
Major components installed

Initial power-on and configuration went well.  After you get your head around all the different tools, and what to use when, it does all work.  But when I switched over to shore power, the inverters didn't start charging as expected.  Further investigation revealed that Victron inverters behave differently from all the others that I have encountered.  In particular, when AC power appears, they do not automatically start a full charge cycle.  Instead they check to see if the battery voltage is a fixed amount below the Absorb voltage, and only start charging if it's below that value.  In most charger parlance, this is called a "rebulk" setting, i.e. the voltage level where the charger will return to bulk charging.  In other products this only applies when AC power remains attached, like when connected to shore power.  If for any reason the batteries get low enough, bulk charging will resume in place a float charging.  But when AC power is gone and then reappears, bulk charging starts right away.

On a boat, this is really important when you are at anchor.  If you start the generator to make water or cook a meal, you typically want to opportunistically charge the batteries while the generator is running.  But Victron inverters won't do that unless the batteries are pretty low, and it's not an adjustable parameter.  Digging through the Victron maze of info I discovered a firmware update that reduced the voltage drop trigger point for LFP batteries, which helps, so I did the update.  But it still wasn't want I wanted.

Up until this point, I had not used so-called DVCC which stands for Distributed Voltage and Current Control.  It's used to allow the battery BMS to direct charging, rather than programming each individual charger to operate on its own.  I decided to give it a try since a friend had been using is successfully on a nearly identical power system.  With one clock of a button in the GX device, everything worked.  The batteries charged right up to full, then settled down to a lower float voltage to maintain 100% with no ongoing charge current into the batteries.  Exactly right, and I have left it on ever since.

Although the power system does what I need it to do, the Victron products are not without warts.  Here are the key things I have run into.

Charger output will likely fall short of specifications.  I haven't been able to figure out why, but with these larger Quattros it's common for people to see closer to 170A of charge current vs the specified 200A.  And that's at 25C ambient or lower where it's supposed to deliver full output.  And to add to the mystery, mine actually does come pretty close to specs, but I don't know why mine and not someone else's.  In contrast, the Skylla chargers put out 100A, as specified, all day every day.

Inverter output is not what you might expect.  An 8kva inverter is 8kva only under a very special load condition, and is really 6.5kva by all other measures.  And that's at 25C ambient.  At 40C it drops further to 5.5kva.  The result is transient overload warnings for loads that you wouldn't expect to cause a problem.

Idle power consumption can be significantly higher than the specs claim.  I haven't measured it specifically on the boat's 8kva 24V Quattros, but I have measured it on a pair of 48V 8kva Quattros and it's DOUBLE what the specs say.  The two inverters, doing nothing, consume a constant 200W.  That makes them the largest power consumer on the boat.  More than refrigeration (all fridges and freezers combined), more than Starlink, just more.  It's rather obscene.  I asked a senior Victron employee about this at METS this fall and he told me that I was measuring it wrong, and that the sampling interval of my current clamp was inadequate.  For that to be the case, the sampling from the clamp meter must be exactly in sync with the AC component of the battery current, and in phase such that every sample is picking up a peak of the AC component.  What are the chances of that?  And it means that everybody else's clamp on meter who has measured this is similarly in perfect sync and phase with the inverter.  There's NFW.  And this includes Victron's own ammeter inside the Quattro.  Man, it's lottery day if that's the case.  So I asked if I put a scope on the cable, would it show the correct current, and he said yes, it would match the spec.  OK, I'm going to do it when I'm back on the boat and we will see what we get... but I call BS on this one.

DC Ripple voltage can be an issue with Victron inverters, even though no other inverter manufacturers seem to have an issue with it.  This goes hand in hand with the current issue above.  An inverter is an electronic switch that turns on and off rapidly to create the output waveform and drive loads.  That switching results in pulse loading on the batteries at the switching frequency.  There is also lower frequency pulse loading at the AC output frequency of 50 or 60hz.  So if you look at the DC voltage at the inverter with a scope, you see a slightly wiggly line rather than a perfectly straight line.  The wiggliness (a technical term) is the "DC ripple".  Too much of it can stress capacitors and shorten their life.  For some reason, Victron monitors this, and generates warnings and alarms, and will even shut down if it's excessive.  Nobody else cares about this, so does it mean that Victron is doing us some special favor that nobody else is?  If they were, then I'd expect to see lots of failures in other inverters, but that's not the case.  Alternately, it could mean that Vicron has a vulnerability that others don't, and they are protecting themselves.  This seems much more likely to me, but we will never know.  Regardless, if your DC cables aren't fat enough, or are too long, you can end up with ripple warnings under higher loads.  And there is no sure way to know how fat or how short those cables need to be.  You can just do your best and cross your fingers.  I got lucky on this, and seem to be free of ripple warnings, but others have not been so lucky.

All this has been in operation for over a year now, and meets the major requirements, despite the little annoyances.  The one thing that really does piss me off is the idle power draw.  Twice the spec?  Are you kidding me?  If I thought there were a better alternative, I would honestly be going the Outback route and making Victron take the equipment back and refund my money.  But they seem to be the lessor of evils.  It's sad that that's considered a success.

Sunday, January 21, 2024

Inverter "Power Boost" Feature

 Many modern inverters have a "power boost" feature that is super useful.  I'm really talking about combined inverter/chargers, but I'm just going to call them inverters for simplicity.  When you are plugged into shore power, or running a generator, that power source is limited, typically to 30A or 50A.  If you overload it, a breaker trips.  To keep this from happening, it's your job to manage the power loads on the boat to keep them under the limit of the power source.  This typically means limiting how may appliances are turned on at once, not heating water while cooking dinner, etc.  Doing this isn't the end of the world, but it's kind of a pain.

For some time now, inverters have been able to help with this by varying how much they are charging the batteries.  In addition to all your boat loads, the inverter itself is an additional load when it's charging your batteries, and can consume close to, if not all of the available incoming power.  These smarter inverters have a setting where you can tell them what the incoming power limit is, and they will only use for charging whatever capacity is left over after powering the other loads.  So if your shore power is 50A, and your boat loads are consuming 30A, the charger will consume no more than 20A, ensuring that the shore power isn't overloaded, and no breakers trip.

This has been a great help to boat operators, but it has limitations.  In particular, the inverter can control how much power it consumes, but it can't control what boat loads are placed on the inverter.  So going back to our example, if the boat loads are 55A, there is nothing the inverter can do to reduce that, and you will trip a breaker.  But then along comes "power boost".

Those clever inverter engineers realized that not only could they reduce the internal charger consumption to manage the shore power load, they could actually turn the inverter back on and use it to supplement the shore power to support even larger boat loads.  So these super-smart inverters will see a boat load of 55A, and they will use the inverter to draw from the batteries to supply 5A to supplement the 50A from shore power, and now the loads work without tripping any breakers.  Then when the loads subside, the inverter goes back to charging to replenish what it took from the batteries.  Pretty cool, right?

This takes another huge bite out of power management on a boat.  You can now exceed shore power capacity by whatever your inverter capacity is.  You just need to be sure that the average consumption is less than the shore power capacity so you don't continually draw down the batteries.  This simplification to load management is so great that I depended on it in our power system design.  For example, our shore power connection is 50A, yet I know that the HVAC system can exceed this for periods of time.  But this power boost feature allows that to still work with a much more common 50A power connection vs a much less common 100A connection.  We almost never have to do load management.

Monday, July 13, 2020

Lithium (LFP) battery update

I kind of left everyone hanging last year when I put my LPF batteries in service.  In fact, I don't think I even reported that they had gone on line.  Well they did, and they have been running flawlessly for the past 18 months.  I absolutely love them, and will never build a lead-acid house bank again unless there is some extenuating circumstance.  They just work SOOO much better.  No more worrying about when they last reached full charge.  No more long drawn out absorption cycles, and when needed, no more long, lightly loaded generator runs.

"Andy" asked a couple of questions in the comments for this post on the BMS design, and I thought I'd answer them here since they are of general interest to anyone messing with this stuff.

The first question was about cell balancing, and whether I had automated it somehow.  The answer is, just the opposite.  What I actually did is completely counter to every guide on how to commission and run an LFP battery bank, but I did it in the name of science.  I had heard recommendations stressing the importance of regular balancing, making it sound like the batteries would fail spectacularly if you let them drift even the slightest.  And I heard reports of people who had run for months and months without having to re-balance.  So I decided I'd find out for myself.

But before getting in deeper, let me review quickly what this "balancing" thing is all about.  To make any battery bank, you need to wire some number of individual battery cells in series to get the voltage you are looking for.  My system is nominally 48V.  Lead battery cells are 2V each, so you need 24 of them in series to get 48V.  LFP cells are 3.2V, so you need 16 of them in series to get 48V (or close enough).

Batteries get charged by the current that you push through them, and when a bunch of cells are wired in series, each gets the same amount of current.  If all the cells are at exactly the same charge level, then as you apply a charge current, they will all fill up by exactly the same about, and they will all reach full charge at exactly the same time.  That's in a perfect world, and I haven't seen one of those yet, so let's look at reality.

Reality is that variations in each cell's construction and chemistry causes each to charge/discharge by slightly different amounts even though they see the same current.  So in reality, when charging, not all cells will reach full charge at the same time.  With lead batteries, we just ignore this and keep on charging because a little overcharging is pretty benign.  So the cells that reached full charge first you just allow to overflow a bit until all the other cells are full too.

But LFP cells are not at all tolerant of overcharging, and can actually be damaged quickly and irreversibly if over charged too much.  There are a variety of ways to deal with this, but my system simply monitors individual cells, and sends an alarm when any cell starts getting too full.  And if any really get too high such that damage may occur, my BMS disconnects the batteries.  As you identify cells that are more charged, or less charged than the average, then you need to do some combination of adding extra charge, or bleeding off some charge from individual cells.  That's balancing.

OK, now that you understand balancing, what did I do.  Well, nothing.  I just put the batteries together and started the system.  Then I monitored it looking for alarms on cells that were too high or too low.  I got none.  In fact the cells all operated within about 5mv of each other, and that continued for about the first year of operation.

But slowly I did see some drift, and after a while I got my first alarm.  My chargers charge to a nominal cell voltage of 3.45V, and my "high voltage" warning alarm goes off at 3.50V.  No action is taken other than to send me an email.  Now, 6 months later, I get warnings pretty regularly, especially if it's a really sunny day and the batteries have charged quickly.  Here's one from today:

Bank  55.519V, On line

Min Spread Max
Present  3.424  0.087  3.512
Min/Max  3.110  0.148  3.555

Cell Voltage Status
1  3.441 Ok
2  3.455 Ok
3  3.455 Ok
4  3.428 Ok
5  3.500 High
6  3.460 Ok
7  3.466 Ok
8  3.446 Ok
9  3.488 Ok
10  3.509 High
11  3.500 High
12  3.486 Ok
13  3.424 Ok
14  3.484 Ok
15  3.459 Ok
16  3.512 High

This is at it's worst, just before the charger switches to float.  This whole process of warnings triggering, then going away lasts maybe 2-3 minutes.  As you can see, cells 5, 10, 11, and 16 are high.  Also notable is that cells 4 and 13 have fallen behind the pack.  These are at the point where I want to take some action.

You can balance my adding charge to low cells, removing charge from high cells, or a little bit of both.  My plan is to address this step-wise, and the first will be to add charge to the low cells (4 and 13).  That will catch them up with the rest of the pack, and will also partially address the cells that are high too.  With the low cells brought up to around the nominal end-of-charge voltage of 3.45, the overall pack will reach it's final voltage sooner, and stop charging before the high cells get as high as they are now.  Then I'll monitor, and continue to add charge to the lower cells until they all get back into a reasonable range of each other.  Now there's no reason why I couldn't drain some charge from the high cells, except I have a charger, and not a suitable load.

One question is how much charge to add, and I really don't know.  Each "cell" is actually two 180Ah cells bolted together, so 360Ah.  My power supply can put out 6A, so I figured I'd start with 6A for 1 hrs, so adding 6Ah.  Then see how much it changes.

OK, that's a long answer to Andy's first question.  Now on to the second, which was whether I am doing any sort of Ah counting to figure out state of charge.

The answer is no.

First, counter to what everyone says, I think battery bank voltage is a sufficiently close indicator of SOC.  People say it's a much worse indicator for LFP vs Lead, but I disagree.  My lead bank was 50.4 volts when fully charged, and 48.0V when is was 50% empty and the generator started.  That's a spread of 2.4 volts.  In contrast, my LPF bank is full at 53.6V, and ready for recharge at 50.4V.  That's a 3.2V spread and is 30% more voltage swing than lead.  The difference, though, is that in the mid area of charge, the LFP voltage doesn't vary much, so there isn't as much differentiation between 60% and 50%.

But the other side of it is, who cares?  In many ways, I don't care what my battery charge state is.  All that really matters is that if it gets low, the generator will start and run through a recharge cycle.  And if they get full, the chargers stop.  And all that is automatic.  So there is no action for me to take based on charge state, so why worry about it.

What I DO monitor are my every 6 hour health reports like the one above.  I do keep an eye on the current voltage, current spread in cell voltage, highest cell voltage ever seen, lowest cell voltage ever seen, and largest cell voltage spread ever seen.  That tells me about the health of the bank, which is much more important than it's current full/empty level.

Saturday, December 1, 2018

Testing BMS Voltage Sensing

In this article on building a BMS, one comment I received cautioned about "phantom" voltage reasons if one of the battery cell voltage sense wires broke, or a fuse blew.  His experience was that the phantom voltage was essentially the average of the two adjacent cells, and could appear to be a healthy battery when it's not.  That would be a problem, so I wanted to test it out.

Thankfully, my BMS doesn't exhibit that problem.  The three pictures below show the cell voltage readings, first with the sensor wires for cell #4 connected correctly, and then with each of the sense wires disconnected.

All sensor wires connected, voltage read correctly

Positive sense wire disconnected from cell #4.  Cell alarms and shows "phantom voltage of 17mv.

Negative Sense wire disconnected from cell #4.  Cell alarms and shows phantom voltage of 17mv
There is a small phantom voltage, but no where near enough to not realize there is a problem.

I think this all comes down to the internal circuitry of the sensing device, and in particular how much impedance there is between channels.

Sunday, November 18, 2018

Building a Battery Management System (BMS)

I've been building a Battery Management System (BMS) for my LFP battery system, and this article will go into more detail about what it does, and the equipment involved.

I'm not building my own BMS because I want to.  Well, maybe a little bit, but it's really because I'm concerned about support and repair 3 to 5 years from now.  Most of the companies building stand-alone BMSs are tiny outfits, and I doubt their longevity.    Several have already come and gone, and I know one guy's who's whole battery system shut down because of a small failed part, the company is defunct and he's stuck, quite literally, until he can buy and install a whole new BMS.  That's really incompatible with distance cruising, so I want something that is built from readily available, industrial components from companies that have been around for a while, and are likely to still be around in the future.  I want to use products where there are many more, much larger customers, who will scream much louder than me if things break and there are not fixes available quickly.  And I want flexibility so I can make changes, and experiment with different approaches to power management.  As much as anything, this is a learning experience for me.  That's the fun part.

All this led me to Programmable Logic Controllers, or PLCs.  They are made by many very large companies, and are used to control everything from elevators, to building heating and lighting, to pretty much every manufacturing facility on the planet.  You don't see them, but they are everywhere.  Our Nordhavn 60, for example, had one at the heart of the hydraulic control system.

Another nice part about PLCs is that all the parts communicate using an industry standard protocol called Modbus.  It works over a standard RS-485 link, or over TCP/IP using ethernet.  So any PLC can connect to sensors and displays from other vendors, and it all works.  And if you look closely, it turns out that many of the electrical devices on a larger boat support Modbus as well.  Victron's devices, for example, are all accessible and controllable via Modbus.  Same for Dometic chillers, FCI water makers, variable speed motor controllers, main engine controls, generator engine controls, etc.  All that stuff can be monitored and controlled via a PLC, if you want.

Sounds good, doesn't it?  I though so, but where to begin?  I had never touched a PLC before, let alone program one, or had any idea who's to use.  So how did I decide?  I looked at some of the bigger names like Siemens, Schneider, Eaton, Rockwell, and Allen-Bradley, but they were pretty expensive.  And I looked at a couple of off-brands that were pretty affordable, but started to feel a bit too much like buying a BMS from a small company.  Then I noticed that both ABT and Delta-T used IDEC PLCs in their hydraulic controls and fan controls, so I checked them out.  I figured if those two companies were happy with IDEC, they would likely fulfill my needs too.  They aren't cheap, but are more reasonably priced, and the company has been in the business for a very long time.


IDEC PLC components


IDEC control displays

So about a year ago, I bought an IDEC PLC to start experimenting and learning about them.  Since there were a wide range of possible applications, I decided to get a very full featured model that would act as a development system for most anything I had in mind.  I got one with 40 input/output channels, ethernet, multiple plug-in expansions modules, plus Canbus J1939.  The J1939 support was with an eye towards pulling data off the engine controls, and hopefully NMEA 2000 as well.  And I also got a color touch screen to use as the control panel for operation.

IDEC FC6A-C40R1CEJ

IDEC HG1G 4.3" color touch screen


Over the following year I played around with three different applications; wiper control that would be more flexible than the off-the-shelf controls, automated fog horn control, and steering station selection and take-control for steering controls through the auto pilot.  Individually, none could justify the cost of a PLC, but combined it starts to look really attractive.  All were successful, and served the bigger goal of teaching me how to program a PLC.

Main screen for control of wipers, horn, batteries, and auto pilot.

That brings us to the BMS which would be a real, live application, not just an experiment.  And one that would be controlling and protecting an expensive battery bank.

The first step was to create clear requirements, and sort them into features that are essential from day one, features that need to follow shortly after, but that don't prevent initial deployment, and things that are nice features, but not essential for prolonged use.  We used this approach extensively in industry when developing products, and it really forces you to clearly articulate what is minimally required to have a viable product.  In this case, it helped identify what's needed before I place the batteries on line.  In a condensed form, here's the list:

  • Voltage measurement for each series wired battery cell, or group of cells.
  • Alarming and control based on cell voltages.  Note that these actions will take place if any cell exceeds the limits.  Any one cell exceeding the limits can cause the entire battery bank to get shut down.
    • Over voltage alarm and emergency battery disconnect.  This is an action of last resort to save the batteries by disconnecting them
    • Over voltage alarm and battery reconnect.  At this point the cell voltage has lowed to a point where it is safe to try reconnecting the bank.  Note that this only comes into play when the bank has been previously disconnected.
    • High voltage alarm.  This is a warning saying that a cell has exceeded the high voltage level.  This warning should help provide early detection of issues that could lead to shutdown of the battery bank.
    • Under voltage alarm and battery reconnect.  At this point the cell voltage has raised to a point where it is safe to try reconnecting the bank.  Note that this only comes into play when the bank has been previously disconnected.
    • Under voltage alarm and emergency battery disconnect.  This is an action of last resort to save the batteries by disconnecting them
  • Display of individual cell voltage and status, plus bank voltage
  • Programmable voltage for all of the thresholds above.
  • Email when there is any change of status.
These are the features that I felt were critical to have before placing the battery bank in service.   It would keep me appraised of any changes, and include automatic protection in case things get too out of hand.



The next priority is temperature sensing, but I feel that can wait until a bit later.  In the mean time, I'll monitor battery temperature manually.  Their operating environment is very mild with winter temps perhaps down to 10C (50F), and summer temps of no more than 18C (65F).

As you can see from the list above, the key element is per-cell voltage, and that turned out to be a lot harder than I expected.  There are lots of analog voltage sensing devices available that are compatible with my PLC.  The problem is that they all utilize a common ground signal for sensing voltage.  That means one of the measurement wires needs to be connected to the battery bank ground, and the other to the pos terminal of the battery you want to monitor.  The result is that for the first battery in the bank you are measuring 0-3V.  Then for the next battery you are actually measuring the first two batteries, and need to subtract out the voltage of the first battery.  Then for the third, you are measuring three batteries, and subtracting out two.  And so on and so forth for 16 batteries.

It's a very inaccurate process for two reasons.  First, there are errors in each measurement, and when you then start to add and subtract them, the error range gets larger.  Second, the measurement scale that you need to use is the scale for the whole battery bank rather than the scale for a single battery.  If the sensor is accurate to 1%, then accuracy on a 5v scale is 50mV.  That's pretty good.  But if it's on a 50V scale, the accuracy is now on 500mV.  That's nowhere near accurate enough for LFP voltage measurements.

The bottom line is that you have to measure each cell individually to get the required accuracy, and that means that each measurement channel needs to be electrically isolated from the others.  That way the neg probe can go on the negative terminal of the battery, and the positive on the positive terminal, and it doesn't matter which battery in the string you are connected too.

Finding a voltage sensing device with fully isolated inputs turned out to be much harder than I though, and I only ended up finding one from a company called Advantech.  They have a whole line of industry control devices, including an 8 channel analog input with fully isolated channels.  The range is selectable, including 0-5v, and the accuracy is 0.1%, or 5mV.  Bingo, that's what I needed, and I bought one to try out.

Advantech ADAM 4117 isolated channel (8 ch) voltage sensor


The first pass at the BMS I cobbled together on a scrap piece of wood using whatever wire I could lay my hands on.  I set up 8 battery cells in series as a 24V battery, with each sensor channel connected to a single battery.  That let me get all the components configured and talking to each other, and verify that I was able to measure each battery in the string.  It all worked, and let me move on to programming the various display and control functions.

Proof of concept system assembled on a piece of scrap wood
To make programming and testing easier, I set up a connection for a "simulated" battery.  I installed a relay controlled by the PLC that switches the input to one of the voltage sensors.  Normally it's connect to the battery, but when you push the "Sim" button on the display, the relay switches the sensor input to an external variable voltage power supply that I have.  With that, I can dial the apparent battery voltage up and down and confirm that the PLC responds as expected, sends the desired warnings, and disconnects the battery bank when it's supposed to.

Here's the basic control, as seen through the control screen.  The home screen shows the overall battery voltage, and has buttons to get to the other pages. 

Battery bank voltage screen

The primary status display shows the state of each cell with the voltage, and an icon for alarm status.  A green square shows all good, yellow up or down arrows indicate high or low voltage respectively, and red up or down arrows indicate over or under voltages respectively.

Detailed battery status showing one cell with high voltage

And here is the configuration page for setting various alarm thresholds.
Configuration screen for setting all battery thresholds

Any change in status that lasts more than 30 seconds gets reported via email.  Here's what the body of the email looks like, providing all the same details as the control screen.

Cell Voltage Status
1  3.283 Ok
2  3.284 Ok
3  3.283 Ok
4  3.281 Ok
5  3.283 Ok
6  3.282 Ok
7  3.283 Ok
8  3.283 Ok
9  3.283 Ok
10  3.282 Ok
11  3.281 Ok
12  3.280 Ok
13  3.493 High
14  3.283 Ok
15  3.283 Ok
16  3.283 Ok


Once the basics were proven to work, it was time to build up the real system.  I had an old battery box designed to house eight L16 lead acid batteries that were the power source for an earlier incarnation of the house power system.  By luck, 32 CALB 180Ah cells fit in it perfectly with just enough space left over for wiring and the disconnect relay.

32 CALB 180 cells fit nicely in an 8 cell L16 box

Below is a diagram of the battery layout.  They are configured as 2P16S.  The "2P" means two batteries wired in parallel, which gives 320Ah @ 3.2V building blocks.  Then "16S" means sixteen of those building blocks wired in series, which brings the whole bank up to 320Ah @ 51.2V, or 16kwh of power.

Battery cell layout in 2P16S configuration


For the BMS, I bought an electric box with hinged and latching door, and mounted it to the side of the battery box.  All the BMS components will be in the electric box, with a pass through for wires between the electric box and battery box.

Equipment box to house BMS components

Built up BMS - wires will be dressed up later

One cumbersome part of the build has been fusing all the voltage sense wires.  All are at elevated voltage with respect to ground and to each other, and have very high current capacity delivered from the batteries.  As such, they all need to be fused.

Fuses for all the battery voltage sensor connections.

Another feature I added is an override switch for the main battery relay.  This is for service and for emergencies in case of a PLC problem.  It has three positions;

  1. Automatic where it is controlled by the PLC
  2. Manual Off where it is Off regardless of the PLC
  3. Manual ON where it is On regardless of the PLC
Battery disconnect relay over-ride

Normally it would be in the Auto position, but if I need to update the PLC, which I expect to do pretty often for the foreseeable future, I can switch it to Manual On to maintain battery power to the house and inverter while I mess around with the PLC.

Inside the battery box with the batteries and other high current wires is the main battery disconnect relay.  It's rated for 500A @ 60V, so well suited for the job.  The only down side is that it draws a lot of power when activated, which is all the time.  About 18W to be exact, which is about 150% more than the whole rest of the BMS plus color display screen.  There are some nice, much lower power devices available that others are using for LFP systems, but their max voltage rating doesn't support a 48V system.  So for now I'm stuck with this, but it will be on the top of my list to find a replacement.

Battery disconnect relay and connected battery cells

The results so far are very satisfying.  I have all the required functions working, including email messages when anything changes.  And I have tried slowly charging the bank to an artificially established threshold to verify that the bank disconnects.  I also checked the measured cell voltages against a NIST calibrated Fluke meter that reads down to 1/10th of a mV.  The BMS is reporting battery voltages that are accurate to within 1mV, and a total bank voltage that is accurate to within 20mV.

The next step is to charge the batteries up and manually perform any battery balancing that might be required, then move the package from my shop to the house basement for final installation and connection to the power system.  I'll keep the lead acid bank in place for a while with an A/B selector switch to control which bank is powering the house.  This is, after all, our primary source of power, so I need to be able to get it working in short order no matter what.  Otherwise I have to run a generator all the time which is really wasteful.  With snow cover, the old batteries probably won't come out until spring



I expect a number of people are wondering about cost on this approach.  It's not the cheapest approach - not by any means - but that wasn't a key objective.  Cost definitely matters, but I'm willing to pay more to have something that is maintainable and repairable.  That was the primary goal.  At the same time, I'm not sure it's really much more expensive than some of the packaged systems. 

Right now there are a few things in my system that are more expensive than they need to be, or than is required for a 24V system.  For example, the fancy PLC that I bought was about $650, but not that I'm ready to put this system into production use, I have ordered a simpler model specifically for the BMS that is $350.  For a 48V system, I needed two of the voltage sense units, and only one is required for a 24V system.  I also had to add a 48V to 24V DC power converter to power the BMS off my 48V batteries.   So if you get rid of all that and reduce it down to what's needed for a 24V boat system, here's a rough breakdown:



PLC - $350 (a lower cost model suitable for the BMS)
Display - $310
Voltage sensor - $230 (only one needed for a 24V system)
Fuses and holders - $50
Battery disconnect relay - $300 estimate, depending on what you get.
Enclosure and misc - $200


All told that's what, $1440?  I have been figuring on $1500 to $2000, so I was in the right ball park.


For comparison, the Lithionics 24V BMS sells for around $2600.  So cost-wise I think I'm actually in pretty good shape.  And the nice thing is that if I decide to double the battery capacity, the only cost would be the batteries themselves and another enclosure.