diy solar

diy solar

Taves BMS

johntaves

New Member
Joined
Mar 31, 2020
Messages
221
I've created a BMS and am looking for feedback. I am trying to figure out what to do with this.

What should I call this? Do I provide the stuff as a DIY? Do I do some more to make proper packaging and sell it, or both? How can I improve the connectors and mounting and what additional features are wanted? Is there any demand for this solution? Do people want to contribute? Maybe some would like to use it to experiment with batteries (Will Prowse?).

Overview:
1) This will do balancing for real, not like the other options. See the details below.
2) Like Stuart Pittaway's DIYBMS, it consists of as many cell monitoring boards as you have cells, each with an attiny chip. These are opto isolated and strung in series to send their data to an ESP32 based controller. You can string any number of these in series to deal with any battery voltage. The controller monitors the info from the cell monitoring boards and controls relays. Each draws very little power.
3) Like the Electrodacus SMBS0 and unlike the DIYBMS, it will measure 2 different shunt voltages. One is used to measure the whole pack current and provide a state of charge. The second is used to provide the solar current reading.
4) Unlike the Daly and others, no current flows through this BMS. I don't see the point of having umpteen different Amp rated versions of a BMS especially when many applications can directly control the loads and chargers with the relays.
5) Communication with the device is via WiFi. It always has an access point live, so you can connect your phone to that wifi network and see the status. It will also be a client on your existing wifi network. There is no LCD.

Background:
Chargers and inverters all have their own cut offs, but of course they have no information about the cells. This was all fine when we had only lead-acid batteries. With Lithium, the BMS was created to protect the cells from over charge or under charge. This resulted in the sort of goofy situation where some will argue that the BMS is there to protect the cells but the solar controller controls charging. This line of thinking overlooks the fact that Lithium doesn't really need any charge controlling, except to shut off at your desired State Of Charge (SOC). As long as your charger cannot deliver more than 1C of A, then it makes no difference what V you set your charger at. It won't achieve that V until the batteries are full. Your BMS has to be there to shut that off when one cell gets to the knee (e.g. 3.6V for LiFePo4). Whether it shuts that off to protect the cells or whether it is shutting it because it is the charge controller is a semantic, thus pointless, difference.

I want to shut off charging at say 90% just like you do with a Tesla. Tesla recommends you set the charger to stop at say 90% and only run it up to full if you've got some long distance to go. None of these lead-acid based chargers are capable of shutting of charge at some % SOC, because that was lousy for lead-acid batteries. You cannot determine state of charge with lithium by measuring voltage, unless you are at the knee of the curve, which is basically 100% anyway (or you shut off all current and let the batteries rest).

In short, the MPPT controllers and inverter/chargers are rather useless for "controlling" the charge with lithium. They don't provide any "charge curve", they have no cell info, or state of charge info.

Note also that MPPT is just a pointless heat producer if you match your solar panels to your LiFePo4 cells. A 12V LiFePo4 pack mated with 30cell solar panels is usually at the Max Power Point, so an MPPT is just a waste of your money and your PV juice in the form of heat. All you need is a diode, to prevent current from running backwards at night and a relay so the controller can shut of charging (this is exactly what the Electrodacus DSSR20 is and I highly recommend them). (the typical and cheapest 60 cell panels mate nicely with a 24v pack (8s LiFePo4)).

Details:
Charging: The controller will monitor the shunt and thus will keep track of the SOC. It will shut of charging and loads at whatever % you choose. Of course, just like the Tesla, after some time it will accumulate error in that measurement. In order to clear that error, it will periodically run the charge up to the point where a cell hits the knee of the curve (e.g. 3.6V) to reset its SOC counter to 100%.

If you allow the batteries to drain to bottom so that the controller shuts off the loads (e.g. 2.8V), the controller will compute your capacity, otherwise it uses your setting to know the pack capacity. Of course the various cut-off voltages, the state of charge cut-offs, pack capacity, number of cells, how often it runs it up to 100%, are all adjustable settings.

Balancing: All the other BMSs that I am aware of will bleed power off of the cells that reach some limit voltage. None can handle any significant amount of amps. The DIYBMS will drain at most .8A, but only if that heat can be drawn off the cell board. The amount of balancing that these will do is next to nothing because as soon as the cell hits that voltage, the BMS should shut the charging off. This drives everyone to focus on balancing their cells before they install them. My BMS will make a note of which cell reached the cut off first, shut off charging, then send a command to that cell board to start dumping some amps through a 50Ohm resistor. This will burn about .23W, but the controller can do this for an arbitrary amount of time. I have not implemented the algorithm yet, but the idea is to drain that cell below the others so that the same cell is not reaching the limit first every time.

Controlling Stuff: It has 6 optoisolators that the controller uses to turn on/off the various chargers and load. Each can handle .5A, which is probably more than any control signal needs. For example, my WZRELB inverter power switch has the inverter's LED display in series with the switch and thus it draws somewhere around .1A. My Victron Orion 24/75 DC/DC converter, Meanwell rsp-750-27 charger, the Electrodacus DSSR20 solar relays, and 2 Fotek SSR-25DA round out the other 5 things I control in my setup, and all draw a lot less than that. The SMBS0 can only handle 50mA for it's 4 relays. The DIYBMS does not include the relays, you buy them separately.

In the settings you provide a name for each of the devices and specify whether they are a load or a charge. You can tell the controller to use SOC to control any of these. For example, I have the typical gas/electric refrigerator and water heater found in a lot of RVs. Using an SSR on the AC input to these, my controller is set to send juice to these when we have more than 90% SOC and shut off the juice when we drop below 50%. They won't turn back on until the batteries are above 90%.

Of course the controller shuts off all loads (or chargers) when any one cell reaches the lower knee (e.g. 2.8V) and of course the same for chargers at the top, which is the typical safety role most BMSs are doing.

Temperatures:
Each cell monitor not only measures the cell voltage, but you can also plop a thermistor onto each cell and this temperature reading is reported back to the controller.
The controller can take input from 2 temperature thermistors. The first is the main one that must be present and placed near the pack so that the BMS can be sure to not charge when the temperature is near freezing. The second is there just because it was almost no cost to add another. I figure I will stick that one in the interior of my RV so I have an interior thermometer, but I can imagine updating the software to turn on the A/C when it has plenty of SOC and the interior is hot.

FSR:
I have also wired it so that I can place a Force Sense Resistor (FSR) at the end of my pack and get information regarding how these cells expand at the top/bottom of the SOC. I have a steel cage with a plate at the end where I have 4 bolts that will compress the cells. I will put the FSR between 1 bolt and the plate. I figure that reaching the point where the cells start to expand is not great on the cells. Who knows what I will find.

No LCD:
I have no desire to pack a complicated UI onto a small screen and a few buttons. A webpage is much better for that, so the UI is entirely on a web page. Plus you mount this thing wherever you like.

Wiring and Mechanical stuff:
(see next post)
 
Last edited:
Continued...
Assorted: It has a speaker on it, so that it will beep if it told loads or chargers to stop, but it senses current in that direction. It will also shoot an email off, which can be something like yourphone@txt.att.net to shoot an sms to your phone in that emergency condition. At some point, I will probably implement more interesting notification rules.

Wiring and Mechanical:
This photo shows the cell monitor board. There are 4 cells per board. So for a 12, 24, or 48V system, you need 1, 2, or 4 of these boards respectively. However, you can connect the input or output serial connection in between any of the cell monitoring circuits, thus allowing for any number of cells in series.

The 2 ethernet connectors (RJ-45s) are used to bring in the cell voltages. I use the ethernet wire because it is very handy. For cheap, you can get nice shielded twisted pairs and you only have to wire stuff on one end of that wire. The other end just clicks in. I use 2x per set of 4 cells because I use 2 pairs of wires for each cell. One pair powers the board and the Attiny measures the voltage of that. The other pair is wired to the load resistor. This ensures the load is not going to affect the voltage measurement, allowing reasonably long wiring. Mine is like 3 feet from the battery. The next rev of this board will have another ethernet connector to optionally connect the 4x pairs of thermistor sensors if you want to measure the cell temperatures.

In the photo, the 2nd cell is dumping power. The red LED is next to the load resistor. I choose a big resistor package to dissipate heat, but also so that it will be relatively easy to desolder and try a different value.
CellTop.jpg
Each board can be soldered to the previous board making a long line. However, I choose to fold my 2 boards on top of each other. This makes a solid chunk. Maybe I will unfold them and mount the two on the wall. The red circle on the left, shows you where the serial connection between the two boards runs, and the red on the right, shows the serial in/out leads that go to the controller.
CellSide.jpg
This is showing the controller board. On the lower left and lower right you can see the serial out/in wires that get the data from the cell boards. The ethernet connector is used to bring in the 4 pairs of shunt sensor wires. (1 pair for the shunt, 1 pair for the system voltage, times 2 for 2 shunts). Again, I used an ethernet wire, because it is a very handy way to get 4x shielded twisted pairs. Note, this does not communicate with Ethernet wires. I just use that type of wiring and connector. The Traco Power thing is a voltage regulator that supplies the 3.3V for the board where the input is the jack on the lower right. The red jumper disconnects the power so that you can plug in the USB to upgrade the software. On the left you can see I have 1 thermistor plugged in.
ConFront.jpg
Unfortunately this revision of the board has the spring connectors for the load and charger wires mirrored, so I had to put them on the back side. My next rev fixes that of course.
ConBack.jpg
 
