Pages: [1] 2 3 4   Go Down
Author Topic: my first big project - BMS - is it possible?  (Read 9185 times)
0 Members and 1 Guest are viewing this topic.
Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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, 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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.



Logged

Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Montreal
Online Online
Faraday Member
**
Karma: 27
Posts: 2573
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 . smiley
 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
Logged

nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 126
Posts: 8476
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
   
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26570
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 126
Posts: 8476
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26570
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sure, he's been saving on gas money for 3+ years, driving around on inexpensive electricity  smiley-grin, or something like that smiley-cool

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
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 126
Posts: 8476
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: July 22, 2011, 09:30:46 pm by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26570
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?



@ 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..
Logged

nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 126
Posts: 8476
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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)
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26570
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Leeds, UK
Offline Offline
Full Member
***
Karma: 0
Posts: 134
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

Pages: [1] 2 3 4   Go Up
Jump to: