Low cost BMS

How do you store and manage your electricity?
Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Low cost BMS

Post by Nevilleh »

Just a brief update:
I have built, tested and installed all 45 cell modules now with them all wired up to the control unit and it does seem to work! Long wires everywhere and no interference from the motor control running with the wheels up in the air. Haven't quite got it all back together for a proper road test yet.

Took a while to get it to work as it died when I connected up the last cell module. At first I thought I had a faulty module, but that checked out OK. Turned out I made the classic C error of over-running the end of an array. Way back when I first started, I put the number of cells in as a constant and used this to dimension the data array. Later on, I decided an easy way to scan the array was to add an end marker and then look for it with a "while" statement, but - and you're all sniggering - I overlooked the fact that the array size needed to increase by one byte. So when I wrote to the array with the full number of cells, I went off the end and over-wrote some who-knows-what ram area and that had weird consequences. Anyway, all fixed now and passes all the tests I can think of. I have changed the cell number so you can insert any number you want up to about 200 or so, then it runs out of ram.

Thinking about the comms, I think that the data is "refreshed" every time it passes through a module ie the module receives it and then re-transmits it, so the ability to withstand interference is really very high as the data is sent only over a short wire to the next module which effectively cleans it up again. Except for the longish wires running from the front battery boxes to the rear one.

Once I've done a road test, I'll run the battery down as far as I can and then try bottom balancing. Watch this space!
User avatar
weber
Site Admin
Posts: 2936
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

Low cost BMS

Post by weber »

"C combines the flexibility and power of assembly language with the user-friendliness of ... assembly language." -- Anonymous
"C is not a high level language." -- Denis Ritchie (the creator of C, who died 3 weeks ago. May the good lord forgive him. Image )

Our comms is of course exactly the same as yours in regard to "refreshing" since all you changed was the processor (and dropped the differential drive), and yet we have comms corruption when the motor runs. It may yet turn out to be happening at a single faulty or marginally-operating unit. We can get back to investigating that now that the EV festival is over.

But your result gives us great hope that it will be easily fixed. Thanks.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Low cost BMS

Post by Nevilleh »

Yes, I know your setup is the same and also that you have experienced corruption with the motor running and I am a bit puzzled. That was partly why I was speculating about the "refresh" business. I'll have it all back together in a day or two and try it on the road. That'll determine how noise proof it all is.
You'd think differential drive (yours) would be better than single-ended (mine) wouldn't you?
Trouble with C is you think it is helping you.......
Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Low cost BMS

Post by Nevilleh »

Further update:
The bms has been running in my car for a week or two now and it doesn't suffer from any comms interference from the motor controller. It has glitched up once where the control unit went from displaying the correct battery and cell voltages to showing a total of only 38V with cell voltages of 2.7 and it stayed that way until I switched it off and then back on again. Seems to be a bug in the control unit software. Its only happened once and I haven't been able to cause it to occur again. Don't you just love software?!!!
It tells me that the lowest cell is some .1v below the highest one under load, but the difference is only about 50mV with no load.
I haven't had a go at balancing the cells yet because as Coulomb/Weber pointed out, to do bottom balancing requires you to run the battery right down before starting. I haven't implemented the s/w for top balancing as yet either.
The cell temperatures don't change much. All I've seen is a couple of degrees rise after an hour or so of driving, but that's just around town and no faster than 60 kph. Makes me wonder if its actually worth monitoring the temperatures, but the cost of doing so is very small, basically a 30 cent thermistor so it might as well be done.
This iteration has thermistors on long leads which I have pushed down next to and in contact with the negative terminals, but the next one uses smd thermistors which are right next to the big negative terminal pad, so that should provide better thermal contact.
All in all, I'm pretty happy with it.
Last edited by Nevilleh on Tue, 15 Nov 2011, 08:57, edited 1 time in total.
Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Low cost BMS

Post by Nevilleh »

Some bug in the controller software in that it will occasionally lock up showing nonsense numbers and I seem to be able to trigger it by full acceleration in the 70 - 90 kph range, so it is probably caused by motor noise. But the comms is still working and the watchdog doesn't reset it, so I have a bit of detective work yet to do. It's happened only a couple of times in the last week and that makes it even harder to track down.

I've been running the battery right down intending to do a bottom balance and last night I got one cell down to 2.8V which is what I am intending to balance them to, so I turned on the balancing act! The highest cell was still at 3.20V and after 9 hours of running the 1/2A load it was only down to 3.19V, so its going to take a while. I really didn't realise how far out of balance the cells have become. They are nominal 120 AHr cells although my discharge tests showed an actual capacity of about 138 AHr taking them down to 2.5V which I suppose is 100% discharge. 9 hrs at 1/2 amp means 4.5 AHr difference so far and it'll be interesting to see what the final total is. Could easily be 10% I suppose, so there could be another 18 hrs of balancing to go!!

I think I might do top balancing after this exercise. Weber and Coulomb will say "we told you so!" but there's nothing like finding out for yourself - is there?

BTW, the shunts don't get too hot at 3.2V, but might be a different story at 3.6V.
User avatar
Johny
Senior Member
Posts: 3749
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Low cost BMS

Post by Johny »

Nevilleh wrote: Some bug in the controller software in that it will occasionally lock up showing nonsense numbers and I seem to be able to trigger it by full acceleration in the 70 - 90 kph range,.....
That would be close to your peak battery current as well (and therefore pack droop). Are you measuring battery current? Maybe there is an error there?
BTW Great feedback - thanks - it's all helpful for those of us "nearly there".
User avatar
evric
Site Admin
Posts: 503
Joined: Sun, 20 Jul 2008, 01:57
Real Name: Eric
Location: Adelaide SA
Contact:

Low cost BMS

Post by evric »

Nevilleh wrote: ... and after 9 hours of running the 1/2A load it was only down to 3.19V, so its going to take a while. I really didn't realise how far out of balance the cells have become. .


Hi Neville,

Can I ask why your only using 1/2 Amp to reduce the cell voltage?

Eric
Prius Plug-in Conversion: http://www.evplus.com.au ...Holden Barina EV: http://www.evric.kestar.com.au
User avatar
Johny
Senior Member
Posts: 3749
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Low cost BMS

Post by Johny »

evric wrote:Hi Neville,

Can I ask why your only using 1/2 Amp to reduce the cell voltage?

Eric
I can answer that. It's because he has effectively a 6.8 Ohm bypass resistor for balancing built into his BMS cell boards.
Nevilleh wrote:......It uses a thermistor for temperature sensing and has a shunt capable of bypassing 1/2 amp for cell balancing, if required..
Image
....
User avatar
evric
Site Admin
Posts: 503
Joined: Sun, 20 Jul 2008, 01:57
Real Name: Eric
Location: Adelaide SA
Contact:

Low cost BMS

Post by evric »

If you can get to the individual cell, why not temporarily clip a larger load across that cell to speed things up?
Prius Plug-in Conversion: http://www.evplus.com.au ...Holden Barina EV: http://www.evric.kestar.com.au
Tritium_James
Senior Member
Posts: 683
Joined: Wed, 04 Mar 2009, 17:15
Real Name: James Kennedy
Contact:

Low cost BMS

Post by Tritium_James »

Because he's bottom balancing, you'd need to clip a larger load on everything *except* the lowest cell.
User avatar
evric
Site Admin
Posts: 503
Joined: Sun, 20 Jul 2008, 01:57
Real Name: Eric
Location: Adelaide SA
Contact:

Low cost BMS

Post by evric »

OK - Understood
Prius Plug-in Conversion: http://www.evplus.com.au ...Holden Barina EV: http://www.evric.kestar.com.au
Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Low cost BMS

Post by Nevilleh »

Yes, there could be a clue there, as you say that must be pretty much peak current and you have made me realise that the problem has only occurred since I have been running the battery right down to have a go at bottom balancing. I didn't notice the current, too busy watching the bms and trying to drive as well! When I've done balancing - its still going - I'll charge it up and then see if the problem occurs with a full battery.
Edit: just read all those extra posts that weren't there when I wrote the above reply to Johny! The 1/2 A shunt current was about the most that I could pass without generating too much heat. The boards are bolted to the cell tops after all and I didn't want to heat things up too much. Also wanted to use smd power resistors - I suppose I could have used a few more as they only seem to make them up to 1 watt dissipation.
I theorised that if the cells were fairly balanced anyway, then the 1/2A wouldn't have to run for too long.
I've looked at the charge/discharge curves and there is a lot more energy to get rid of to take a cell from 3.2V down to 2.8V than is the case for going from 3.4V up to 3.6V, so top balancing would be a lot quicker as well as being less wasteful. But I am hopeful that once I have balanced the cells for the first time, next time will be much faster.
Last edited by Nevilleh on Thu, 17 Nov 2011, 08:03, edited 1 time in total.
User avatar
weber
Site Admin
Posts: 2936
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

Low cost BMS

Post by weber »

Neville, BTW, I'll get no pleasure from saying "I told you so" if the middle cells in your buddy-triples start to fail long before the others. Are you not worried about this?

For others who may not know what I'm on about. The theory, as I understand it, says you should connect each triple to its neghbours and to the outside world by diagonally opposite corners. The way Neville has them, under heavy loads the middle one will supply more current than the other two. The positive feedback due to increased temperature may cause lower internal resitance, and tend to make this get worse if the heavy load continues or is repeated in a short time.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Low cost BMS

Post by Nevilleh »

That's the theory all right. I originally had them connected with diagonally opposite corners, going back right to the beginning - BH, nearly 2 years ago! - and someone convinced me that wasn't a good idea and I should connect them centre-to-centre. I might yet go back and change them, its not too hard to do with only 45 cells (ha, ha!).
One argument I saw said that the internal resistance of the middle cell would increase somewhat over time as it was working harder and that increase would then force the other two to work harder and so it would all balance out!

Did I read somewhere on here where someone questioned whether 10mV accuracy for setting the balance point was enough? Can't find the actual post, but the bms works in millivolts with a resolution of approx 4 at the low end and 12 at the top (2.2V to 4.0V). I choose to display only 2 decimal places because I can't see the need for more. The balancing voltage I have chosen is actually 2.801 and the resolution at this voltage is 6mV, so the cells should be balanced to within 12 mV of each other, worst case. Whether that's good enough, I don't know, but the discharge curve is pretty steep there so a 1mV change doesn't mean much change in capacity. The resolution of the published curves is not good enough to make a guess. Also, the cell manufacturers only quote voltages to two decimal places ie 10mV, so I think it is going to be OK. If the things are that sensitive, it makes them pretty hard to use!

The balancing is still going on, 33 hours now and the high cell has come down to 3.00 V. I'm not sure how many shunts are still on, although the bms knows, but I haven't thought to add s/w to display that number. Might be a handy addition.
Going around with my finger and testing for hot shunts shows that only about 12 out of 45 are still on. So it is working!

Edit: In case anyone is wondering about the varying resolution, this is an extract from my document explaining how it all works:

Compression of the cell voltage:

The ADC in the 12F1822 is 10 bits wide and would require two bytes to be sent “as is”. However, by reducing the cell voltage range somewhat, it can be sent as a single byte.
The ADC input is taken from an LM385 reference diode at 1.235V and the supply (cell) voltage is used as the reference (Vcell). Thus the ADC count is given by ADC = ( 1.235*1023)/Vcell and the bytes representing voltage are inversely proportional to the actual voltage values.
3.99V gives an ADC count of 316 and 2.21V gives a count of 571. If 316 is subtracted from each of these values, they become 0 and 255 respectively, ie 0 represents 3.99V and 255 represents 2.21V. To turn these numbers back into voltages, the master adds 316 and then Vcell = (1235 * 1023)/ADC , the result being in millivolts. It should be noted that this scheme gives a resolution of approximately 12 mV at 3.99V and approximately 4 mV at 2.21V
The ADC in the 12F1822 takes an average value of four samples to provide some noise reduction and any value larger than 0xFE is forced to 0xFE to allow 0xFF to be the string terminator.



Last edited by Nevilleh on Fri, 18 Nov 2011, 01:06, edited 1 time in total.
User avatar
weber
Site Admin
Posts: 2936
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

