Page 16 of 18

Low cost BMS

Posted: Sun, 27 Jul 2014, 00:33
by Astroboy
Adverse Effects wrote:
arber333 wrote:Maybe it would be best to have it on a trailer that could hook to different EVs and adapt charging... That way DMV couldnt say anything, since what you tow on a trailer is a cargo after all!

most places having a motor running in s trailer when driving is illegal but i think this may get around it

<img src=" ... _21072.jpg" />

I have one of those tow bars that are made of a box section (square tube) and the tow bar tongue just slips into it and is held with a big pin. I was thinking that would make a good mount for the generator. Easy to attach and remove, Just need to add a bit of square tube to the generator.
I was thinking of using the normal single phase output from the generator into a socket similar to what is used on caravans for when they are plugged into a powered site. The socket would feed into the on board charger the same as if i was plugged in at home.
One thing i have been pondering was should i use a diesel or petrol generator? A 4 stroke petrol generator looks like the lighter option but the durability and weather resistant nature of diesels make sense as the generator will be exposed to the elements.
I would use the range extender probably twice a month so being able to attach and remove it easily is a big factor in the design.
Also electric start would be required as i don't want to be trying to pull start the generator like my car was a lawn mower Image

Low cost BMS

Posted: Wed, 15 Oct 2014, 03:30
by Astroboy
Finally finished enough cell top modules (53) to cover the number of cells going into the car (48). All built and tested.

Here's some pictures of the result. Not shown in the picture is the many sleepless nights, strained eyes and singed fingers. Image

I used a modified version of the cell top PCB. Another forum member, arber333 made many changes to the PCB for me. Mainly to suit the smaller terminal spacing on the 40Ah cells. But he also added a resistor and LED in parallel with the load resistors so that i can see when they are in use. Very handy. Image

I have 4 Winston 40Ah cells that i am using for testing. Another 44 cells will be added later. The communications connections between cells will be changed for shorter lengths later to make things neater.


I changed the LCD from the 2 line version to a 4 line version as there are some additions to the set up that i want to add later that will require more screen area.
I also changed the master modules micro controller to a 16F1847. This is a drop-in replacement for the 16F1827, but it has more memory which should increase the number of cell top modules it can keep track of.


As you can see the cells are quite out of balance due to testing each of the cell top module's load resistors. These cells will now be individually charged and brought back into balance. Cell 1 is the highest with 3.34v and cell 3 is the lowest with 3.28v.

Some more pictures.


I mounted the load resistors with a bit of air space between them and the PCB to allow for better heat dissipation.
If i built them again i would swap the two capacitors around so that the capacitor with the metal can wasn't so close to the load resistors.
I didn't put any pins in the programming port as i found it wasn't necessary, simply putting the programmers pins in the holes and keeping a small amount of sideways pressure gave good contact for the couple of seconds required to program the micro controller.
This saved me soldering 265 extra connections and it also reduces the chance of a stray communications connector coming into contact with a pin on the programming port.

Low cost BMS

Posted: Wed, 15 Oct 2014, 03:49
by arber333
Excellent work Astroboy!
I cant wait to see your LCD code improvements...

Have you come up with a current measuring module then?