Last edited:
This is very cool! I'm excited to follow this project. You've got some creative ideas that I haven't seen applied to BMSes before. Keep up the good work
 
Software:
The screen shots below show it in action on my 24V RV setup. I am using it for real, although it better not get below freezing tonight because my Temp 1 thermistor is BS.

If you pay attention you will notice that I have not implemented the stuff to do the balancing. You can click on any of the cell "T mV" boxes and that will turn on/off that cell's load resistor. So, I have been able to prove that my 2 pair cell wiring works nicely to ensure that when the cell is dumping, it reads the voltage properly and also that the resistor does not overheat the board.
------------------------------
Hopefully this is self explanatory. Maybe the "17 3363" things are not obvious. That's the Celsius temperature of each cell and its milliVolts. You can see that the Temp 1 value is out of whack with the cells, which seem to be OK (edit; NOT! duh, the temp in the RV was about 18C, so the ones with over 20C are bogus. I hope I did not accidentally leave on the dump for those cells). I have to shove it in ice and boiling water, and sort the math out.

The line graph shows the cell voltages over time. New values show up on the right, and fall off on the left. I want to spot how quickly the voltage rises after about 3.4 and see how the different cells perform in that area.
main.png
Here's where you set the pack and cell limits and tell it what your 6 relays are supposed to do. You can see that I manually shut off the hot water and refrigerator because they are grayed out.
limits.png
This is showing my crude settings to deal with the different thermistors and to provide a way to provide a linear adjustment to the readings. I will provide something similar for the individual cells.
sensors.png
network.png
 
Last edited:
Status and thought to hopefully get some feedback from this community:
First, note that I am using it right now on my 24V 280Ah pack in my RV. So plenty is working.

Hardware:
I can upload the files necessary to order the 2 different types of boards from JLCPCB and the software needed to program the cells and the controller so others can buy them without bothering me.

The big problem is that JLCPCB does not keep a good supply of attiny841's in stock. This will work with the attiny441, but I have not sorted out why the 441 fails to communicate. The software easily fits onto the smaller EPROM and RAM of the 441, which I assumed was the only difference between the 2 chips. But alas, the 441 is not really stocked at JLCPCB either. I'm thinking of getting it to work with the attiny44A, because that seems to be much more available. It does not have an UART chip, so I'm not sure if that's going to work.

Another problem is that JLCPCB only lets you order in chunks of 5, so I'm thinking for now, it makes more sense to buy my spares. Unfortunately JLCPCB only mounts the surface components. You have to hand solder the through hole stuff. So I also need to provide the additional shopping list of parts. A minimal batch of boards costs like $120 with postage from JLCPCB. I need to add up the other parts, but they don't amount to much (edit: ooops, the meanwell or Traco power supply is like $7 ea). This means the parts cost for a 12V system would be maybe $40-50 depending on whether I can provide a shopping list for all the rest of the stuff from one supplier (e.g. digikey or mouser) to avoid more than 2 shipping charges for the whole.

However, maybe my time would be better spent finding a company that will make the whole board, including the THT parts. If I do that, I will need to buy a lot more quantity. That should lower the per piece cost and then I can provide a much easier to assemble solution. I would have to take a gamble on how many I could sell.

12, 24, 48V variants:
I could easily make an all-in-one 12V board. I could kick that out in a matter of a few hours. A single 24V one is more work because there's 2x more connectors. The 48V all-in-one seems pointless.

Mechanical:
I care a lot about the mechanical stuff; how things are connected and how it is all mounted. Right now, I think I am better than the DIYBMS and the Electrodacus in some areas, but overall, it needs more work.

It could use a cool 3-D printed case, but maybe that is for the all-in-one variants. Maybe I, or someone else, can make a mounting bracket that takes the 2 components.

It would be nice if there was a way to just click the cell monitor boards together and they are wired up automatically, then click them into the controller, so there's no PIA wires to connect for that communication. Oh, hell, maybe that's easy enough to plop onto my next cell board revision.

Software:
I want to witness the voltage changes per cell over time when they get to the knee of the V curve. I also want to see this in relation to the force. This can be accomplished in 2 ways. I could remember the past N values, constantly losing the oldest value as the latest arrives. Then save that array when the charge (or loads) hit the cut-off. I would then have a UI that let's you view that saved array.

Alternatively I could transmit this to my server (I run https://pickatime.com, https://pnwsoft.com, and https://xcmeet.com). I could make a system where other users can create an account and your BMS will hit the server with your account information. This would mean you could monitor your system, and send commands remotely. I think I want the ability to turn off the inverter remotely. Why not?

However, this seems a bit excessive. I mean most users aren't going to be interested in any of that info. Most will want to just turn the thing on and not be bothered with it.

I have several ideas for improving the software, but it's getting late and I have forgotten them all right now.
 
Last edited:
I should thank Stuart Pittaway for his DIYBMS project. That project gave me a huge head start. This uses his idea for using the attiny for monitoring individual cells. However, note, that even though they have the same general architecture, nothing is compatible between the two.

I used the ESP32, instead of the ESP8266, because it simplified the controller board.

My cell board software and circuit is much simpler. The DIYBMS will dump power when the cell hits the max value, and it dumps a lot of power (max .8A), so it has to have a PWM algorithm to moderate the temperature of the board. It has to measure that temperature and do the math to convert it to Celsius and the same with the voltage. It has to be able to get those max trip values from the controller and store them.

Mine is dirt simple. The temperature and voltage ADC readings are just passed on to the controller. The only thing that comes from the controller is the command to dump power. Note there is a watch dog timer on the cell board that shuts off the dump, if the controller fails to communicate when it should.
 
What should I call this?

I have no idea, I'm generally bad at finding names ^^


Do I provide the stuff as a DIY?

What do you consider as "stuff"? components? PCBs? assembled boards? full kit to assemble? fully assembled BMS?


Do I do some more to make proper packaging and sell it, or both?

Only you can answer that :)


How can I improve the connectors and mounting and what additional features are wanted?

Board to wires connectors? board to board ones? what you don't like with them currently?

What mounting solution do you have currently? (I only see 2 holes already used for board to board standoffs so I'm not sure)


Is there any demand for this solution?

Probably. One thing I learned is that there's a lot of different people wanting very different things on their BMS because they have different priorities, so you'll likely find some demand for your BMS ;)


Do people want to contribute?

Yes. Is the project open source/hardware?


Unlike the Daly and others, no current flows through this BMS. I don't see the point of having umpteen different Amp rated versions of a BMS especially when many applications can directly control the loads and chargers with the relays.

The point is safety thanks to redundancy, and if you maintain redundancy via relays then the current consumption of the relays start to be a problem (yes, there's SSRs but they are actually worse than FET based BMSs loss wise on the load side, and yes there's solutions to reduce power consumption of mechanical relays but they are often expensive and/or cumbersome).


Note also that MPPT is just a pointless heat producer if you match your solar panels to your LiFePo4 cells. A 12V LiFePo4 pack mated with 30cell solar panels is usually at the Max Power Point, so an MPPT is just a waste of your money and your PV juice in the form of heat.

I'd say the wires needed for paralleled panels when direct connected to the batteries are equally pointless heat producers and a waste of your money. But that's only my opinion of course.


I have also wired it so that I can place a Force Sense Resistor (FSR) at the end of my pack and get information regarding how these cells expand at the top/bottom of the SOC.

Funny I had the same idea as I have a spare analog input; can't wait to see the data and understand better how cell expansion really work :)


I have no desire to pack a complicated UI onto a small screen and a few buttons. A webpage is much better for that, so the UI is entirely on a web page. Plus you mount this thing wherever you like.

I agree, I hate 3 or 4 buttons UIs for something as complex as a BMS. You also can't do proper graphs, etc... like you can with a web page ;)


It has a speaker on it, so that it will beep if it told loads or chargers to stop, but it senses current in that direction.

I highly recommend adding a jumper for those who hate beeping things ^^


It will also shoot an email off, which can be something like yourphone@txt.att.net to shoot an sms to your phone in that emergency condition. At some point, I will probably implement more interesting notification rules.

I think connecting any kind of important equipment to internet is a big mistake security wise, but that's only my opinion.


The 2 ethernet connectors (RJ-45s) are used to bring in the cell voltages. I use the ethernet wire because it is very handy. For cheap, you can get nice shielded twisted pairs and you only have to wire stuff on one end of that wire. The other end just clicks in. I use 2x per set of 4 cells because I use 2 pairs of wires for each cell. One pair powers the board and the Attiny measures the voltage of that. The other pair is wired to the load resistor. This ensures the load is not going to affect the voltage measurement, allowing reasonably long wiring. Mine is like 3 feet from the battery. The next rev of this board will have another ethernet connector to optionally connect the 4x pairs of thermistor sensors if you want to measure the cell temperatures.

I agree that RJ-45 are pretty nice connectors but I see a few problems with them:
- they are identical to each other: what happens if you swap the cell one with the thermistor one?
- they can't carry much current, given the specs I saw I wouldn't be confortable passing more than 0.5 A per pin.
- they're often not shielded cables, and when they are then the shield is isolated on one side (if not both) because the ethernet standard require galvanic isolation, so don't count on the shield in your design.
- the side going to cells/thermistors/other will have to have some significant length of wires without the external sheath and they are pretty thin and vulnerable.


I can upload the files necessary to order the 2 different types of boards from JLCPCB and the software needed to program the cells and the controller so others can buy them without bothering me.
[...]
However, maybe my time would be better spent finding a company that will make the whole board, including the THT parts. If I do that, I will need to buy a lot more quantity. That should lower the per piece cost and then I can provide a much easier to assemble solution. I would have to take a gamble on how many I could sell.

Board assembly will be your biggest problem (and expense after the BoM). Best solution will vary according the volumes, upfront cost, time you have to spent, etc...


It could use a cool 3-D printed case, but maybe that is for the all-in-one variants. Maybe I, or someone else, can make a mounting bracket that takes the 2 components.

Not sure, but something I'm sure is that 3D printing doesn't scale well; it's okay for a few dozens units but more than that and you'll have rough time.
 
What do you consider as "stuff"? components? PCBs? assembled boards? full kit to assemble? fully assembled BMS?
Yes, any and all. I could put the circuit, PCBs, partslist, and software on github. I could make a self solder kit. I could make a fully assembled version. I'm looking for feedback on what others want.
I agree that RJ-45 are pretty nice connectors but I see a few problems with them:
- they are identical to each other: what happens if you swap the cell one with the thermistor one?
- they can't carry much current, given the specs I saw I wouldn't be confortable passing more than 0.5 A per pin.
- they're often not shielded cables, and when they are then the shield is isolated on one side (if not both) because the ethernet standard require galvanic isolation, so don't count on the shield in your design.
- the side going to cells/thermistors/other will have to have some significant length of wires without the external sheath and they are pretty thin and vulnerable.
I agree with the first point, I will make the thermistor one different. Do you like the green/orange one you see above that's on the back of the controller for the relays?

The current is less than .1A. That's the cool thing about this, it has all day to drain power from a cell, so the rate is irrelevant.

I don't know enough about EMF to know whether the current design is going to handle everything and whether the ethernet cable twisted pairs, and shielding makes a difference. My inverter would freak out the current measurements and the serial communication on previous versions. I think the elimination of the ground loop from the controller power through the shunt solved that, but I also went to the ethernet wires for the cell monitors at the same time.
What mounting solution do you have currently?
Nothing more than 2 holes in the 2 different boards. I figured I would mount all 3 (1 controller, and 2 cell boards) on a board. Then I tried folding the 2 cells back on each other and sort of like that, but now there's no way to mount it somewhere. I'm looking for ideas.
I think connecting any kind of important equipment to internet is a big mistake security wise, but that's only my opinion.
Yea, I understand that fear. I'll be adding a user/pw to it and https, so it will be totally secure. Email and other phone-home features don't have to be turned on.
I highly recommend adding a jumper for those who hate beeping things
OK, but I am trying hard to eliminate connectors and jumpers, but OK, sure.
The point is safety thanks to redundancy, and if you maintain redundancy via relays then the current consumption of the relays start to be a problem (yes, there's SSRs but they are actually worse than FET based BMSs loss wise on the load side, and yes there's solutions to reduce power consumption of mechanical relays but they are often expensive and/or cumbersome).
Right, but this has nothing to do with building it into the BMS. I'm not debating the desire to have or not have that redundancy. I mean, if you're going to put that into the BMS why not put the shunt into it too?

Modularity:
I think the beauty of this BMS design is that the 1 controller board is independent of the pack size, the amps, etc. You buy as many cell boards as you have cells to monitor. If I double my cells and go to 48V, I just add 2 more cell boards. If I get a bigger inverter to run my air conditioners, I need a bigger shunt.

Above I mentioned that I could make an all-in-one version for 12V and 24V. However, note, that these versions will be no different with respect to expandability. If I made those, and you wanted a 48V system, you'd just buy the 24V and 2 more cell boards. That same 24V version will do 12V, or 18V.

I'll probably make the next revision be an all-in-one 12V board. Why not make the minimum controller board be a 12V BMS? Approved.
Yes. Is the project open source/hardware?
That's what I am asking. Should I do that, and/or make turn-key solutions?
.
 
Last edited:
I'd say the wires needed for paralleled panels when direct connected to the batteries are equally pointless heat producers and a waste of your money. But that's only my opinion of course.
This is off topic. I should not have distracted the main topic with that aside. However, I cannot resist. Debating things is so much fun.... I can't stop .... Ahhhhgggg

Excepting grid tied situations where you never have excess sunshine because you sell it, you generally size your PV so that you have sufficient juice in the worst weather. But that generally means you have excessive PV during the best weather. During the best weather, you have the max amps and thus you have the wire losses if you don't string the panels up and use an MPPT. But the battery will be full before noon, and for the rest of the day you'll be wasting sunshine anyway. In other words, the wires only waste power when they carry a lot of amps, and when that is happening you have more sun than you need anyway.

I agree, that if you are going to run an air conditioner on those max sun days, and the PV won't keep up with the air conditioner, and you want to spend $500 in the hopes of getting 2% more A/C run time, and have done the complicated math to prove that you actually get more, and you don't care that the MPPT will wear out in 10years... well, you've done some terrific math.

The complicated math, including the weather probabilities, to justify a return on that MPPT is trivial to screw up.

OK, OK, this is the last time I am tempted by a debate.... Me: "My name is John." AA group: "Hi, John", Me: "I started arguing when I was 5. I couldn't put it down. I had to have another. I am addicted." AA group: "Thanks for sharing John".
 
I've created a BMS and am looking for feedback. I am trying to figure out what to do with this.
Thanks for your efforts on starting a diy project and providing design information. I'm currently on my own diy bms design; more for fun and to expand my electronic knowledge (which has been locked for the past 20 years). This may sound like I've been in the slammer for 20 years, but that's not the case. I just had more fun traveling and checking out the best mountainbike trails out west. Technology has moved on! I'm willing to try new things and help where I can.

I like the Electrodacus and Chargery approach in regards to using external charge and discharge control. I also like that they have a display. A display is highly important to me. WiFi doesn't work for me in my RV. I often camp in locations void of WiFi. First time I heard of Stuart Pittaway diyBMS. It will take some time to study it. As I understand it, there's a circuit board for each cell to measure its voltage. Do the boards get their *isolated* power from the cell they are testing? If so, is 3.0V is adequate?
 
WiFi doesn't work for me in my RV. I often camp in locations void of WiFi.
I put a wifi router in my RV so that I can attach a better cell antenna, use a cheap security camera for the backup camera, and have my tablet for google maps. I never look for external wifi's to attach to. However, I agree that is not a solution for all. But it was fun. But I do get to watch movies where everyone else's phone has no signal.

The BMS is always an access point (AP), which means it is providing a wifi signal for your phone or tablet to attach to. I agree that it is annoying to attach your phone to this non-internet AP to see your pack SOC. My thinking is that it is less work and more flexible to buy an old phone or tablet and plop it anywhere you like and have it permanently connected to that AP, with the status web page just blinking away. You can get any size you like. Place it anywhere you like.

I also am not against making an LCD display that shows SOC and a few other things, but I have absolutely no desire to make some sort of UI for altering parameters via a few buttons. Imagine the nightmare documenting it (push "mode", then "select" then load the gun and shoot me).

But, actually, I don't see the point with the read only LCD. Almost all the used phones and tablet have worn out batteries, but so what? Any LCD UI on the battery is wired in place, so wiring power to some tablet is no different. Heck, put one in the bathroom, and one on the fridge.
As I understand it, there's a circuit board for each cell to measure its voltage. Do the boards get their *isolated* power from the cell they are testing? If so, is 3.0V is adequate?
Yes, yes, and yes. The attiny441 uses very little power and is alive between like 2.5V and 5V

The diyBMS does not have any current measurement ability, so it cannot calculate SOC or do anything with that. Each cell board is isolated, so if you have 8 cells, you are wiring 8 boards. Mine has a 4 pack of cell board, such that your wiring, and mounting is much less of a headache. Plus, his cell balancing is no better than all the others where it will drain power only when at the top, and just about to be shut off.

It also has a cumbersome rules thing that makes it very easy to lose you way and configure something that will wreck your batteries. With mine, I am trying to make it as idiot proof as possible, because I am idiot #1. I've got more to do on that front. I want to make standard settings sets for the different chemistries. Then if you want to override them, it will nag "Are you freaking sure!?!?".

I think I have improved on stuart's basic idea in many different dimensions (utility, balancing, mounting, wiring, assembly, simplicity) and lost nothing.
 
  • Like
Reactions: Cal
I got lost in why the 48V all in one was a lost cause? Could you explain that again?
 
Would also be helpful if you provided clean "spec sheet" in easy to read form of the BMS.. voltage resolution, how the BMS is powered, balancing current, etc
 
I got lost in why the 48V all in one was a lost cause? Could you explain that again?
The all-in-one is just merging the cell board and controller board into one board for a bit less wiring and easier mounting. Nothing changes with respect to expandability. Cells can be added. You can make a 48V system with this. You can make a 96V too. You can start with a 12V and upgrade without throwing anything out.

I just arrived at the conclusion that the 12V all-in-one will be the only controller. I see no point in having a controller without 4 cell boards. It's almost already done. This shows you what the 12V will look like. I circled in red the serial daisy chain. At any of those points, you can plop a wire on there to tap in more cells. Notice the Tx on the controller is already placed right where the 4x cell board's Rx is. And at the other end, we have the Rx for the controller and the final Tx from the cells.

You can Scroll down to understand the issue with 24V and then see why I'll forget the 48V all-in-one.
12VBoard.jpg
To make the 24V, you can simply mount the next cell board next to the 12V like seen below. However, that is poor for a single PCB. If I were to make an all-in-one 24V. I would rearrange the cells to be in a box shape with the 4 RJ-45s coming out 2 sides. ...... OH, hell!!! I can trivially plop another 8x cell square on the other side of the controller. But this is getting nutty. Just mount the separate cell boards your own way and run some wires.

