Arduino Forum

Using Arduino => Motors, Mechanics, and Power => Topic started by: turok on Jul 22, 2011, 11:10 pm

Title: my first big project - BMS - is it possible?
Post by: turok on Jul 22, 2011, 11:10 pm
Hi all,

You can scroll to the Essence if you want.

Short "me" story:
I'm a newly registered member, in a "trying to figure out arduino" status, being baffled about the possibilities.
My business is computers and Arduino seems a good way to break out of "the box".
I learned about "some" basics in electronics (I understand things like voltage, current, resistors, diodes, transistors, but that's about it) 
and about Java programming (a long time ago, so the Arduino environment looks *just* a bit familiar).
I essentially discovered and received an Arduino board a few weeks ago, and took some time to read the basics on the Arduino website (and successfully practiced some examples mostly by copying and adapting existing code).
I still have to discover a lot of the possibilities.

I also happen to posess an EV (a 2008 150V Nimh Vectrix (http://www.vectrix.com/products/vx-1 (http://www.vectrix.com/products/vx-1), but older model); now with about 12000kms on it.) . This fact triggered my curiosity about battery technology, so I started to get into the matter (ie a lot of forum reading).
It seems my beloved vehicle has no battery management system, and one battery pack after another gets destroyed by unbalanced cells (mine survives still, but certainly won't last forever either).
The separate cells with a lower SOC (state of charge) tend to get "reversed charged" and die when the pack is drained beyond a certain point.
(there are other issues like temperature and systematic overcharging, but that aside)
The only system used for balancing is so called top-balancing, where systematic overcharging the whole pack should pull up the lower SOC cells.


ESSENCE

Picture an Electric Vehicle with 102 Nimh cells @ 1,4V (when fully charged) and no "battery management system (BMS)"
I want to avoid that the cells get out of balance with each other.
My first thought was to connect all separate cells to an Arduino (with som I/O extenders?), measure the voltages, compare them and act upon differences. (ie. warn me or something)

I'm afraid that Arduino has a too limited number of Analog inputs to realise that.
So maybe I'll just have to compare groups of cells instead. (accuracy will go down)


I know this is vague, but I prefer to check the main story first. then go on with some details.
I also realize that this may be to big for me as a beginner, but I'm not scared to learn, and I'm not in a hurry.

Am I in any good direction?? Can such a thing be done, and how?

Any help or better ideas are welcome.

Greets

TuRoK
Title: Re: my first big project - BMS - is it possible?
Post by: Impervium on Jul 22, 2011, 11:29 pm
I'm no expert, but as faar as I know, theres ways of getting more digital and analog inputs, by buying certain chips. I've not gotten to the input part yet, but I will.
Right now I'm working on using several outputs. I figured out how to link shift registers and thereby use 3 digital ports to run 320+ outputs on 3 digital ports.

Your idea should be possible. Though I'm wondering what kind of output system you're thinking of having?
I recommend either LCD, or 7 segment displays.

I haven't gotten into LCD's yet, and i believe they're harder to set up and program.
7 segment, 4 digit displays are easier to manage then I thought. Just don't get stuck in the thought that
"I don't get the different digits to show different values".

If you just want a graph output, there's the led bars. Though, you'd probably need lots of outputs for these as well.



Title: Re: my first big project - BMS - is it possible?
Post by: turok on Jul 22, 2011, 11:52 pm
I already managed to control such a display. I pulled it from an old decoder, and got it to work with multiplexing. ( again by adapting existing code)
So yes I was planning to use it to show me what cell is failing and Soc data
Title: Re: my first big project - BMS - is it possible?
Post by: Magician on Jul 23, 2011, 12:43 am
There are special chips, design to do such things, like monitoring individual cell in the battery string, equalization, balancing. Arduino could be in this case a log/monitor Manager . :)
I'm not an expert in this area, but you can dig in web-sites maxim and I think, TI. Look through their application notes, sometimes it's really helpful for quick-learning.
http://www.maxim-ic.com/datasheet/index.mvp/id/5523 (http://www.maxim-ic.com/datasheet/index.mvp/id/5523)
Title: Re: my first big project - BMS - is it possible?
Post by: graynomad on Jul 23, 2011, 02:21 am
There's no practical limit to the number of analogue inputs you can have if you add some external hardware.

However I assume these cells are wired in series? If so you have problems with measuring very high voltages and that probably means isolating the inputs which starts to get complicated.

______
Rob
 
Title: Re: my first big project - BMS - is it possible?
Post by: CrossRoads on Jul 23, 2011, 03:21 am
Or set the arduino up as a floating  meter and measure across each individually.
We  had a huge thread going on this in the old forum.
My suggestion was  a series of relays for 100% isolation, arduino ground becomes - of battery being measured, Analog-in connects to battery+ (which is battery- of next in line, but so what?) Work it just like a multimeter with a relay multiplexer in front of it.


Title: Re: my first big project - BMS - is it possible?
Post by: graynomad on Jul 23, 2011, 03:40 am
Yep I remember that thread, what a marathon.

I think the relay idea works as long as the Arduino is floating and not sitting on the battery bank GND. This probably means an isolated PSU for the Arduino.

Can turok afford 104 relays :)

______
Rob
Title: Re: my first big project - BMS - is it possible?
Post by: CrossRoads on Jul 23, 2011, 04:19 am
Sure, he's been saving on gas money for 3+ years, driving around on inexpensive electricity  :D, or something like that 8)

http://be.farnell.com/panasonic-ew/tq2-l-5v/relay-dpdt-5vdc/dp/1448361

I don't know what this page says, I think  selected Nederlands for language.
Can search for similar - 5V, 250ohm coil (20mA to turn on), 30V, 1A.
Maybe look around for similar spec part but at lower cost.
Need a relay per battery.
NO side of relay connects to battery. Call that pins 4  to B+s & 7 to B-s.

Then all pin 3s get connected together and go to Analog in.
All pin 8s get connected together and to arduino Gnd.

Then the multplex circuitry turns on 1 relay at a time, connecting B+ and B- to Analog In & Gnd.
Make the measurement, turn off the relay, on to the next device.

http://www.farnell.com/datasheets/22540.pdf
Title: Re: my first big project - BMS - is it possible?
Post by: graynomad on Jul 23, 2011, 04:29 am
I think it would be very important to use proper hardware decoder chips (74xx138/74xx154 style) so there is absolutely no chance that two relays can be turned on at the same time.

This would need 8 154s enabled by a single 138.

______
Rob
Title: Re: my first big project - BMS - is it possible?
Post by: CrossRoads on Jul 23, 2011, 04:44 am
Yes, for sure you only want 1 enabled at a time.

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=296-9181-5-ND but with more current capability, or more efficient relays.

Perhaps
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=296-6429-1-ND, 64mA sink capability.
Title: Re: my first big project - BMS - is it possible?
Post by: turok on Jul 23, 2011, 03:25 pm
ok! thanks for all the replies, greatly appreciated!

I don't fully understand everything, but it seems like you all agree that a method of multiplexing is the best solution.
seems like a good idea to me.
Let's see if I understand this:

Instead of reading all cells at the same time, I would connect every cell briefly to the Arduino by switching 102 relays with a separate IC?

something like this?

(http://i1195.photobucket.com/albums/aa381/dirkaturok/IMG_0009.jpg)

@ Greynomad, I don't mind buying a lot of relays (they're cheap enough), but I don't have a LOT of space in the Vectrix. Worries for later though..
@ CrossRoads, indeed :-)
@ Magician, I know there are ready-available BMS systems, but this one, I'd like to learn and understand instead..
Title: Re: my first big project - BMS - is it possible?
Post by: graynomad on Jul 23, 2011, 03:59 pm
If I've got this correctly you will have to switch both the analogue input and the GND. Note how your drawing has GND going to one battery, what happens for the others? So you need double-pole relays.

Also the Arduino has to be powered from a power supply that is isolated from these batteries.

Another thing to think of is when do you read these voltages. If you are going to compare readings against each other or indeed any other data you have to have a known and constant load. Meaning that I think you can't really take a reading while driving as the load will vary a lot I would think.

______
Rob
Title: Re: my first big project - BMS - is it possible?
Post by: turok on Jul 23, 2011, 04:45 pm
@Rob

Good point

If the cells are being read out in a short amount of time (a few milliseconds) there shouldn't be a problem I guess.
If the BMS gives me a warning while I'm accelerating or braking (regenerating) I could guess there might be another reason than actual imbalance.
I guess It would be quite reliable when cruising at a more or less fixed speed (even at top speed = limited to 110kph).
I can also choose/adapt the tolerance for the difference between voltages.
I could also program the arduino to give a secondary alarm if the voltage of one cell drops below a safe point.

An external power supply shouldn't be a problem (I also have a 12V circuit in the Vectrix).
I'd make the circuit so I can put it on when I want (not all the time)
Title: Re: my first big project - BMS - is it possible?
Post by: CrossRoads on Jul 24, 2011, 12:46 am
This is the system I was discussing.
The MAX6921 might be used, or the other demux chips discussed above.
Note how each battery is connected to nothing until a relay is closed.
A change is needed in the the Gnd for the battery WOULD NOT the GND for the Arduino, demux, & relay coils.
The two would be isolated so that the measuring electronics only connect to the battery under measurement +/- terminals.
(http://www.crossroadsfencing.com/BatteryMeasurement.jpg)
Title: Re: my first big project - BMS - is it possible?
Post by: a.d on Jul 24, 2011, 01:21 am
I'm reluctant to be negative towards the relay idea because I don't have a better one to replace it, but how much room is 102 relays going to take up? I mean if it was a car, then yeah just stick it in the boot, but it's a scooter, and there isn't much storage room on a bike...
Title: Re: my first big project - BMS - is it possible?
Post by: CrossRoads on Jul 24, 2011, 02:02 am
Scooter?!? What the ... Okay, I never opened that link, thought we talking a car.
Anyway, whole thing could fit on three 80mmx80mm PCBs, so not too big.
Title: Re: my first big project - BMS - is it possible?
Post by: Magician on Jul 24, 2011, 04:39 am

In a link, I posted above, data sheet for MAX11068. I didn't look myself earlier, 82 pages...., yet now I get curious and open it. It took a moment to find out on page 10 all analog front end in full details, plus a lot of useful information.
Instead of electromechanical relay - MOSFET multiplexer. The same company produce a chips, high voltage mux, MAX378/379.
http://www.maxim-ic.com/datasheet/index.mvp/id/1085 (http://www.maxim-ic.com/datasheet/index.mvp/id/1085)
It's not 150V, but could be other producers/manufacturers. Or just one ! electromechanical  relay to switch a half battery.

It never hurt to study/research first what is already exist on a market, instead of inventing a bike. :)



Title: Re: my first big project - BMS - is it possible?
Post by: CrossRoads on Jul 24, 2011, 05:00 am
A Mux doesn't give you the detailed voltage needed for ech battery.
You need contacts across each battery with ground isolated from the string of battery ground so that the arduino 5V input limit is not exceeded.
Title: Re: my first big project - BMS - is it possible?
Post by: Magician on Jul 24, 2011, 05:13 am
Yes, I understand.
There is quote :
Quote
The MAX378 8-channel single-ended (1-of-8) multiplexer
and the MAX379 4-channel differential (2-of-8) multiplexer

Looks like this "differential" is a key, one channel - input, another - commutate a ground. It's all shown on page 10.
Exactly like you try to design it.
And I just dig up one create on their web site: MAX4800, 8x - 200V switch.
Title: Re: my first big project - BMS - is it possible?
Post by: turok on Jul 24, 2011, 07:18 pm
I had some reading to do to understand what you guys are talking about :)