Also my BMS works great and has saved my cells a number of times from my own stupidity :(... The last time i assembled one cell wrong and when i started to drive system went beserk. Of course, one cell went above 4V!!! I quickly disassembled and rebalanced the lone cell. Dodged the bullet there!

As a note to all; some time ago i tried this connector and it works very good with UTP cable pairs. Its already twisted wire, you only crimp connectors on.
Connectors are sturdier than pollolu but a little bulkier... ... 1c25000244 ... 2a3210b442 ... 27d8a49887

Low cost BMS

Posted: Wed, 15 Oct 2014, 16:07
by Nevilleh
Glad to see such good work!
I did build an ammeter using a Hall sensor and a spare master board modified to do it and wouldn't be that hard to make a new master pcb incorporating those additions. The 4 line LCD could display current as well as the other stuff. I also counted amp-hours and the 1847 should have plenty of memory to do the extra jobs.

Low cost BMS

Posted: Thu, 16 Oct 2014, 20:52
by Astroboy
I am looking at doing something like that.
A modified master board mounted near the battery pack doing Ah counting. It will connect into the comms line of the BMS. It would act just like the cell top modules. Waiting for a request from the actual master module asking for the Ah count and probably current amps. The actual master would then display a fuel gauge on the bottom row of the LCD. Just a line of squares with some solid and others just outlines. Eventually i would like to get the actual master module to output a PWM signal capable of driving the vehicles stock fuel gauge.
Seeing as the actual master module controls the charging of the batteries it should be able to adapt the fuel gauge Ah capacity to match the battery packs actual performance. So as the cells degrade over time the fuel gauge should still accurately predict 0% and 100% capacity.
I have the current sensor and several master boards that i can mess about with. It's just a matter of finding the time.   Image

Low cost BMS

Posted: Mon, 19 Jan 2015, 00:23
by arber333
Hi all!
My friend and i bought each a set of LiPo cells to put in our cars. He keeps them as primary movers but i use them as range supplement in parallel with my LiFe pack.
We messed about with voltage sensing ADC and came out with reliable software for use with LiPos. Those modules now go up to 4.5V and balancing starts at 4.15V.

LiPos voltage is so tough they doesnt move unless you apply substantial load to them. They are also very nearly spaced... 4R7 5W resistors are enough for eventual balancing though. It gets hot under the hood there - 61°C!!!

I will put the code here when i pack it together. Both modules have to have constants changed a bit, but it works... ... san-domet/

On the other note i managed to burn one of my modules trough my skin! Yes i happen to be removing the last module on + side and i creased the - wire (i just jumped) and comms didnt want to work anymore. i removed the module and the rest were fine. This kind of thing can happen when servicing a pack. So i will try to make one module with totaly separated output lines. Those modules will reside on output side of individual boxes. I just have to make some space for opto...

Low cost BMS

Posted: Wed, 21 Jan 2015, 05:55
by arber333

Can you advise me on sth? I have built another BMS system for my LiPo cells. It works fine and can protect cells while charging and regen etc...
However there is one limit onb theese cells - 270A max! While i use them normally on highway i burn 100 - 200A. But when i enter highway or climb hills at high speed amps can go to 500A. I cannot know exactly how much it draws from LiPos.
My idea is such:
1. Make a master module with LCD as per your design
2. prepare RA0 port (not used by LCD) which is ADC input, to sense voltage from LEM hall sensor output. LEM will require +5V and GND but that can be prepared from current +5V supply.
3. Program Pic16F1827 to measure Amps and report them to LCD display case 3... Also over 250A would trigger alarm LED and at 270A would throw main contactor (i got this covered with charger disconnect o/p)   

What do you think? Could all be done with the same BMS master unit?
Do you have a code example for hall amp sensing?


Low cost BMS

Posted: Tue, 10 Nov 2015, 04:59
by arber333
This topic hadnt had an update for some time.

Last couple of months i was thinking of designing a new concept BMS for my LiPos that are packed 8S. Well not one DIY BMS todate has ability to monitor 8S packs in one PCB. There is always a limit like 32V Vmax for controlling chip etc...
So i thought why not join Neville modules and make them 8S with 9 wire connection. That makes for a very simple assembly

I started first model PCB with full +/- connection. Mistake! After balancing when more and more modules started to balance cell value began to climb!!! I got 4.10V when highest cell was 4V! The best explanation was that current was seeping trough wires back and forth and creating residual voltage that showed itself on neighbouring cells.
When i saw that even those cells were balancing that werent trough balancing treshold initially, this confirmed my suspicion.

I need a new design.
New PCBs have default neighbouring connection that require only 9 wires. Certainly i can also connect only 6S or 4S cells.
I dont need resistors anymore. I use TIP122 darlington and i open it with weak base 10K. It can give 2A shunting there. Best thing about this is i can use car chassis as heasink. I just have to use good mica sheets to separate transistors from metal heatsink.
I also planned on using small 8A fuses just in case. However system is designed to monitor cells even if transistors burn out. I would get plenty of notice.

Also i designed new master board that has optical separation built in. There is also separate serial port connection that is allways transmitting.

I will post new build files later when i try the whole system, but with one 8S PCB working good i am optimistic.

Low cost BMS

Posted: Sat, 11 Jun 2016, 21:22
by Nevilleh
Had a query the other day about how the temperature is calculated in this and I thought maybe it might be of interest to some of those who have built this thing:

For the thermistor, Delta R = K Delta T over a small temperature range, ie its linear. The ADC reading is proportional to the thermistor resistance, R (and Delta R is the difference from R at 25 deg C) so (512 - ADC) is proportional to Delta R. Because I didn't want to send 10 bits, I divided ADC by 4 so it can only go from 0 to 255 -which makes the 25 deg C equivalent 128 instead of 512.
So the equation would have been (512 - ADC) = K( T-25) becomes (128 - (ADC/4)) = K(T-25) where K is a value that includes all the factors needed to convert voltage to resistance to ADC value.
Since the relation is linear only over a small range, I worked out several values for K to allow it to cover 0 to 60 deg C and used a lookup table to select the appropriate K value based on the ADC reading.
I might have the signs wrong in my brief explanation here as I didn't bother to worry about NTC but K will take care of it! I don't know how I got the K values, I suspect I worked them out from the resistance vs temperature specs of the thermistors, just by plugging known temp and R values into the above.
Pretty simple, huh?
Accurate to +- a degree or so, which is plenty good enough for prismatic cells.

Low cost BMS

Posted: Sat, 14 Jan 2017, 12:32
by arber333
Well i have persuaded friend Matjaz who is programmer to write me a simple program interface. It takes hex values from txt file and translates them in mV in CSV file with semicolon separator. That way excel just opens the file and you are making pretty graphs of your cell values.
Be sure that you put in correct file path.
Program also checks places between FF terminators and reserves places for columns. Result is instant data.

Also there are some constants that you dont need to change. Perhaps ADC. It defines LiPo or LiFe cell range. I have it set at 290 for LiPo but if you have LiFe you want it at 316 like Neville.

You can download it here: ... verter.pdf

It is a rar containing jar file and forums are not kind to such files. So i changed it to pdf

A Converter.pdf

Re: Low cost BMS

Posted: Sun, 19 May 2019, 07:56
by 4Springs
I've been working on this project again, making a version for home storage batteries. (see the other topic here:
In working on a new version, I've replaced the diode on the module board with a MOSFET. This means that the shunt current can be proportioned by pulsing the output.
I've developed new code for Master & Module that use this feature. After a cell gets to a certain voltage it starts to shunt just a little. Then it shunts more and more the higher the voltage goes, until it reaches a point where it is on 100% of the time. Actually it is not necessarily 100% - you can set a maximum percentage if you are afraid your resistors will get too hot (I have mine set to 50%).

I have tested this on the bench but not in the car. The main reason I made this change was to limit how hot the resistors get. Not sure if there are any other advantages, I sort of wonder if it would use less power, but I can't convince myself of this...

Latest source files are posted here:
As well as the proportional shunting, this version uses a different PIC processor. As discussed previously on this thread, the PIC16F1847 has the same footprint but twice the memory as the 1827.

Re: Low cost BMS

Posted: Fri, 30 Aug 2019, 05:52
by Dan007a
Very interesting read

Re: Low cost BMS

Posted: Sat, 11 Jan 2020, 00:22
by ev28wa
On first glance it looks a bit dangerous having the PCB's exposed, maybe you could apple a clear coating to seal them. I guess that might make it too expensive though.

Re: Low cost BMS

Posted: Sun, 12 Jan 2020, 09:54
by weber
Coulomb and I have had good success with Electrolube HPA conformal coating on our cell-top management units. It doesn't add much to the cost. ... %20coating

Re: Low cost BMS

Posted: Fri, 24 Jan 2020, 08:47
by macks
Hi 4Springs and all,

What resolution are you getting and what scan rate are you achieving?
How did you go with the 200mA bypass current?

Re: Low cost BMS

Posted: Sun, 26 Jan 2020, 03:55
by 4Springs
macks wrote: Fri, 24 Jan 2020, 08:47 How did you go with the 200mA bypass current?
200 mA bypass current is good for my setup. 130 AH LFP. It takes a few minutes (perhaps 10-30) to equalise each charge. The charger reduces current during this stage so it is not delivering much more than 200 mA
In the latest version I used 220 AH LFP cells in my home storage battery. I've added more resistors which increases the bypass current to about 500 mA max. I have two cells in parallel (16 in series), with one board per cell. This system is also staying nicely balanced.
I'm about to install these BMS boards on a new car pack, with one board per 315 AH NCM.

With a lowish bypass current it does take a long time to equalise the very first time. I'm inpatient, so I hurried the process along by charging individual cells with a bench-top power supply. For the car, this took a couple of days. For the home storage battery it took a couple of weeks (part time, I'd only charge while I was there to watch it).
macks wrote: Fri, 24 Jan 2020, 08:47 What resolution are you getting and what scan rate are you achieving?
Not sure what resolution you are after? The voltage is displayed as two decimal places, but I don't think the voltage readings are particularly accurate from the boards. The readings from two cells (and two boards) in parallel are not often the same. I haven't looked for the source of the discrepancy, since the system is fulfilling its role of keeping cells balanced (at least to within 99.99% capacity).
The fastest scan rate is probably a few dozen times per second. The maximum scan rate will decrease with more cells, as the data string gets one byte longer with each added celltop BMS board. I have no need for a fast scan rate, and so my software is not configured for it. For instance I'm using a slow baud rate and I have quite a few software delays. From memory I update the voltage six times and the temperature one time each cycle, which probably takes a couple of seconds.

