Low cost BMS

How do you store and manage your electricity?
Astroboy
Groupie
Posts: 53
Joined: Mon, 13 Jan 2014, 06:33
Real Name: Jase
Location: Melbourne, Au

Low cost BMS

Post by Astroboy »

Nevilleh wrote: Ah well, you must've read this:
viewtopic.php?title=wanted-an-amp-hour-meter&t=3368
Send me a PM and I'll send you all the details so you can make your own. And develop it into something new.

Wow, i actually hadn't seen that thread.
Now i feel like half the work is already done.   Image

There was a lot of dicussion on that thread about voltage isolation between traction battery and the rest of the vehicles electrics/chassis.
Using a modified celltop module (with hall sensor connector) in place of a standard celltop module will get rid of all the issues with voltage isolation.

Also i read Arber333's comment that you had made the RA0 pin available. If only we could free up enough pins (4) to implement a SPI interface to allow interfacing to a SD memory card. This would allow logging of all data and easy transport of the data to a PC for analysis.
arber333
Groupie
Posts: 56
Joined: Mon, 11 Mar 2013, 02:29
Real Name: Arber
Location: Slovenia
Contact:

Low cost BMS

Post by arber333 »

Huh that is not a bad idea actually. LEM would be mounted on a side PCB powered by 12V. Optocouplers would be used to output signal to cell comms for isolation. You could also use a boost converter to fully supply 5VDC from one cell. Only i dont know how much it drains. You dont want that cell unbalanced!
Software would have to be accurate to 1A though. Should be signal at least two byte in length with identifier.

You could hook it up in series with cell modules. That would have PIC12F the code and all but would only repeat other cell voltages/temp. It would code and put LEM value in the comm string using identifier. Master would read and interpret it as a value separately from voltage array.
I bet master code wouldnt be that much longer and comms time also.
SOC would be displayed in the same master LCD together with Amps. You would just have to tell what is the cell value first.
Reset could be a small signal relay triggered from charger shutoff function of BMS or manually.

How about it?

EDIT @Astro:
Well you could make Arduino micro SD module (could do it with PIC12F also) that would store to SD card. Its just you have to change array to ascii, decode it to mV and separate it by comma to be read as .csv. Hm shouldnt be a problem for you, but i am still learning programming in C.

A
Last edited by arber333 on Tue, 01 Jul 2014, 17:19, edited 1 time in total.
User avatar
4Springs
Site Admin
Posts: 926
Joined: Thu, 23 Dec 2010, 01:14
Real Name: Christopher Walkden
Location: Selbourne, TAS

Low cost BMS

Post by 4Springs »

Astroboy wrote:
The charger indicator will be handy. However it indicates current limited (1) when powering up in a comms fail situation. I would have expected the charger to be off (2) when comms has failed.
When comms fails whilst master is already powered up the charger remains at unlimited (0), i would have expected it to move to off (2) for that as well.

Thanks for that quick-fire testing! This is (mostly) intended behavior.
Only fault codes of 4 and up result in the charger being disabled. I don't want a simple comms fault to disable the charger. You may want to change this behavior depending on your charger, but I trust mine to turn itself off when the pack is fully charged.

By the way I did have a comms failure "in the wild" a week or so ago. I don't have the display in the cabin with me, just the fault LED, so I rely on that to let me know if anything is (or has been) wrong. The only indication that there was a problem was that my fuel gauge was not showing full when I started on a trip. The car had been on the charger all night so I expected it to be full, but it looked as if it had not charged since the trip the day before.

This turned out to be two problems, one masking the other.
I opened the bonnet and saw that the Master was reporting a comms fault "2" from cell 5. I opened that battery box and wiggled the comms cable and it came right. Later on I had a closer look and I think I had a bit of circuit board lacquer on the terminals. I didn't know about this because of another problem - a bug where the LED was not lit for a comms fault. I fixed this bug once I figured out what had happened.
So the second problem masked the first problem.