I don't see much advantage to the 24V one and it is more work to rearrange all that stuff. Ultimately we are talking about inventory and parts complexity that has diminishing returns. Until there is some sort of huge demand, there's no point to the 24V all-in-one, and the 48V would have to wait exponentially longer.
24VBoard.jpg
 
Would also be helpful if you provided clean "spec sheet" in easy to read form of the BMS.. voltage resolution, how the BMS is powered, balancing current, etc
Agreed. However for now, you'll have to make do with my blabbering below.

I have a lot of work to do to be able to answer the voltage resolution question. There's the accuracy of the voltage reference, the attiny ADC, temperature coefficient, bla, bla. The subjective answer is that I am happy, or I wouldn't be using it. I will spend some time to see how much variability I get measuring the same cell with different cell boards and my 2 different multi meters. That should supply a pretty good real world idea of the resolution. I also will be putting in the ability to do a linear adjustment to any cell's reading, so that's another experimental thing I can test.

I need to rethink the power. I am using a regulated isolated 12-38V to 3.3V power chip. You can get other versions of that chip series and solder that in. However, that wrecks my argument that you can upgrade to more V later without changing the BMS. Right now, the ESP is a devkit thing, so you can always power the thing from a USB cord and not solder the power chip. I have a jumper to disconnect the chip, when I plug the USB in to upgrade the software.

I'm happy with the 49Ohm resistor that is used to dump power. This will do .23W. But, again, note that this cannot be compared to other BMS balancing currents. The controller can direct the cell to dump power for an arbitrary amount of time, while charging, or not charging. The idea is that you drain that cell so it is not the first to the top next time.
 
The BMS is always an access point (AP), which means it is providing a wifi signal for your phone or tablet to attach to. I agree that it is annoying to attach your phone to this non-internet AP to see your pack SOC. My thinking is that it is less work and more flexible to buy an old phone or tablet and plop it anywhere you like and have it permanently connected to that AP, with the status web page just blinking away. You can get any size you like. Place it anywhere you like.
That's great. I know nothing about wifi or AP. Using an old phone as a wireless display, without needing to access the internet is excellent. I'm sold. Why design/build a display when we can use a phone. Is this the wifi hardware you use?

Edit, looks like you use this.

As you mentioned, a backup plan, to also install a small lcd display at the controller might be good. Just in case there's problems with the phone display while camping.

I like the "one board" concept to measure all cells in a 12V battery. Are you measuring current? I also like data logging capability for design verification, troubleshooting, and just to check usage over 24 hours.
 
Last edited:
I think I saw that, but I did not understand the main architecture.
Not sure what you mean by main architecture. I'm using a 16-bit adc (ads1115) to measure the 4 cell voltages and current shunt voltage. Each cell has its own resistor divider to drop voltage in the 2.0V range. All measurements are referenced to battery ground.
 
Is this the wifi hardware you use?
Close, but not quite. The 8266 is a smaller and cheaper one that has fewer io pins. I'm using an ESP32. Specifically this one that comes with some stuff to make it easy to plug the usb cord into it to program it.

Note, that this isn't "wifi hardware" so much as a microprocessor that has many pins for ADC, DAC, digital in/out and also has a wifi and bluetooth capabillity. So this is doing the temp measurements and controlling the optoisolators along with being the computer that supplies the web pages and monitors the stuff.

Yes, I can log stuff. But I have not implemented that yet. That's just a software change of course.

It measures 2 different shunts. The first is the total pack current. It is used to keep track of the SOC. I hook the second to a shunt for the PV array, and the BMS just displays that and does the subtraction to tell you your loads. I am using 2 INA226 chips for this. I circled them below.INAs.jpg
 
  • Like
Reactions: Cal
Yes, any and all. I could put the circuit, PCBs, partslist, and software on github. I could make a self solder kit. I could make a fully assembled version. I'm looking for feedback on what others want.

Ok, then my advice would be to make a pool to find what people are interested in ;)


I agree with the first point, I will make the thermistor one different. Do you like the green/orange one you see above that's on the back of the controller for the relays?

Yes, I actually chose similar ones on my BMS design. They're one of the few types of connectors accepting bare wires, easier to use than screw terminal blocks, and not too expensive.


I don't know enough about EMF to know whether the current design is going to handle everything and whether the ethernet cable twisted pairs, and shielding makes a difference. My inverter would freak out the current measurements and the serial communication on previous versions. I think the elimination of the ground loop from the controller power through the shunt solved that, but I also went to the ethernet wires for the cell monitors at the same time.

Well, you should read about it if you design something like a BMS because they're typically used in noisy environments and they must have EMI mitigation measures if you want to avoid problems.