Re: Low cost BMS

Posted: Sun, 26 Jan 2020, 06:11
by macks
Thank 4springs,

Because I started from the home storage where I have done a common multidrop buss and when I saw all these EV balancing systems using daisy chain i was concerned about the scan rate. When I do the multidrop network I used opto isolated at 1200 baud.
I presume daisy chain buss was selected to keep the wire length down, reducing noise pickup?
You are still using 9600 baud?

Your home battery is only 16 in series but the car batteries are typically much longer, mine will be 96 if Li or even higher if I go LTO.
I suppose breaking it up into smaller groups like Coulomb and Weber did is practical.
Obviously in house batteries you expect sub-second scan rate but I am more than happy with two second scan rate for voltage and even slower for temperature. I would prefer a faster alert for fault condition though.

It's interesting that the manufacturers (thinking of Nissan) have used wire looms and single boards.


Re: Low cost BMS

Posted: Sun, 26 Jan 2020, 09:00
by coulomb
macks wrote: Sun, 26 Jan 2020, 06:11 It's interesting that the manufacturers (thinking of Nissan) have used wire looms and single boards.
Mitsubishi in the iMiEV and I suspect also in the Outlander use an intermediate approach; a more or less cell-top PCB that connects to 4 cells. One chip services 8 cells (except in 2 cases where it covers only 4 cells). No long unfused many-stranded wire looms connected directly to cells, which I think is a safer design.

Re: Low cost BMS

Posted: Sun, 26 Jan 2020, 14:29
by weber
Hi Andrew. What do you mean when you say Coulomb and I break it up into smaller groups? Our BMS is strictly daisy chain, like 4Springs'. The only reason we have two strings of 109 CMUs in the MX-5 is that we have a separate charger for each half-pack.

We have a 15 Hz update rate. The rate is not affected by the number of cells. That only affects the latency, which is 1 ms per CMU. Each cmu either passes on the data or substitutes its own if this is worse. The data is a single byte containing a stress level derived from cell voltage, temperature and bolt voltages.

Re: Low cost BMS

Posted: Sun, 26 Jan 2020, 16:14
by macks
Hi Weber. It occurred to me after I posted that it's more of a latency issue. I had thought you broke the strings up for data throughput, thanks for the clarification. I'll look for your posts on your BMS and read up on it.

Re: Low cost BMS

Posted: Sun, 26 Jan 2020, 18:43
by 4Springs
macks wrote: Sun, 26 Jan 2020, 06:11 I presume daisy chain buss was selected to keep the wire length down, reducing noise pickup?
You are still using 9600 baud?
I copied the original design, so I didn't really choose.
But daisy chain suits my vehicle, which has three separate battery boxes. If I used a spaghetti BMS then I'd most likely not use all the inputs on the modules, since I only have 6 cells in two of the boxes. I also like the neatness of them, plus I have some spare cell top boards, so if one fails I just slot a replacement in.
Yes, 9600 baud. Could presumably go faster.
macks wrote: Sun, 26 Jan 2020, 06:11 Your home battery is only 16 in series but the car batteries are typically much longer, mine will be 96 if Li or even higher if I go LTO.
Indeed. Current car pack is 48 in series, new one is 40. There is a limit to the number of cell boards with the current software, since all Modules (and the Master) receive the entire string first before passing it on. This is to calculate the CRC, so the string is not passed on if the CRC fails. I think the limit is 60 Modules in a string, limited by the amount of memory space on the Module PIC.
A previous version of the software just passed the string through, and didn't check the CRC. This would make it quicker, and the only limit to the number of modules would be the Master memory. But the CRC would need to be checked in a different manner. Or the module could use a different version PIC.

