Need feasibility guidance on Lithium ion battery storage project.

I am an embedded software engineer and have a background in EE. However, I have a personal project idea that may require many products that I am only superficially acquainted with. I am looking for guidance on which components will allow me to meet my design goals. I am hoping to avoid many days of on-line research by relying on your expertise. I have done some reading on this forum to see if any previous topics were close enough to be helpful. My project is not radically new, but the configuration and application I have in mind is different enough that I feel justified in starting this new topic.

The project is a battery management system (BMS) used to manage a personal energy storage system. I will use a series stack of 40 AH lithium ion battery cells. The series stack consists of 16 cells. Thus, the DC output if the stack is approximately 50 volts. I will use an inverter to produce 110 VAC to power small appliances and lights in areas where there is no power, such as when I am camping in the mountains.

I like the idea of using Arduino compatible products to implement the BMS because they are inexpensive and highly supported by the huge open source development community. However, I am new to this community and don't know what all is available. One of my goals is to use libraries, apps, boards and shields that are already developed and proven, so I can minimize my personal development time and avoid a lot of customization for the project.

These are the specifications and goals of the BMS design.

  1. I need to sample the cell voltage of each battery cell in the series stack. I could treat the stack as a stack of clusters of cells. I could use an Arduino mini, as a cluster manager, to sample the cell voltages in a cluster of 6 cells. Using this approach, I would configure the stack as 2 clusters of 6 cells and one cluster of 4 cells. Each cluster would use its own cells to provide power for the Arduino mini cluster manager board. With this approach, I have the challenge of gathering the cell voltage data with some form of isolated data bus. Perhaps a sensor array approach using Blue Tooth LE would work to send the data to one of the Arduino mini boards, which acts like the master controller. I like the idea of using the BLE approach to also transmit the data to an iPhone or IPad and use one of the many apps that are available for monitoring and controlling such a system.

Alternatively, I could just use an Arduino Mega based board that has enough analog inputs to directly sample all the cells itself. By adding a BLE shield to this board I could accomplish the same monitoring and control interface as above.

Another approach would be to use a single Arduino Uno or Mini and add a custom sampler board that employs an analog mux. Then all cells could be sampled by using a single analog input.

This is one area where I am looking for guidance. Of the 3 approaches I described, which would be the least expensive and easiest?

  1. I need to use a digital output for each cell to control a FET that would connect a balancing resistor across the cell. Again, I could use a single serial output to set the bits in a 16 bit shift register to accomplish this functionality. It looks like the trade-off is using the expensive high I/O Arduino board versus having to build the custom circuit to do the balancing with a minimal I/O Arduino controller.

  2. I need to control 2 relays (or contactors), one to connect the battery stack to the inverter and one to connect the battery stack to a charger. Theoretically, I could get away with using only 1 relay at the output of the battery stack to protect the batteries from being over-charged or over-discharged. However, 2 relays gives me more flexibility and would be preferable. At any rate, I need to use an additional 1 or 2 digital outputs to control these relays.

  3. Possibly, I could see the need to use another analog input to measure the temperature of the inverter. If the inverter gets too hot, I could use another digital output to turn on a cooling fan. These are peripheral issues that I will investigate further as I specify the inverter for the project.

So there you have it. These are the broad strokes of the design concept. I am leaning toward using an Arduino Mini with a Red Bear BLE Mini and bread-boarding the sampler and balancing functions. The BLE will allow me to monitor the system status and override the relay controls if my battery management algorithms allow the system to get into a corner case it can't get out of.

I would appreciate any discussion of pro and cons or reasons why my preferred implementation would not work.

Considering the dangers and hazards that come with with Li-Ion batteries I imagine you would be much better off paying the extra cash to buy a product that was designed, built, and tested by professionals who know exactly what they're doing and can provide a warranty with the product. When it comes to safety there should never be any cost cutting measures or short cuts. If not wired and installed correctly Li-Ion batteries are extremely hazardous and present a rather significant fire hazard. I'm aware you said you have a background in Electrical Engineering but it does not seem like you are 100% confidant here or have a 100% sure idea of what you're doing. While I can't stop you from doing so I personally advise that you don't undertake this project as is. I highly recommend you use a commercially made product or at least seek the guidance of the proper professionals. What you are doing here is not safe.

This sounds like one of those situations where a microcontroller is not suitable as the primary control device.

Your task is to individually monitor - and then control - the voltage of each cell in the stack. While there are ways of multiplexing the 16 inputs you would need to monitor and determine each individual differential, it is probably easier to measure each cell voltage separately as in fact, all you are needing is a threshold detector which in turn, controls a voltage clamp on that same cell voltage. As I understand it, this is how Li-ion charge controllers usually work.

You may then want two control interfaces, one to indicate when all of the "clamps" are activated in order to simply shut off the charge, and another in the opposite direction, to disable the clamps in order to stop them unnecessarily draining the cells once charging has ceased. You could do this individually with a microprocessor to provide monitoring but in practice, this is only useful for alerting you to a particular cell which repeatedly fails to function normally and may thus require replacement.

It occurs to me that having disabled the clamps, you may want to know when it is necessary to start charging again - there are two possibilities, one is to monitor total voltage against current draw and to re-institute charge when the voltage falls to a certain value for that current draw. The other is to periodically re-start charging until all "clamps" are activated. The problem here is the concern that charging cycles are detrimental to the lifetime of the cells, so that it is preferred to permit 5% discharge (at least) before charging again. There is probably nothing you can improve in this determination by knowing the individual cell voltages, so further complication to do so rather than simply the total battery voltage, is not indicated and that does not require a microcontroller either.

So to the problem of isolation of the individual clamp units from the control signals (and for that matter, their design to draw no current when disabled). Individual Bluetooth modules would be ridiculous over-engineering, to say nothing of defeating the minimum current requirement. Simple PNP transistor or FET switches driving (graded) resistors to pull up logic inputs with "catch" diodes to the 5V logic supply would provide indication of clamp status if you are using individual monitoring, or a "totem pole" series chain forming a compound "and" gate simply to indicate when all clamps are active. In the other direction, control to shut the clamps down to conserve current, could be by opto-couplers.

My general point is that you have to design and construct the individual modules to control (voltage limit) each cell anyway, so that it will be as simple to have each function independently as to do so under command of a microcontroller.

Reply to Aux10: Your concerns are valid. My company designs 500 kW-H battery systems. I have witnessed what we call a "plasma event", when a lithium cell is shorted out. You get instant explosive spattering of molten metal, much like using an arc welder. Therefore, I undertake this project with full appreciation of the risks and how to prevent them. The battery technology I want to use for my personal project is lithium iron phosphate. It is much more stable than many other lithium battery formulations. It does not exhibit a run-away reaction mode that can cause fires. Bottom line.... Thanks for the warning. Your comments should be taken seriously,

Reply to Paul__B: Your comments have given me some good reasons to analyze my design approach. Of all the design possibilities I discussed in my first post, I have narrowed my preferred design to a single option. I will describe it below and offer a few justifications for these design choices, but I didn't intend this topic to be focused on the BMS design principles. I know these principles very well, but I don't know the world of Arduino, because I have only just recently been introduced to it. In my work, we do a lot with ARMs and PICs, but not with Atmel components. I am very impressed by the size and enthusiasm of this community. It appears that the chances are very good that I can find most of the hardware and software components I need to implement my design without having to build these components from scratch. If my project were intended for a commercial product, I would have all the time and resources available to design it quite differently. However, for my own personal use, the Arduino family of products seems to hold a lot of promise. I just need some guidance from experienced Arduino enthusiasts who can tell me if my impression is correct or where I may have made incorrect assumptions.

Here is my latest design iteration:

I will use a single RFduino BLE board with a dual relay shield for the controller platform. The biggest drawback of this platform is its limited I/O. I can overcome this limitation by designing a simple auxiliary PCB that lets me do all the cell voltage sampling by using a single I/O pin and an analog MUX. Likewise, I can do all the cell balancing by using a single digital I/O pin as a serial port to load a shift register with all the control bits needed to control the balance FETs. I could add a few hardware buttons and an LCD display to implement a rough user interface, but I really like the idea of linking with an iPad or iPhone to create a classy user interface.

These are a few of the things I have not yet had the time to research: 1. Does the RFduino BLE have A to D conversion capability? The I/O pins are all labeled as GPIOs. This implies to me that they are only digital pins that can't be configured as analog pins. If this is true, I will have to add the A/D chip to my auxiliary PCB. 2. Does the RFduino board have any general purpose widget apps like the Arduino Manager that works with the RedBearLab BLE Shield? Maybe the Arduino Manager would work with the RFduino, I don't know. This would allow me to avoid having to do any iPad app programming. It would save me a lot of time for getting a reasonably cool user interface done.