Shielding is nice but a bit over the top (here it would be best used only if someone as a problem, 99 % of the time it shouldn't be needed). Twisted pair is a very nice compromise because it's easy to do and pretty effective. Then of course it's recommended to add filters, etc... on the board itself so it's less dependent on cabling quality to work properly.

You definitely want to learn about what's called loop area and why you always want to minimise it ;)


Nothing more than 2 holes in the 2 different boards. I figured I would mount all 3 (1 controller, and 2 cell boards) on a board. Then I tried folding the 2 cells back on each other and sort of like that, but now there's no way to mount it somewhere. I'm looking for ideas.

Well, you need to think about that first when doing the PCB layout because that will determine where non-movable things must go (mounting holes, board-to-board connectors, ...). To give you some ideas I chose a very modular topology on my design (5 different boards, 3 are optional, and you can have up to 3 balacing boards if you want a higher balancing current), with a mix of board stacking with board to board connectors, and flat flex cable with good old 0.1" IDC connectors for more distant boards. I don't know if you saw my thread but I recommend to read it as you should get quite a few ideas ;)


Yea, I understand that fear. I'll be adding a user/pw to it and https, so it will be totally secure. Email and other phone-home features don't have to be turned on.

I have pretty high standards regarding security so that means no wireless network and air-gapped networks for that kind of systems. But again, that's just me, my guess is most people will be happy to have phone alerts, etc... ;)


OK, but I am trying hard to eliminate connectors and jumpers, but OK, sure.

Can be a switch, a solderable jumper, ...


Right, but this has nothing to do with building it into the BMS. I'm not debating the desire to have or not have that redundancy. I mean, if you're going to put that into the BMS why not put the shunt into it too?

Well, I'm just explaining why you'd want that, not saying you should or should not, that's up to you of course ;)

It's not a great idea to include the shunt in the BMS as a decent precision one will be bulky (PCB real estate is expensive) and dissipate some heat (heat is bad for accuracy).


I think the beauty of this BMS design is that the 1 controller board is independent of the pack size, the amps, etc. You buy as many cell boards as you have cells to monitor. If I double my cells and go to 48V, I just add 2 more cell boards. If I get a bigger inverter to run my air conditioners, I need a bigger shunt.

Above I mentioned that I could make an all-in-one version for 12V and 24V. However, note, that these versions will be no different with respect to expandability. If I made those, and you wanted a 48V system, you'd just buy the 24V and 2 more cell boards. That same 24V version will do 12V, or 18V.

I'll probably make the next revision be an all-in-one 12V board. Why not make the minimum controller board be a 12V BMS? Approved.

Yes, modularity is always a good idea (well, a trap is to go too modular too...) :)


This is off topic. I should not have distracted the main topic with that aside. However, I cannot resist. Debating things is so much fun.... I can't stop .... Ahhhhgggg

Excepting grid tied situations where you never have excess sunshine because you sell it, you generally size your PV so that you have sufficient juice in the worst weather. But that generally means you have excessive PV during the best weather. During the best weather, you have the max amps and thus you have the wire losses if you don't string the panels up and use an MPPT. But the battery will be full before noon, and for the rest of the day you'll be wasting sunshine anyway. In other words, the wires only waste power when they carry a lot of amps, and when that is happening you have more sun than you need anyway.

I agree, that if you are going to run an air conditioner on those max sun days, and the PV won't keep up with the air conditioner, and you want to spend $500 in the hopes of getting 2% more A/C run time, and have done the complicated math to prove that you actually get more, and you don't care that the MPPT will wear out in 10years... well, you've done some terrific math.

The complicated math, including the weather probabilities, to justify a return on that MPPT is trivial to screw up.

OK, OK, this is the last time I am tempted by a debate.... Me: "My name is John." AA group: "Hi, John", Me: "I started arguing when I was 5. I couldn't put it down. I had to have another. I am addicted." AA group: "Thanks for sharing John".

Last post of me too on the subject to avoid dead-end debate: just check the cost of wires for a 10 kW of PV install with let's say 10 m between the panels and the batteries. And then, when you find the number is big, add the breaker/fuses, etc... too, you'll see why MPPT with higher voltage series strings makes a lot more sense. Direct PV to battery works ok for RVs, but not for bigger installs.


I'm happy with the 49Ohm resistor that is used to dump power. This will do .23W. But, again, note that this cannot be compared to other BMS balancing currents. The controller can direct the cell to dump power for an arbitrary amount of time, while charging, or not charging. The idea is that you drain that cell so it is not the first to the top next time.

Yep, @MisterSandals gave me the same idea of having a balancing all the time, not just in the knee. Not too hard to do with a bit of software only so I'm not sure why current BMS don't do it (well, there's a lot they don't do I guess...).
 
Last edited:
Back
Top