Re: Low cost BMS

Posted: Mon, 27 Jan 2020, 10:10
by weber
Coulomb and I have packets with CRCs in our system too -- containing various commands and their responses. But every module still forwards every byte the instant it receives it. So the latency is only ever one byte-time per module. When the packet is complete, if the CRC doesn't match, the packet is ignored, otherwise it is executed (by a reverse-polish interpreter).

But the status bytes that carry the stress information on which the PI-control loop operates, are effectively in a different channel from the command and response packets, as they all have their high bit set, while the bytes making up command and response packets all have their high bit clear and are human-readable ASCII. Even the CRCs are a 12-bit value split between two printable ASCII characters. The particular 12-bit CRC polynomial is chosen to detect the maximum errors in very small packets.

So a status byte can be sent in the middle of a packet without affecting it. They do not have to be requested by a command. They are sent continuously at 15 Hz, initiated by any module that has not received such a byte for 700 ms or more. Usually that's only the first one in the chain, unless there's a break in the chain. And if the originating module is not the first in the chain (does not have an ID of 1) then it sets a bit to let us know.

There is no error-checking of the status bytes. At one stage they had a parity bit, but we decided it was better used for real information. Instead, the receiving (master) unit applies a low-pass filter function to the stress values, so a single corrupted value will have little effect. More detail on our protocol can be found here: ... tocol.docx (a Microsoft Word document)
More info in general, here (although the photo is out of date):

Re: Low cost BMS

Posted: Mon, 27 Jan 2020, 12:04
by T1 Terry
Just something to keep in mind when using balance boards for house battery packs, voltage has very little to do with actual SOC in any particular cell. I learnt this the hard way, something I already knew from yrs of doing this stuff but unfortunately it didn't trickle through to my system design level.