Low cost BMS

Post by weber »

Nevilleh wrote: That's the theory all right. I originally had them connected with diagonally opposite corners, going back right to the beginning - BH, nearly 2 years ago! - and someone convinced me that wasn't a good idea and I should connect them centre-to-centre.

Hmm. I just got a bad feeling. I hope it wasn't a misinterpretation of this post of mine
viewtopic.php?t=900&p=19870#p19870
which contains this graphic.

Image

It was posted about two years ago.

When I revisited it just now I found that the AEVA server had truncated the bottom of the graphic, so the the words "Best you can do ..." were chopped off. It had done this to a lot of my GIFs, which I have now re-uploaded.

Although 3 cells still don't share perfectly with the diagonal connection, this is way better than any other way of connecting to them. I've just added this message to the original post. Sorry for any confusion.

But now that I look at this slightly earlier thread
viewtopic.php?p=19544&t=1446#p19544
it looks like CroDriver may be the culprit. He suggested connecting to the middle cells. At the time I assumed he was talking about mechanical "stress" and "load", but in hindsight I can see he may well have been talking about current. Connecting to the middle cells is better than the way you had them, which was only diagonal in a few cases. But both Woody and I suggested the fully diagonal connection, which is better again. I even doctored a photo to show how easy it would be to change.

Image
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
User avatar
weber
Site Admin
Posts: 2936
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

Low cost BMS

Post by weber »

I think your voltage measurement resolution is (just) good enough.

Regarding the bottom balancing. I can't say "I told you so" yet. The first balance always takes a long time, whether it's top or bottom. I encourage you to give bottom balancing a fair go. Now that you've come this far I suggest you go through at least 3 cycles of it before you give up and start top balancing. i.e. when you recharge, stop charging when the first cell hits 3.6 V (or whatever voltage you're using).
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
User avatar
Johny
Senior Member
Posts: 3749
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Low cost BMS

Post by Johny »

In fairness to Neville's connection layout. The copper strips are quite meaty and given the sag you get in Primatic cells under lots of load I would not expect the voltage drop across his connections to be significant as compared to the cells. That said, the diagonal layout makes more sense for cell sharing and the BMSs could be moved to the centres. You have plenty of time to fiddle with this don't you Neville? Image

Edit: Added some kind of indicator as to sarcasm in last sentence.
Last edited by Johny on Fri, 18 Nov 2011, 05:49, edited 1 time in total.
User avatar
evric
Site Admin
Posts: 503
Joined: Sun, 20 Jul 2008, 01:57
Real Name: Eric
Location: Adelaide SA
Contact:

Low cost BMS

Post by evric »

Johny wrote: In fairness to Neville's copnnection layout. The copper strips are quite meaty and given the sag you get in Primatic cells under lots of load I would not expect the voltage drop across his connections to be significant as compared to the cells. That said, the diagonal layout makes more sense for cell sharing and the BMSs could be moved to the centres. You have plenty of time to fiddle with this don't you Neville? Image
significant or insignificant
Prius Plug-in Conversion: http://www.evplus.com.au ...Holden Barina EV: http://www.evric.kestar.com.au
User avatar
Johny
Senior Member
Posts: 3749
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Low cost BMS

Post by Johny »

evric wrote:
Johny wrote: In fairness to Neville's connection layout. The copper strips are quite meaty and given the sag you get in Primatic cells under lots of load I would not expect the voltage drop across his connections to be significant as compared to the cells. That said, the diagonal layout makes more sense for cell sharing and the BMSs could be moved to the centres. You have plenty of time to fiddle with this don't you Neville? Image
significant or insignificant
I don't think his connection layouts matter very much because they are BIG and heavy and the cells have high(ish) internal resistance in comparison.

Edit: spallin'
Last edited by Johny on Fri, 18 Nov 2011, 05:50, edited 1 time in total.
User avatar
weber
Site Admin
Posts: 2936
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

Low cost BMS

Post by weber »