To address a few of Paul__B's assertions: A quality BMS will always have to monitor every cell voltage, not just treat the battery stack as a whole. If any single cell voltage exceeds the safe hi or low threshold, that cell could be damaged. This would incapacitate the whole stack. I can't imagine any method to control each cell voltage better that using a single micro-controller to talk to all the cells. Every intelligent BMS design I have ever seen has taken this approach. This topic could be a very interesting discussion if you want to debate it further, but I can't see the benefits of pursuing the "independent cell controller" approach.

Again, I am looking for feedback that might help me avoid going too far down the wrong road.

My main concern - or curiosity at least - is that the "balance FETs" to which you refer, are not merely switched on or off, but need to function as shunt voltage regulators, which in turn implies that they actually have to sense the cell voltage itself and do so directly as doing so through a microprocessor control loop would be unstable.

I shall be interested to know why it is otherwise.

What sort of capacity are you aiming for ?

Apologies , 40 ah.

Would one of these take care of the charging control.

http://www.ebay.com/itm/16-cells-48V-40A-60Apeak-balancing-LiFePo4-Lithium-iron-phosphate-Protection-PCB-/121248461420?pt=US_Rechargeable_Batteries&hash=item1c3af8b26c

To Paul__B: The balancing FETs are purely digital switches. The regulation is done by the micro-controller. The micro-controller gets its feedback from the A to D sampler circuitry. The controller then uses one or more algorithms to decide to turn the balancing shunts on or off. For example, one algorithm might take all the cell voltages and compute the average. Any cell whose voltage is more than a given distance above the average will get its balancer shunt turned on. This will continue until the offending cell voltage falls back below the computed threshold. Then the controller turns off the shunt path. Any algorithm that uses a voltage threshold to make shunting decisions usually must employ some form of threshold hysteresis because lithium ion cells always exhibit a voltage bounce-back when a load is removed. Without the hysteresis, the balancing algorithm might create a lot of digital oscillation. This is a common approach in most forms of control theory. I hope this example explains why the FET's are simple ON/OFF switches.

The company that makes the product pointed out by Boardburner2 makes some balance modules for very small cell groups, such as 1 or 2. This kind of a balancing circuit may very well do it discretely with an analog circuit, as you suggested. It would be very interesting to know. By the way, Boardburner2, thanks for the tip. The 16 cell balancer board looks interesting. I sent them an email requesting more documentation. There is precious little on the ebay page or their web site.

If you come to a conclusion i would be interested to hear more. I was considering their 8 cell version but came to the conclusion i did not know enough , the cost of the batteries alone is high enough to preclude experimentation?

BTW it seems to me that the cost of lithiumiron phosphate batteries have shown a marked increase last couple of years.

Also istr much better availability of packs from china a couple of years ago. At more affordable prices.

dwilliamsvancouv: The balancing FETs are purely digital switches. The regulation is done by the micro-controller. The micro-controller gets its feedback from the A to D sampler circuitry. The controller then uses one or more algorithms to decide to turn the balancing shunts on or off. For example, one algorithm might take all the cell voltages and compute the average. Any cell whose voltage is more than a given distance above the average will get its balancer shunt turned on. This will continue until the offending cell voltage falls back below the computed threshold. Then the controller turns off the shunt path. Any algorithm that uses a voltage threshold to make shunting decisions usually must employ some form of threshold hysteresis because lithium ion cells always exhibit a voltage bounce-back when a load is removed. Without the hysteresis, the balancing algorithm might create a lot of digital oscillation. This is a common approach in most forms of control theory. I hope this example explains why the FET's are simple ON/OFF switches.

Which again was my point. Switching digital switches on and off will necessarily create minor spikes in voltage as you charge - which probably will not matter if the load is not particularly sensitive to such spikes.

This is the limitation or constraint to using a microcontroller with its algorithms to control the situation. An independent linear shunt to limit the voltage would clearly not do so, and hysteresis is then not necessary.

Of course by the same token, you are always going to get a major spike as the charger turns on and off, so the load must be tolerant to that.