The case I'm referring to involves a 300Ah @ 48v house battery, 3p16s 100Ah Winston cells
Woodchester off grid 3.jpg
Woodchester off grid 3.jpg (54.84 KiB) Viewed 1445 times
The units on the wall are balancers that use induction coils to transfer over voltage to low voltage cells/batteries. Each can transfer up to 5 amps per pulse, so they can move quite a bit of current when required but are reliant on the voltage differential being enough to move that much current each pulse. The 4 units balance the 4 cells in each 12v battery and the 5th unit balances the 4 x 12v batteries.
The clear lid box is the system BMS and is powered by the first 4 cells. You would think the ability to move up to 5 amps and operating 24/7 would keep all 4 x 12v batteries balanced wouldn't you?
The problem is, voltage has nothing to do with SOC. The 4 batteries remained at close enough to the same voltage and all the cells remained very closely balanced .... until the first 4 cells were completely drained. The 5 amp transfer only occurs when there is a differential between the voltages, so it could keep the cells at maybe 5% SOC that was enough to keep the BMS running, but as soon as the load from the 2 x 5kW inverters hit, the voltage dropped to the point the BMS isolated the battery pack for its own protection. The balancers brought the low battery back up to the same voltage as the other 12 cell groups, but not to the same SOC.
Tricky to diagnose without logging the cell voltage activity on a 24/7 basis at 2 sec record intervals because the sudden cell voltage drop occurred for seconds, then there was no sign the voltage drop had ever occurred.

The takeaway is, balance boards will not ensure the SOC in each cell is the same, only the voltage. Balance boards will only be active at the end of charging when the cell voltage is at the run away point and that doesn't happen for very long with a house battery pack.
Balance boards really only work where the pack is returned to a 100% SOC each cycle, as in EV use, house batteries are generally recharged via solar and that is not available 24/7 so the trickle charging at the end to achieve the top end balance isn't practical, an alternative method of determining the SOC per cell group and balancing to achieve this outcome needs to be developed and as far as I can see, no one has developed such a system.

T1 Terry

Re: Low cost BMS

Posted: Mon, 27 Jan 2020, 13:04
by weber
Good point about these inductive charge-shuffling types of balancers, which seem to have become available recently at low cost. Somebody asked me about them recently. I pointed out that they would be worse than useless with LFP cells, for the reason you gave. But they might work OK with NMC cells (or other cobalt blends) since these don't have the voltage plateaus of LFP where voltage only tells you state of charge when you're above 98% or below 30%. If you have very accurate measurements, and the cells are rested, you can tell if an LFP is at about 75% because there's a little step up between two plateaus, one at 3.29 V and one at 3.33 V, but that's of little practical use.

I haven't had a problem with the standard switched-resistor balancers in off-grid solar power systems. You just have to ensure that the PV array is large enough relative to the load energy, to guarantee to take the battery to 100% on most non-overcast days. At least once a week.

Re: Low cost BMS

Posted: Mon, 27 Jan 2020, 14:52
by T1 Terry
The resistor type balancers work when the cell reaches X voltage and burns what ever value the resistors used can handle. That method relies on the charge current being reduced to less than the resistor burn off rate plus the load at the time ...... that would require accurate cell voltage monitoring to control the charge rate so the highest cell doesn't exceed the maximum safe voltage.
With that sort of charge current control, either type balancer would work fine and the inductive charge shuffle could actually move more current between cells, with no heat transfer into the cell, than the resistor type balance boards could handle.
I do have a number of the EV Works 5 amp resistor boards that I trialled to see if I could make an easy fit balancer for the bigger house battery packs, but the heat generated was incredible. The only way I could see these boards could be used without damaging the cells was using a heat exchanger and that further complicated the build, so I gave it a miss.
I have a fix for the problem in this system and maybe it will turn out to be the answer to the problem, only time will tell I guess.

T1 Terry