Why did the charger not charge when I have previously stated that a level 2 fault will not turn off the charger? Well I have a theory about that! I'm guessing that the comms fault occurred when the pack was fully charged. The last the Master heard from the pack was that the voltage was high, and so it kept the charger turned off. Without any further data it just used the last good voltage values. It never saw the pack voltage decrease during the drive home. I should have been informed of the comms fault via the LED during the drive home, but that bug prevented that...
Astroboy
Groupie
Posts: 53
Joined: Mon, 13 Jan 2014, 06:33
Real Name: Jase
Location: Melbourne, Au

Low cost BMS

Post by Astroboy »

arber333 wrote: Huh that is not a bad idea actually. LEM would be mounted on a side PCB powered by 12V. Optocouplers would be used to output signal to cell comms for isolation. You could also use a boost converter to fully supply 5VDC from one cell. Only i dont know how much it drains. You dont want that cell unbalanced!
Software would have to be accurate to 1A though. Should be signal at least two byte in length with identifier.

In Nevilleh's thread about building a charge count device he mentions using the Tamura sensor (Datasheet) which only uses - gnd, +5 and signal.
Image
I was thinking of putting the battery packs positive cable through it and using cable ties to secure it from sliding up or down the cable then just a 3 wire fly lead from the device to the nearest cell which would have the combination celltop module rather than the standard celltop module.
Datasheet says the current draw of the device is 15mA, should be able to work out a method of turning this current draw off when current measurement isn't required (when not driving or charging) to reduce any cell imbalance.
Might order one and see what hapens when running off of 3 volts. The datasheet says 5v but that may be just to maintain the 0-5v output signal.
Even if it does need 5v then a small dc-dc converter for 15mA shouldn't be too hard to find.
The sensor series has different versions with different current ratings right up to 600A.
arber333 wrote: You could hook it up in series with cell modules. That would have PIC12F the code and all but would only repeat other cell voltages/temp. It would code and put LEM value in the comm string using identifier. Master would read and interpret it as a value separately from voltage array.
I bet master code wouldnt be that much longer and comms time also.
SOC would be displayed in the same master LCD together with Amps. You would just have to tell what is the cell value first.
Reset could be a small signal relay triggered from charger shutoff function of BMS or manually.

I was thinking of a celltop module that does the normal voltage and temperature measuring but also interfaces to the hall effect device so it can also measure the current. So all communication (including SOC resets) would be over the existing BMS comms link.
arber333 wrote: EDIT @Astro:
Well you could make Arduino micro SD module (could do it with PIC12F also) that would store to SD card. Its just you have to change array to ascii, decode it to mV and separate it by comma to be read as .csv. Hm shouldnt be a problem for you, but i am still learning programming in C.

A

I also am learning C, my programming background is web applications so PHP, HTML and javascript. C is almost simple enough to just read and understand... almost. Will take me a little while to understand all the syntax. I can read 4springs code and understand it (with some googling) but would i have been able to do it from scratch, no.
Astroboy
Groupie
Posts: 53
Joined: Mon, 13 Jan 2014, 06:33
Real Name: Jase
Location: Melbourne, Au

Low cost BMS

Post by Astroboy »

4Springs wrote:
...
By the way I did have a comms failure "in the wild" a week or so ago. I don't have the display in the cabin with me, just the fault LED, so I rely on that to let me know if anything is (or has been) wrong. The only indication that there was a problem was that my fuel gauge was not showing full when I started on a trip. The car had been on the charger all night so I expected it to be full, but it looked as if it had not charged since the trip the day before.
...
Lucky you had that secondary indicator of the battery status (fuel gauge). If not and you had driven off thinking you had a full battery and the BMS in comms fail and showing no LED indication... well it may have been a very expensive trip.
arber333
Groupie
Posts: 56
Joined: Mon, 11 Mar 2013, 02:29
Real Name: Arber
Location: Slovenia
Contact:

Low cost BMS

Post by arber333 »

Astroboy wrote: I was thinking of a celltop module that does the normal voltage and temperature measuring but also interfaces to the hall effect device so it can also measure the current. So all communication (including SOC resets) would be over the existing BMS comms link.


As i said i dont think normal module will be enough for current measuring. Its ports are full even though programm is very short.

I still suggest identical module that would serve as repeater of cell values and add current value in brackets or some other markers.
That way you could hook this module to any cell inline and power it from 3V.
Hm 15mA ia a lot if you consider the car staying off during the week. I would suggest powering this module trough a small relay that would come on only at the presence of 12V inside the car.
Than again what is wrong with taking 12V and making DCDC 5V isolated. That way no cells are subject to drain and you are isolated from main pack.

You could also tell master to just put 0A in case it doesnt get signal from LEM.

A

    
User avatar
4Springs
Site Admin
Posts: 926
Joined: Thu, 23 Dec 2010, 01:14
Real Name: Christopher Walkden
Location: Selbourne, TAS

Low cost BMS

Post by 4Springs »

Why not modify a Master board for the SOC module? Use it like a module but run it from 12V. The module code would need very little modification to run on a Master board. This would give you heaps of i/o ports!
Astroboy
Groupie
Posts: 53
Joined: Mon, 13 Jan 2014, 06:33
Real Name: Jase
Location: Melbourne, Au

Low cost BMS

Post by Astroboy »

@4springs I was just about to post a long winded reply (really, me?) when i re-read you comments and realised i misunderstood. I thought you were saying use the existing master module but you were saying use an additional/spare master board as the basis for the SOC sensor module. I would not have thought of that. (Love the forums, so much knowledge and helpful ideas)
The BMS comms opto's would provide the isolation between the 12v system and the traction battery so removing concerns over isolation.
Running it on the 12v system would avoid the cell imbalance issue that Arber333 mentioned.
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 »