Crossroads; I understand your scematic, and it makes sense to me.

From what I understand from the rest, I derive that the other chips wouldn't need the relays, because they switch like a transistor (or Mosfet?). correct?

The part I don't understand, is the high voltage issue; I thought, though they are in series, if every cell is connected (with both poles) separately (like measuring them one after another with a voltmeter) the maximum voltage involved should be 1,4 V -or- the voltage of one cell?
Or am I wrong when I assume that? Or missing something?

sorry if my questions seem stupid.. I'm learing a lot here.

Turok
Title: Re: my first big project - BMS - is it possible?
Post by: CrossRoads on Jul 25, 2011, 12:19 am
High voltage: With the relays, yes, each relay would only have its batteries voltage only, thus no high voltage. The arduino and its relay coil controls and relay select logic will have its ground at the -terminal of the battery being measured.

I am not convinced the mux will work. You will need a series of the chips. They will all need a common Ground, which will connect to the arduino ground, for the arduino to be able to control them.  Then once you get past battery 3,  you have a higher voltage on the battery (5.6 on battery 4)  than the arduino can read.

To handle the higher voltages as go you higher up in battery voltage (with respect to the mux ground), you will need higher power supply voltages (and the spec seemed to show you need both a very +supply and a very low -supply:
"The MAX4800/MAX4801/MAX4802 allow a peak-to peak analog signal range from VNN + 10V to VPP - 10V."

For batteries 1-8, you will have 11.2V.
Then 9-16 will have 22.4.
17-23, 33.6
24-31, 44.8
32-39, 56
40-47, 67.2
48-55, 78.4
56-63, 89.6
64-71, 90.8
72-79. 102
80-87, 113.2
88-95, 124.4
96-103, 135.6

(should be 142.8, missed a couple tenths somewhere).

so VNN must be at least -10V and VBB must be > 152.8V, with respect to battery system ground.

Title: Re: my first big project - BMS - is it possible?
Post by: Magician on Jul 25, 2011, 03:52 am
edited: read next posts O'K, you are right. I didn't notice that analog +-10V limits, been happy to see +200V max voltage.
And also couldn't find any multiplexer, that operate higher than 80V. It's strange. :~
The only couple "improvements" I'd suggest, it replace electromechanical relay  on solid state, that will minimize space and increase speed of the "homemade" mux front-end.
And second, opto-isolate  analog input of the arduino, so processor or "core" would be on ground safe level, capable do other stuff - monitor some additional sensors, display info on LCD and take some commands from control panel or serial link. In order to do it, build a "floating" board, that would include own dc/dc convertor and analog opto-coupler that shown on:
http://ruggedcircuits.com/html/circuit__24.html (http://ruggedcircuits.com/html/circuit__24.html)
or
http://www.vishay.com/docs/83708/appn50.pdf (http://www.vishay.com/docs/83708/appn50.pdf)

There is a SSR:
http://www.vishay.com/solid-state-relays/ (http://www.vishay.com/solid-state-relays/)
Title: Re: my first big project - BMS - is it possible?
Post by: CrossRoads on Jul 25, 2011, 05:09 am
Is there are double version of an SSR? Otherwise you are replacing a 10-pin device with the equivalent of a 12-pin device, and I am not sure 2 of these would fit next to each other in a 12-pin socket even. 2 parts would be 17.4mm long. 
I think the parts I suggested originally were 9mmx14mm,126mm^2, vs 132.5mm^2 for 2 SS relays.

turok, what are you thinking in terms of other sensors, a display etc?
Title: Re: my first big project - BMS - is it possible?
Post by: Magician on Jul 25, 2011, 05:57 am
You suggested Panasonic, it's only for:
Quote
110 V DC, 125 V AC

Title: Re: my first big project - BMS - is it possible?
Post by: CrossRoads on Jul 25, 2011, 06:12 am
From Farnell link that I posted in Reply #7, the only relay I posted:

Coil Voltage VDC Nom:5V
Contact Current Max:2A  <<< 2A
Contact Voltage AC Nom:125V
Contact Voltage DC Nom:30V  <<< 30V DC
Coil Resistance:250ohm
Contact Configuration:DPDT
Coil Type:DC, Sensitive
Coil Current:20mA
Nom Operating Power:70mW
Relay Mounting:PCB
External Height:5.4mm
External Width:14mm  <<< 14 mm long
External Depth:9mm  <<< 9mm wide

Title: Re: my first big project - BMS - is it possible?
Post by: Magician on Jul 25, 2011, 06:29 am
Quote
The LH1513 relays are DPST normally open switches
(2 form A) that can replace electromechanical relays in many
applications

And price only $2.79*

edited:
compare to
Quote
Prijs per Eenheid:  3,59 € 
Title: Re: my first big project - BMS - is it possible?
Post by: CrossRoads on Jul 25, 2011, 06:52 am
Yeah, okay, those might work well.

But check the Farnell price for Belgium!
http://be.farnell.com/jsp/search/browse.jsp;jsessionid=PV2ZSN41GJJCACQLCIRJN4Q?N=0&Ntk=gensearch&Ntt=lh1513&Ntx=mode+matchallpartial&suggestions=false&ref=globalsearch&_requestid=24479

5,14 Euros for Qty 100+

compared to 3.59 Euros for Qty 1 relay.

Now, since this is for a motorbike/scooter, the SSR might make much better sense.
Why not keep searching, see if some other more reasonably priced alternative can be found.
Title: Re: my first big project - BMS - is it possible?
Post by: Magician on Jul 25, 2011, 07:03 am
It's for OP to look in details, I just satisfy my curiosity  :)
BTW, MAX4800 will works, I get confused with analog voltage, but when I re-check again:
Quote
Analog Switch
The devices allow a peak-to-peak analog-signal range
from VNN + 10V to VPP - 10V. Analog switch inputs
must be unconnected, or satisfy V NN ? (V COM_ ,
VNO_) ? VPP during power-up and power-down.


It's mean if we set VNN to -10, and VPP to 190V
Quote
The V PP and V NN high-voltage supplies are not
required to be symmetrical, but the voltage difference
VPP - VNN must not exceed 200V.

Analog switching range would be 0 - 180 V. 
Title: Re: my first big project - BMS - is it possible?
Post by: CrossRoads on Jul 25, 2011, 07:09 am
I don't think MAX4800 will work - as I said earlier, its Gnd must be at Arduino Gnd for channel selection controls to work - and then you will have >5V coming out of the mux going to the Arduinio, which will smoke the arduino.
Not to mention extra components to create <=10V and >=152.8V from wherever.
Title: Re: my first big project - BMS - is it possible?
Post by: Magician on Jul 25, 2011, 07:23 am
Of course, it will works only with "floating" opto-analog boards, that I mention as second improvement somewhere earlier.
Advantage to go for this switch is high timing performance,   I really impressed by 107 us check-up time for 12 cell battery by MAX11068,  = 9 us per cell !
It capable get dynamic cells data, when battery extra loaded by starter motor and internal resistance of cell show up in bright light on stage.
Title: Re: my first big project - BMS - is it possible?
Post by: CrossRoads on Jul 25, 2011, 07:32 am
I think that really increases the design complexity, as now you need all these optoisolators (on DC voltage? So you need current inducing resistors as welll to have a voltage that can be measured) and more optos to drive the control pins.
I would build a small part of the design to start, just measure a couple of the batteries to prove out whatever muxing is used, prove out the code to control the muxing, desing/prove out the interface to the operator (3 7-segment LED display with (###, bAd) or something, prove out the power section to control that stuff.
Title: Re: my first big project - BMS - is it possible?
Post by: graynomad on Jul 25, 2011, 07:56 am
Quote
high timing performance

That gets around my previous comment about not being able to take meaningful readings while driving. Getting real-time readings would be good I think because you could see how each cell reacts under load.

______
Rob
Title: Re: my first big project - BMS - is it possible?
Post by: turok on Jul 25, 2011, 02:35 pm
Thanks again for all the interest.

Quote Crossroads:

"turok, what are you thinking in terms of other sensors, a display etc?"

there are some temperature sensors (I think 4) placed in the whole pack. I thought of using them as well, but not sure. Maybe I should add some.

I don't need much output while driving. It would be usefull to me to know what cell is lowest, and maybe the difference between it and perhaps the average.
I guess I could use the 4 digit display I pulled out of a broken decoder (got it to work too), telling me something like A4:XX
A4 being the cell, XX being the difference in voltage. (only if the difference is alarming enough I'd guess)
I also thought about logging the data on an SD card, and in that interest also measuring the Amps, but thats jumping too far ahead I think.

About the Opto-isolation: I understand the principle (not the complete circuit, I don't know what octocoplers are yet)
Would they tackle interference maybe? Or what other purpose would they serve?

Anyway this seems a lot more than I can chew (and than I anticipated), but I guess persistence is the key..
I think
Title: Re: my first big project - BMS - is it possible?
Post by: CrossRoads on Jul 25, 2011, 03:42 pm
Magician has some ideas on the optos, I don't see the need with the relay approach.
What they do is provide voltage isolation when you have a system that needs seperate grounds/
Title: Re: my first big project - BMS - is it possible?
Post by: Magician on Jul 25, 2011, 05:05 pm
Quote
I don't need much output while driving. It would be usefull to me to know what cell is lowest, and maybe the difference between it and perhaps the average.


Voltage measuring of the unloaded battery is useless.

Quote
Open Circuit Voltage OCV

Measuring a battery's open circuit voltage is not a reliable measure of its ability to deliver current. As a battery ages, its internal resistance builds up. This will reduce the battery's ability to accept and to hold charge, but the open circuit voltage will still appear normal despite the reduced capacity of the battery. Comparing the actual internal resistance with the resistance of a new battery will provide an indication of any deterioration in battery performance.


http://www.mpoweruk.com/testing.htm (http://www.mpoweruk.com/testing.htm)

In other words, if your project should provide results of health (good - bad) status of the cell,
battery must to be loaded. And the best way to do it in real driving environment,  if you are not building a car work-shop with lab equipment.

And when it's loaded, there is a time performance question, you should measure as fast as possible, so when you get results for cell #102 it's not discharged much more than cell #1, or you wouldn't be able to compare results.

The same time I agree with CrossRoad, design with MAX4800 too complex for one single vehicle.
Designing with relay, will have not good timing ( 2-3 msec time ON/OFF delay in relay ), but tolerable in steady driving conditions.
The preference for Solid State relay should be done considering reliability and time life span of the relay

Title: Re: my first big project - BMS - is it possible?
Post by: turok on Jul 25, 2011, 07:15 pm
of course I must measure while driving, I just need little output then.

That's when the datalogging would come in handy..
Title: Re: my first big project - BMS - is it possible?
Post by: Magician on Jul 26, 2011, 01:25 am
It's good you confirm it. Because for me it's not clear your intention and goal you'd like to achieve.
Passive measurements/monitoring and even log results to SD it's only one feature.
In your initial post #1:
Quote
I want to avoid that the cells get out of balance with each other.
My first thought was to connect all separate cells to an Arduino (with som I/O extenders?), measure the voltages, compare them and act upon differences. (ie. warn me or something)


Your thoughts were - act upon differences. That is another feature.

BMS can do both task, Passive monitoring and Active balance individual cell. How to do it described in details in data sheet linked to MAX11068. Have a look and make your decision if you gonna make balancing.

Design of system, we already discussed, it depends also on your decision if BMS has to do something else (temperature monitoring, control lighting/sound devices etc).
If you decided nothing else to do, you can build project as CrossRoad suggest. Disadvantage of such approach is than you have to packed arduino in the plastic box altogether with relay matrix and power source, and never touch it when it powered up, because it would be "floating"
with battery voltage +150V.

It's, again, up to you to decide, but I recommend split high - low voltage parts by using analog optocoupler. Arduino would be at ground level, safe to touch, connect other devices/computers.
Link to schematic how to build optocoupler is also posted, plus application notes how to design one.

There is one question, have you check on your battery, if you would be able to get access to individual cells? It's not in some insulated packaged? Would you be able to attach wiring?



Title: Re: my first big project - BMS - is it possible?
Post by: turok on Jul 26, 2011, 09:30 am
"act upon it"
to be honest, I'm not sure I could do more than monitor the battery pack.
If my led display returns a significant difference, I can slow down and return home to recharge / balance the pack.
I don't see a solution to cut the cell out of the circuit (without shorting and thus destroying it)
Maybe "Battery Management System" is not the right term, "Battery MONITORING system" would be..
I'd be tremendously proud if I can achieve only that.

I will look into the MAX11068 data sheet again however.

I know I'm trying to re-invent existing stuff, but for a reason.
An commercial BMS would be expensive I guess, and I still wouldn't understand it or learn anything.
If I'd have to pay 1000 to 1500€ (just a guess) for a commercial BMS (if there is such a thing), I'd be better off keeping that money to change the pack to Lithium (2500-3000€).
this project is mainly meant to learn. If it protects my old Nimh battery, that's a bonus.

I also happen to have a Nimh battery pack from an electric bycicle consisting of 20 cells (one of them must be bad).
Before I'd build a definitive system for the Vectrix, I'd try on that one.

The cells of the vectrix look like this:
http://www.google.be/imgres?q=vectrix+battery+pack&um=1&hl=nl&sa=N&tbm=isch&tbnid=cEsdyhT7jcf1vM:&imgrefurl=http://a4x4kiwi.blogspot.com/2011/06/vectrix-electric-motorcycle-battery.html&docid=ea2R0c31ZR5BlM&w=1600&h=1065&ei=YmwuTtxpgoA6ndvlfg&zoom=1&iact=hc&vpx=542&vpy=82&dur=4843&hovh=183&hovw=275&tx=189&ty=112&page=5&tbnh=127&tbnw=169&start=72&ndsp=18&ved=1t:429,r:2,s:72&biw=1280&bih=575 (http://www.google.be/imgres?q=vectrix+battery+pack&um=1&hl=nl&sa=N&tbm=isch&tbnid=cEsdyhT7jcf1vM:&imgrefurl=http://a4x4kiwi.blogspot.com/2011/06/vectrix-electric-motorcycle-battery.html&docid=ea2R0c31ZR5BlM&w=1600&h=1065&ei=YmwuTtxpgoA6ndvlfg&zoom=1&iact=hc&vpx=542&vpy=82&dur=4843&hovh=183&hovw=275&tx=189&ty=112&page=5&tbnh=127&tbnw=169&start=72&ndsp=18&ved=1t:429,r:2,s:72&biw=1280&bih=575)
Title: Re: my first big project - BMS - is it possible?
Post by: graynomad on Jul 26, 2011, 09:51 am
Quote
"Battery MONITORING system"

At least the thread title is still correct :)

We used that acronym 20 years ago, but it stood for Building Management System in our context.

______
Rob
Title: Re: my first big project - BMS - is it possible?
Post by: turok on Jul 26, 2011, 01:55 pm
@ Magician

Hope you fogive me for being this lazy :-)
I went over the MAX11068 specs, but it's way too much information, and since I don't understand most of it, I tried to filter the essence by skipping a lot of it:

As I understand it, this tiny chip does everything I hoped for, balancing included (when surrounded by the right components, right?).
It seems like it's cheap enough, but will it be applicable in my battery?

Will I be able to stack them together to work with 102 cells? (or stack them with the simpler MAX11080 IC's?)
I think so, but my technical english is sometimes too poor to be sure:
"This highly integrated solution employs a proprietary SMBus(TM)-laddered communication bus that allows multiple MAX11068s to be daisy chained together without expensive isolators."

edit: I found they can be chained together to monitor up to 372 cells. There I go:-)

And will this system then work as a standalone, or will I be able to (/should I) access the data with an arduino? (e.g. to read out on lcd while driving and/or move data to pc to examin later)
If the system works as a standalone, this might be unnecessary.

This information I would need to decide wich way to go.
I promess I will study the data sheet more deeply when I need to, but you may also just point me to the relevant bits of information :-)
Title: Re: my first big project - BMS - is it possible?
Post by: daveg360 on Jul 26, 2011, 04:57 pm
I think others have got an Arduino to talk to SMBus devices.  It seems that it's pretty similar to I2C
Title: Re: my first big project - BMS - is it possible?
Post by: MarkT on Jul 27, 2011, 02:14 am
I've only skim-read this thread, but it strikes me the best approach is to split the battery into several banks, use an identical Arduino-based manager for every bank, and have them report back to a central controller via opto-isolators.  That way each bank has sane/safe voltages and the system is modular and extensible.

Alternatively use an opto isolator for every cell (I presume 1.4V cell can drive an IR emitter) to measure its voltage in the analog domain and multiplex the output sides of all the opto isolators.  Since the silicon bandgap is about 1.1V I'd imagine you would have a system very sensitive to cells dropping below 1.2V or so.
Title: Re: my first big project - BMS - is it possible?
Post by: turok on Oct 24, 2011, 09:27 am

This is the system I was discussing.
The MAX6921 might be used, or the other demux chips discussed above.
Note how each battery is connected to nothing until a relay is closed.
A change is needed in the the Gnd for the battery WOULD NOT the GND for the Arduino, demux, & relay coils.
The two would be isolated so that the measuring electronics only connect to the battery under measurement +/- terminals.
(http://www.crossroadsfencing.com/BatteryMeasurement.jpg)


I've been learning/reading some more, and after rereading this, this is what I think I can make of it:
The MAX6921 could be used just to directly control up to 20 relays that each isolate 1 cell and feedback its voltage to the arduino.
both circuits are completely separated, so no common ground.
The way this circuit is drawn, it seems like there wouldn't even need to be transistors or resistances around the MAX chip to control the relays, is that right?
are the outputs of the MAX chips (I think 40ma) enough to close a relay?   

grtz
T
Title: Re: my first big project - BMS - is it possible?
Post by: graynomad on Oct 24, 2011, 09:33 am
40mA is plenty for a small relay, but that circuit does not isolate the batteries from what I can see.

EDIT: I take that back, it does I think, but you have to change the GND for the relays and the MAX chip to be the same as the AVR.

ANOTHER EDIT: You have to be 110% certain you don't activate two relays at the same time. Do you plan to use software at any time in this project  :smiley-eek:

_____
Rob
Title: Re: my first big project - BMS - is it possible?
Post by: turok on Oct 24, 2011, 09:51 am
I have no idea how to instruct the MAX chip through the arduino, but I bet I'll find out.
haven't done much thinking about the programming yet, but it seems pretty straightforward to me;
open relay one
read voltage one
close relay one
(probably) delay (very short, to stabilize)
next relay and so on
compare voltages
report somehow


Title: Re: my first big project - BMS - is it possible?
Post by: graynomad on Oct 24, 2011, 09:58 am
Quote
it seems pretty straightforward to me;

Yes it is, just be mindful of the consequences if for whatever reason you open one relay before closing the another.

For example how will you know that relay 1 has actually closed before you open relay 2?

What if there's a mechanical failure in relay 1 and it sticks open, if you then open relay 2 it's goodnight nurse to half your circuit and with the resultant fire maybe the vehicle as well.

Do you trust your coding ability to that extent?

If you use a 4514 decoder chip it's not possible to have > 1 output active at a time which at least takes your code out of the equation, not mechanical failure though.

______
Rob

Title: Re: my first big project - BMS - is it possible?
Post by: turok on Oct 24, 2011, 10:56 am
Thanks for the advice.
I understand the concern, and it s certainly something Ill remember.
I could incorporate a check if voltage ==0 after opening the last and before closing the next relay.

For security reasons, i plan to test the system on a much smaller 20 cell nimh pack.

I have no idea what the 4514 decoder chip is/can do, but Ill look in to it.
Title: Re: my first big project - BMS - is it possible?
Post by: turok on Oct 24, 2011, 12:01 pm
I looked at the datasheet of the 4514 decoder chip  http://media.digikey.com/pdf/Data%20Sheets/Fairchild%20PDFs/CD4514BC_4515BC.pdf (http://media.digikey.com/pdf/Data%20Sheets/Fairchild%20PDFs/CD4514BC_4515BC.pdf)
but it's too technical for me.
is this chip to replace the MAX chip, or what?
can you explain a little?
Title: Re: my first big project - BMS - is it possible?
Post by: graynomad on Oct 24, 2011, 05:02 pm
The chip will be a lot easier to use than the MAX chip and basically fool proof WRT only having a single output active.

You tie the  latch pin to 5v and apply four signals to the A, B, C, and D inputs. The binary pattern applied to this inputs determines the active output.

Couldn't be simpler, and 0 chance of two outputs being active at the same time.

The 4515 only has 16 outputs and the MAX has 20, if you need > 16 you can use 2 or more 4515s.

______
Rob
Title: Re: my first big project - BMS - is it possible?
Post by: turok on Oct 24, 2011, 06:58 pm
ok, lets see if I got this right;

This chip turns 4 arduino outputs into 16 outputs on the chip, by combining different high/low inputs on the chip (4X4 combo's=16), right?

are these outputs strong enough to open/close small relays without an additional power source? I looked at the datasheet again, but there are just too many damn numbers :)

Title: Re: my first big project - BMS - is it possible?
Post by: graynomad on Oct 25, 2011, 12:38 am
Quote
are these outputs strong enough to open/close small relays without an additional power source?

Unfortunately no, there may be a version that does but the best thing would be to use a driver chip like the 2803.

Quote
This chip turns 4 arduino outputs into 16 outputs on the chip, by combining different high/low inputs on the chip (4X4 combo's=16), right?

Correct, but the equation is 2^4 = 16 (2 to the power of 4).

______
Rob
Title: Re: my first big project - BMS - is it possible?
Post by: jumpjack on Jun 26, 2012, 06:12 pm
Hi gusy, anybody still tuned here? :-)

Could this work?
(http://img207.imageshack.us/img207/1976/ipotesibmsscooterarduin.jpg)

I'm in trouble finding MAX378 or similar unusual components, but I know where to buy two cheap HC4067 multiplexers:
http://www.robot-italy.com/product_info.php?products_id=1554

Would  my schematic prevent the MUXs from being connected to high voltage differentials if properly driven?
Title: Re: my first big project - BMS - is it possible?
Post by: graynomad on Jun 26, 2012, 10:57 pm
Is bottom battery is connected to GND?

If so then this won't work.

If the MUXes and Arduino are isolated from the batteries this sort of thing will work, but you aren't connecting to the negative of the lowest battery so you can't measure that one.

Also one of the MUXes needs to connect to GND, not another AN input.

______
Rob
Title: Re: my first big project - BMS - is it possible?
Post by: jumpjack on Jun 27, 2012, 09:03 am

Is bottom battery is connected to GND?

Ignore it, just focus on the others, it's n example!I
Quote

Also one of the MUXes needs to connect to GND, not another AN input.

______
Rob
!

Why??
The reason for which i want to use 2 muxes is to AVOID connecting to gnd! I want to measure voltage difference amongst two pins,not w.r.t. gnd,to avoid "measuring" 16*4=64V in my system!

nt
Title: Re: my first big project - BMS - is it possible?
Post by: graynomad on Jun 27, 2012, 05:34 pm
Imagine MUX1:4 and MUX2:1 are selected, you have 12 volts between A0 and A1.

If the two systems are isolated (different GNDs, separate power supplies) and you can ensure that the correct MUX selections are made I think it's OK.

In this scenario one of the MUX outputs would be connected to the Arduino GND.

______
Rob
Title: Re: my first big project - BMS - is it possible?
Post by: themotorman on Jul 06, 2012, 10:41 pm
Yes!! it is possible to use the Max11068 connected to an Arduino to read any number of cells ( upto 120 ).
There is no problem except that the most negative part of the battery pack is connected to the maxim gnd. All the rest are floating and the 11068 mux handles this perfectly. I have a system for an ecar that uses this chip and uses 112 cells. Nearly 400 volts!!
No need for relays. The documentation for the 11068 and the eval board 11068eval kit explain most of what you need to do. How you connect to the Arduino via the SDA and SCL outputs on the lowest max11068 using Ic2 or SMB depends on how you want to handle the data stream and where you are displaying the data. . I will publish code when I have it thoroughly tested. If anyone in this forum has done this please let me know and we can compare notes.
Title: Re: my first big project - BMS - is it possible?
Post by: jumpjack on Jul 07, 2012, 12:35 pm
I also found:
Analog Device AD7280 (http://www.analog.com/en/analog-to-digital-converters/energy-measurement/ad7280a/products/product.html)
The AD7280A contains all the functions required for general-purpose monitoring of stacked lithium ion batteries as used in hybrid electric vehicles, battery backup applications, and power tools. The part has multiplexed cell voltage and auxiliary ADC measurement channels for up to six cells of battery management.
1-6 cells, stackable, 5.09$

Texas Instruments BQ76PL536a (http://www.ti.com/product/bq76pl536a)
The bq76PL536A is a stackable three to six series cell lithium-ion battery pack protector and analog front end (AFE) that incorporates a precision analog-to-digital converter (ADC); independent cell voltage and temperature protection; cell balancing, and a precision 5-V regulator to power user circuitry.
3-6 cells, stackable, all chemistries, SPI comm, 4.30$
Title: Re: my first big project - BMS - is it possible?
Post by: mauried on Jul 10, 2012, 09:07 am
Going back to the OPs first post, are you looking at building a battery management system that simply measures all the cell voltages
or a battery balancing system that both measures and then charge equalizes the cells.
The first one is fairly easy, the 2nd is a lot harder.
Title: Re: my first big project - BMS - is it possible?
Post by: themotorman on Nov 18, 2012, 07:23 pm
I have set up 112 cewlls using the Max11068 eval boards. Not cheap since each board for 24 cells costs $100, but it can do everything you want including having an I2C out that can connect and be read in an Arduino. I did start this in testing and found that one of the boards ( I have 5 total ) failed and Maxim are working on the problem, it might be a real problem with the chip isolation design... don't know yet but will post when I do. In the meantime I am going with a simple system using a shunt IC for balancing during charging and a low voltage monitor chip when discharging and a relay for isolation. Only problem is relay power comes from the batteries so not good if the batteries are left off charge for any length of time. To get over this requires a latching system and with 112 cells it adds up quickly to more $$$.
Title: Re: my first big project - BMS - is it possible?
Post by: graynomad on Nov 19, 2012, 01:06 am
Quote
Only problem is relay power comes from the batteries so not good if the batteries are left off charge for any length of time.

Latching relay?

______
Rob