Pages: 1 2 3 [4]   Go Down
Author Topic: Project for monitoring battery string  (Read 6898 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 518
Posts: 26378
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

The uniqueness of either sounds good.
I suppose the master would need some way to map out which board was in which position in the string.
Any thoughts there?
Querying 2^48 addresses could take a while, and I think only be done when there was a configuration change - but how would an an address get tied to a position in the string?
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.

USA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 90
I’m no expert, but I play one on the Internet…
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The 1-Wire protocol takes care of enumerating devices on the bus, then you can address the devices individually. On the mapping I'm thinking if the destination is PC/Server then the software could handle it. For a stand alone system then maybe storing the IDs in the Arduino EEPROM memory (not sure of the space) or adding an off board (I2C) EEPROM... Your would of course need some interface to do the mapping LCD etc...

willnue
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 518
Posts: 26378
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

Looks like there is still a free pin on the ATTiny. Guess a button for push to ID could be added also, pin can be an input to read the switch, then an output to show when board is recognized by the master controller.
inexpensive switch here
http://www.surplussales.com/Switches/SWPushB-3.html
« Last Edit: October 19, 2011, 12:19:50 am by CrossRoads » 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.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 518
Posts: 26378
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

Somewhere I picked up some switches that are just 2 contacts also, have a nice click feel to them.
Don't know where, but I have 50 and they were really inexpensive also.
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.

USA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 90
I’m no expert, but I play one on the Internet…
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

CrossRoads,
     After looking at the schematic you posted earlier to see what (IC) you were planning to use to measure the voltage. I see it's a voltage divider being measured by the ADC on the ATTiny. Then the thought dawned on me - why not just use a voltage divider to cut the 12V+ from the battery to <10V and send it into the input of the DS2438 Smart Battery Monitor I mentioned earlier in the thread? The DS2438 has all the "support" built into it to do everything else I think the OP would need to create a network of monitors...

Quote
The DS2438 Smart Battery Monitor provides several functions that are desirable to carry in a battery pack: a means of tagging a battery pack with a unique serial number, a direct-to-digital temperature sensor which eliminates the need for thermistors in  the battery pack, an A/D converter which measures the battery voltage and current, an integrated current accumulator which keeps a running total of all current going into and out of the battery, an elapsed time meter, and 40 bytes of nonvolatile EEPROM memory for storage of important parameters such  as battery chemistry, battery capacity, charging methodology and assembly date.  Information is sent to/from the DS2438 over a 1-Wire interface, so that only one wire (and ground) needs to be connected from a central microprocessor to a DS2438.  This means that battery packs need only have three output connectors: battery power, ground, and the 1-Wire interface.

The DS2438 can either be powered by the battery itself or the 1-wire bus (parasite power), so even if the battery voltage were to fall below the level to operate the monitor (+2.4V) it would still be up and running.

I haven't used the DS2438 to monitor a battery, but I have used it just as a general purpose ADC that is able to communicate on the 1-Wire network, which is another use for it. In this case the extra ADC could maybe even be used to read a potentiometer or resistor/dipswitch combo setup as a position indicator.

Do you think there is any reason why the voltage divider wouldn't work for the input?

willnue
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 518
Posts: 26378
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

I'm not sure how this chip brings anything to the game.

"The on-board analog-to-digital converter (ADC) has 10 bits of resolution and will perform a conversion
when the DS2438 receives a command protocol (Convert V) instructing it to do so. The result of this
measurement is placed in the 2-byte Voltage Register. The range for the DS2438 ADC is 0 volt to
10 volt; this range is suitable for NiCd or NiMH battery packs up to six cells, and for lithium ion battery
packs of two cells. The full-scale range of the ADC is scaled to 10.23 volt, resulting in a resolution of
10 mV."

It is not doing anything the ATTiny and its multiple analog inputs cannot do, it still needs some smarts to control it, it still needs isolation from the other batteries.
If the 12V sealed lead acid batteries were to fall to 2.4V, I would think there would be a bigger problem to deal with.
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.

USA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 90
I’m no expert, but I play one on the Internet…
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I was thinking the chip + voltage divider would essentially be all you need for each monitor. It would take care of measuring the voltage, temperature, provide a unique ID and provide a mechanism for communication over a long distance to the master/"console", which would be an Arduino/PC etc...

Forgive me as I am still learning a lot of this stuff, but I would think the 1-Wire bus should be isolated somehow from the rest of the circuit since the purpose of the chip is to monitor batteries. Before I posted the last message I did look at the datasheet to see if the measurement side was isolated from the 1-Wire bus, but I couldn't see anything that indicated it was.  smiley-confuse

willnue
Logged

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

That DS2438 does look nice and I've earmarked it for future use, but as Bob says I don't think it helps a huge lot here although it may do if you can organize and isolated 1-wire bus.

1-wire is bi-directional which makes it hard to isolate and I don't remember seeing any isolation chips or app notes. However if it can easily be done then maybe this chip would be a good choice.

If isolation is not practical you get back to having a local processor in which case all the DS chip does is give you a temp and voltage sensors on one package.

As the Attiny85 can do both temp and voltage anyway with just a couple of external resistors (for the voltage divider) I guess it's a done deal that an extra chip is not needed.

What is needed is a protocol and there have been many options mooted, all of which will work and all of which have strong and weak points.

As for the address enumeration, how about this. All fresh nodes have address 0, they are added one at a time and the master allocates addresses starting at 1, the nodes store their address in EEPROM.

The master polls the nodes (as well as address 0) using one of the protocols we've talked about.

If a node dies it is replaced, the master detects a) that node N has disappeared and b) then node 0 has appeared. Being that the master has some really clever code written by someone of equal or greater intellect than the contributors to this thread it puts 2 and 2 together and allocates address N to the new node.