I must say I'm enjoying reading this thread! Almost moved to do another car conversion.
The SD card might be a good idea, but not so easy to find enough port pins. There is the RS232 o/p pin and maybe the ISP pins could do with a re-look. The thing has I2C and SPI as well, but I'm not sure what the pins are used for now - probably LCD.
However, my data logger was my netbook computer which could store a lot more than an SD card. I simply plugged it in to the RS232 ouput and stored data for several quite long drives. Once you have it in the computer, you can do whatever you want with it. I used a terminal program to save the data. (Bray's Terminal) I converted it into a .csv format and then used Excel to draw pretty graphs.
BTW the PIC16F1847 is the same as the PIC16F1827 except for having twice as much memory, so you could just drop one in.
A cell module could be adapted to measure current, but I doubt the Hall sensor would run off the cell voltage. But a 3.2 v to 5 v converter could be used. You could do away with the thermistor and the LM385 and use the input for the Hall sensor - you would still need to add the op-amp level shifter.
Alternatively, use a modified master board as someone suggested. Whichever, it still needs a new pcb design.
Perhaps the AH meter I described in that other thread could more easily be modified to add comms to it so it could be connected up as if it were a cell module. Its serial port pins aren't used, so you'd only need to add the opto-coupler and pull-up resistor which could just about be stuck on the pcb somewhere. Certainly that board would be the easiest to modify. And the s/w changes would be pretty simple.
User avatar
4Springs
Site Admin
Posts: 926
Joined: Thu, 23 Dec 2010, 01:14
Real Name: Christopher Walkden
Location: Selbourne, TAS

Low cost BMS

Post by 4Springs »

Mmm, yes, I must say that after I wrote the suggestion to use a Master board for the SOC module I went and read that previous thread and found that Nevilleh had already made one! It wouldn't be hard to add comms to his existing design and turn it into a "module". If you wanted to you could even use that board to drive a separate display to the main BMS one.
This new design would have the advantage (over Nevilleh's original AH meter) that it could read the total pack voltage, thus making the SOC calculation more accurate. I use Zeva's fuel gauge driver and it "goes faster" when you get toward the bottom end of your battery capacity - especially with lead-acid. What I mean is since it only measures current drawn, when the pack voltage is lower the needle on the gauge moves faster since the current use is higher for the same motor power. If you could measure voltage and factor it in then you could make a more accurate gauge. I like Astro's point about the automatic high and low calibrations - easier than Zeva's gauge where you have to open the box and adjust pots (sorry Zeva, it looks like I'm bagging your product!).

Like Nevilleh I use a laptop in the car when I want to log data. The BMS is normally a hands-off thing so you only want to log data occasionally (indeed many of the features of the BMS are mostly used when you are first getting to know your battery pack). My version of the software sends out voltage data every 3 seconds or so, unless you hold in the reset button and then it changes to temperatures for a minute. I like the idea that Arber had to hook this into a bluetooth sender. Then I could run an app on my phone to log data.
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 »

The AH meter I built was designed to complement the bms and so it has its own lcd. I had room in my car to mount the two displays, one above the other, so I could see battery voltage, motor current and remaining battery capacity all at once without having to push any buttons, just a quick glance down at the instruments. When I connected up the old tacho and fuel gauge as ammeter and remaining battery capacity that meant I hardly ever looked at the lcds, just the dash instruments! So there was never a need to connect the AH meter to the bms comms. KISS.
Also, I never found any high temperatures in the battery cells, the highest ever seen was 46 deg C on a fairly warm day (we do get those in NZ now and again!), so I never bothered looking at temp much and didn't log that data, just the cell voltages. A 3 second poll rate for the data logger is a bit long to catch big transients when accelerating hard, although perfectly adequate for cruising-type driving.
BTW, the battery capacity is hard-coded into the AH meter and the more accurate you can make that the better. I measured my cells at 134 AH for 100% discharge, so I set the capacity at 100 AH being a 75% discharge. That gave me a small margin if I ever let the fuel gauge get down to empty, ie I still had a possible 30 or so AH left to get me home and I did need that on the odd occasion. Most of my driving was in 50 -70 kph speed limit zones, but now and again I would go on a motorway at 100 kph and I found the range dropped quite a lot at those speeds. At city speeds, I used around 126 watt-hours per km going up to 165 or so at motorway speeds. The BMW E30 is not exactly aerodynamic!
I found AH to be more useful than watt-hours as it didn't need to include the battery voltage, even though the current increases as the voltage drops as 4springs points out. But it is AH that the battery worries about most.
Last edited by Nevilleh on Fri, 04 Jul 2014, 04:31, edited 1 time in total.
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:I found AH to be more useful than watt-hours as it didn't need to include the battery voltage, even though the current increases as the voltage drops as 4springs points out. But it is AH that the battery worries about most.
I'll second that. While watt hours is interesting the cells actually deal in AH in and out.
Astroboy
Groupie
Posts: 53
Joined: Mon, 13 Jan 2014, 06:33
Real Name: Jase
Location: Melbourne, Au

Low cost BMS

Post by Astroboy »

Couple of things.

Firstly the sample 16F1847 chips i requested from Microchip arrived and one was used in yet another master module. (have built 3 now) And the chip is indeed a drop in replacement for the 16F1827.
It even runs the hex file that was compiled for the 16F1827 without issue.
So all the registers and config bits must be identical.

Secondly, made some very minor changes to 4Springs code.
Moved the "Comms error" from displayMode 4 to display mode 9 to give some room for additional DisplayModes to be added to the ones Switch 1 rotates through.
I added a "Version" DisplayMode (DisplayMode 4) so that i know what version of code is loaded.
Also i moved the initLCD() from being called when TXVal reached 8 to being included in the IF statement that handles switch 1 presses.
This allows the display to be initialised if required by simply toggling the display mode using switch 1.
I was getting a slight flicker in the display before moving the initLCD() function call.

@4Springs I will PM you the modified main.c so you can see if you want to integrate the changes into your latest code and post it on the web page you setup.

Astroboy
Groupie
Posts: 53
Joined: Mon, 13 Jan 2014, 06:33
Real Name: Jase
Location: Melbourne, Au

Low cost BMS

Post by Astroboy »

Nevilleh wrote: I must say I'm enjoying reading this thread! Almost moved to do another car conversion.

So which car would you do this time?
Something you already have or something bought specifically to convert?
arber333
Groupie
Posts: 56
Joined: Mon, 11 Mar 2013, 02:29
Real Name: Arber
Location: Slovenia
Contact:

Low cost BMS

Post by arber333 »

Heh

I would choose a larger comfortable car this time. With A/C, warmed seats, sunroof and servo steering. I am eying BMW 520 or 325. Also i would eliminate transmission, since it takes cca 3kw of power just to turn wheels!
Cells i would make the Tesla way, out of panasonic 18650 cells. I got a good offer for 3200 cells that would give 34kWh pack. That should be enough...

A
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 »

I'm not sure what car I would use, but it would be something fairly new, as light as I can find and rear wheel drive with no transmission (except diff) much as I did with the BMW. But I'd use an ac motor, perhaps something like an AFM 140 or even the new EMRAX 268 with probably a Tritium controller. I'd love to be able to get Boston Power cells - I could build a 40 kwh battery weighing around 250 kg! They have a power density of 204 wh/kg but the company won't talk to me, only interested in OEMs.
However, my new love is flying gyroplanes and I looked at converting one of those to electric power, but the battery weight is still too high. The power density needs to get to better than 500 wh/kg before that would be practical.
Motors and electronics are certainly there to do the job, batteries NOT! Maybe a hydrogen fuel cell might be the answer.
arber333
Groupie
Posts: 56
Joined: Mon, 11 Mar 2013, 02:29
Real Name: Arber
Location: Slovenia
Contact:

Low cost BMS

Post by arber333 »

Ouch!

Neville, i am aviation engineer as well as glider pilot... I spent my share of time at gyros though and have to disappoint you. They are exellent DIY machines and very safe providing you use them for what they are made - recreation flying. However i dont believe you could convert one to electric and enjoy it very much. The things are gas guzzlers and with batteries you can carry and the power required to take off would leave maybe 10min of air time....

I tried electric glider that is much more effecient ans still after takeoff and climb to 800m you are left with cca 15min of powered time. Its different here though, at that height once you find a thermal you dont need power anymore :).

I also am planning to use Romans motor. But i will use first single 228 motor to BMW driveshaft with 300V controller. Later if i find the power too low i can add another phase-locked motor. Not likely though...

Since it would be family car as well i am thinking of giving it a genset up to 15kW to extend my range beyond everyday driving. That way i could use it as primary car for trips also... I am still deciding if it would go iside car or in the trailer.

A
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 »

You haven't disappointed me, I already calculated that it is not practical with current battery technology - no pun intended!
The thing uses 80 kw for take-off for about 3 - 5 minutes and then needs about 48 kw to cruise at 160 kph. With Boston Power batteries, I can get about 40 kwh of storage and just get under the mtow limit with a payload of one passenger and that gives me take-off and flying time of about 30 mins. Pretty useless! If I could get over an hour, it would be feasible, but roll on 500 wh/kg cells.
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 »

arber333 wrote:Since it would be family car as well i am thinking of giving it a genset up to 15kW to extend my range beyond everyday driving. That way i could use it as primary car for trips also... I am still deciding if it would go iside car or in the trailer.
It's surprizing how many folk consider a genset in the early days of thinking about an EV conversion (me too) then don't go ahead with it. I'm not saying you haven't thought about it so I could be quite wrong but...

A 15kW genset would require either it interfaced directly to the controller or battery pack, or that you also had a 15kW charger on board.
arber333
Groupie
Posts: 56
Joined: Mon, 11 Mar 2013, 02:29
Real Name: Arber
Location: Slovenia
Contact:

Low cost BMS

Post by arber333 »

Johny wrote:It's surprizing how many folk consider a genset in the early days of thinking about an EV conversion (me too) then don't go ahead with it. I'm not saying you haven't thought about it so I could be quite wrong but...

A 15kW genset would require either it interfaced directly to the controller or battery pack, or that you also had a 15kW charger on board.


Well i tought about it... While i am satisfied with my current EV, its getting me to work and back, i keep noticing how often i have to charge if we decide to go for a trip. My car is mission oriented, everything outside its mission would mean loss of time or money.

That is when i started to think of genset. It would be a 900cc two cylinder petrol engine with BLDC motor instead of flywheel. It would be wired to output triphase AC to a bridge where it would be rectified DC. BLDC motor would be wired a bit higher than battery voltage. Also Vout would depend on engine RPM. No controller needed, maybe just 10000uF 400V DC cap bank.
Nevilles BMS could handle overvoltage protection easily with one output since it already monitors battery voltage.

If this doesnt work, i still have my 12kW buck charger that runs from 3phase bridge. If all else fails it would convert 380VAC from normal 3phase generator to battery DC voltage to extend my trip a bit.

The space this machinery would occupy dissuades me from putting it in a car. 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!

Hm. Feel free to add your 50c please...

A


User avatar
Adverse Effects
Senior Member
Posts: 1172
Joined: Sat, 01 Jan 2011, 03:30
Real Name: Adverse Effects
Location: Brisbane

Low cost BMS

Post by Adverse Effects »

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

Image
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 »

arber333 wrote:That is when i started to think of genset. It would be a 900cc two cylinder petrol engine with BLDC motor instead of flywheel. It would be wired to output triphase AC to a bridge.........
OK you HAVE thought about it - a lot! No worries.
arber333
Groupie
Posts: 56
Joined: Mon, 11 Mar 2013, 02:29
Real Name: Arber
Location: Slovenia
Contact:

Low cost BMS

Post by arber333 »

Yes

I am thinking of using honda GX690 or other V twin industrial engine. This should give me some 15kW of power. Generator i havent decided yet. I would need either 400VAC normal triphase output with my 12kW charger or 92VAC output that i would rectify with six power diodes and cap bank to create some 160VDC output. Perfect for my battery. When the cell voltage goes over 3.55V BMS would disconnect charging and protect cells.
Now i just have to find suitable (not expensive!) BLDC generator.

anyone?

A
arber333
Groupie
Posts: 56
Joined: Mon, 11 Mar 2013, 02:29
Real Name: Arber
Location: Slovenia
Contact:

Low cost BMS

Post by arber333 »

I have found this BLDC motor that can produce 10kW nominal, either out or in. http://www.goldenmotor.com/eCar/HPM96-10000Curve.pdf
I would load this with 3phase bridge, capacitor and battery on other end. No controller needed. You think it would produce 147VDC at 4000RPM?

The other one i found is 12kW Mars BLDC. http://kellycontroller.com/mars-0913ete ... p-874.html Now this one i am certain would produce 150VDC. I would have to check the voltage. Maybe motor on a lathe first with a light load to check the voltage output...

Anyhow i am working on my charger. Another attempt to make it 3phase full bridge. This time i aim for 70A output. This would fill my car in 2hrs from Level 2 3ph stations! If that works i dont think i will need range extender at all.

A
Last edited by arber333 on Sat, 19 Jul 2014, 00:59, 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 »

I have heard some quite bad reports on the Golden brand - poor quality, lack of support and warranty are just some of them.
Mars have a very good reputation though.
You might also look at the EMRAX 207 - might be a bit more power than you are looking for though. Its priced at around 2500 Euros.
Post Reply