Nevilleh wrote:Going around with my finger and testing for hot shunts shows that only about 12 out of 45 are still on. So it is working!
I'm sure that slight inconvenience was well worth the $4.50 you saved by not putting LEDs on. Image
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Tritium_James
Senior Member
Posts: 683
Joined: Wed, 04 Mar 2009, 17:15
Real Name: James Kennedy
Contact:

Low cost BMS

Post by Tritium_James »

Weber, maybe I'm missing something but I don't see why the middle cell in your group of three in your gif is going to end up with less current in it. The left cell sees the resistance of two negative busbar connections, the middle cell sees a positive busbar and a negative busbar, the right cell sees two positive busbars. They're all the same!

User avatar
Johny
Senior Member
Posts: 3749
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Low cost BMS

Post by Johny »

Good point TJ. If you extrapolate it to a large number of cells then all cells see the same overall connection resistance.
User avatar
weber
Site Admin
Posts: 2936
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

Low cost BMS

Post by weber »

Tritium_James wrote: Weber, maybe I'm missing something but I don't see why the middle cell in your group of three in your gif is going to end up with less current in it. The left cell sees the resistance of two negative busbar connections, the middle cell sees a positive busbar and a negative busbar, the right cell sees two positive busbars. They're all the same!

What everyone misses, including myself before it was pointed out to me by Pascal, is that the upper left and lower right straps (between cells) are carrying approximately twice the current of the other two. Therefore they have approximately twice the voltage drop.

If you do some voltage numbers you'll see that this leads to the two outside cells working harder than the middle one. But at least the magnitude of the effect is only half as much as it is when you connect across the middle cell (where the middle cell works harder than the other two).

And of course this generalises to more than 3 cells. Only 2 cells give theoretical perfect sharing. But diagonal is the best you can do. To make it theoretically perfect with 3 you need double straps on the top-left and bottom-right, which probably isn't practical.

But I note that one should really model the resistance of the joints as well as the straps and so take account of the vertical dimension of strap stacking too. That's what I did crudely, to obtain my recommended stacking, as indicated in the drawing.

BTW, I doctored the above photo to show the ideal strap position, not merely to add yellow elipses. i.e. I used MS Paint to move straps and non-straps around. Apparently I did too good a job, as Coulomb for one, assumed that's where they already were and wondered why I was indicating that they needed to move from there. I was not. The yellow elipses were just to show which ones I had moved (remotely, at Neville's place, by magic).

This layout originally did not require extra long bolts as there is no terminal with more than 2 straps. But the BMUs will need to go on the middle cells as they would otherwise have a different number of straps under each end and be subject to strong bending forces. At least it will be a symmetrical arrangement and more pleasing to the eye.

[Edit: Corrected spelling and added "(remotely, at Neville's place, by magic)."]
Last edited by weber on Fri, 18 Nov 2011, 07:21, edited 1 time in total.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).
Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Low cost BMS

Post by Nevilleh »

weber wrote:
Nevilleh wrote:Going around with my finger and testing for hot shunts shows that only about 12 out of 45 are still on. So it is working!
I'm sure that slight inconvenience was well worth the $4.50 you saved by not putting LEDs on. Image
Hey, come on, I would've needed a series resistor as well as the led and that would've been HEAPS more than $4.50!
I must admit that when I was testing it, I stuck a series resistor and a led across each shunt so I could see what was on and what was off and I thought "b----er, should've been part of the design." Might add them to the next iteration. Although, once testing and development is finished - about 2020 - they shouldn't really be needed.

I like all the discussion about where the straps should go and my original picture (before your PaintShop one) was not complete, I had just started to put the cells into the first box and was thinking about the diagonal strapping.
I'll leave it on the centres for now and maybe change it to the ends a bit later - that'll even them all up again!

The car has still done about 2600 kms with only a partial bms and straps in the middle and nothing has melted/burnt/disintegrated yet.

Interestingly enough, the 8 cells that I had my old bms attached to all stopped shunting a while ago!
User avatar
Johny
Senior Member
Posts: 3749
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Low cost BMS

Post by Johny »

If you swap to a 16 x 4 line display you could show a block for each cell still shunting with the last line as text. 15 cells per line would make it easy to see which ones were which. I think I use character 0xFF for a block in the Vogue SOC display.
Image
Post Reply