This way you can have multidrop to "fix" the problem of one dead node killing the entire chain and have auto address enumeration as well.

FWIW I reckon the daisy-chain topology is potentially more reliable than multi-drop, but only if you have redundancy in the form of two chains working in opposite directions. Of course I have to believe that because that's exactly how I'm doing my current project smiley

______
Rob
« Last Edit: October 20, 2011, 07:24:03 am by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

USA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 90
I’m no expert, but I play one on the Internet…
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Wonder how to handle 2 or more new nodes on the network? Ie. two zeros, would they collide? Maybe one will answer first etc... I think I would still prefer to use a 1-wire thermometer and "steal" the unique ID number for use as an ID on the serial bus.

On the isolation issue I have a newb question. I know the issues surrounding surrounding AC/DC isolation, but what is the risk that needs to be avoided in this DC/DC situation? It's 12VDC on the battery and 5VDC on the 1-Wire bus, but using the voltage divider the 12V could be reduced to <5V (not sure how the current is affected). Is the risk the potential current in the (huge) batteries jumping across to the bus to another battery or the console etc..

willnue
Logged

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

Quote
Wonder how to handle 2 or more new nodes on the network?
You never add two at the same time. That solves that problem.

Quote
It's 12VDC on the battery
True but the OP had 40 in a series connection, that's up to 480 volts relative to GND which is a bit extreme but 24, 48 and 96 volts is common.

______
Rob
« Last Edit: October 20, 2011, 11:50:03 pm by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

USA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 90
I’m no expert, but I play one on the Internet…
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

FYI - I was looking up how to monitor batteries in series and happened to link to a spec sheet from Linear Technology for an IC called the LTC6802-2 - Multicell Addressable Battery Stack Monitor... 

Quote
The LTC6802-2 is a complete battery monitoring IC that includes a 12-bit ADC, a precision voltage reference, a high voltage input multiplexer and a serial interface. Each LTC6802-2 can measure 12 series connected battery cells, with a total input voltage up to 60V. The voltage on all 12 input channels can be measured within 13ms.
 
Many LTC6802-2 devices can be stacked to measure the voltage of each cell in a long battery string. Each LTC6802-2 has an individually addressable serial interface, allowing up to 16 LTC6802-2 devices to interface to one control processor and operate simultaneously.

...

The related LTC6802-1 offers a serial interface that allows the serial ports of multiple LTC6802-1 devices to be daisy chained without opto-couplers or isolators

Check it out
 
LTC6802-2 - Multicell Addressable Battery Stack Monitor:
http://www.linear.com/product/LTC6802-2

FYI -Just checked the pricing and it's not a cheap part. At qty 25 they are about $14 each from Digi-Key! In the scheme of things though maybe that's not too bad...

willnue
Logged

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

Hmmm nice chip, I'll file that one away, it may be expensive but you only need one for every 12 batteries (assuming LiON batteries).

For 12-volt wet cells you could only use it for 4 batteries so you'd need 10 of them which is not as good and still need isolation.

It looks like there's a -1 version that is designed to be daisy-chained for easy isolation.

EDIT: I think the common mode voltage for the inputs is only 5v, that would kill this chip for this application.

______
Rob

Logged

Rob Gray aka the GRAYnomad www.robgray.com

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

For anyone still interested in this, I just whipped up a schematic and started a new thread for it.

http://arduino.cc/forum/index.php/topic,79263.new.html#new

______
Rob
 
Logged

Rob Gray aka the GRAYnomad www.robgray.com

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