Project for monitoring battery string

Hello,

I did a search and I found some info on temperature sensors, however it wasn't even close to what I need to do. The setup will need to constantly poll 40 inputs from separate 12 volt batteries. I need the voltage sensing to pickup voltage down to the hundredths 12.xx. I also need to know temperatures on all 40 as well. I don't know how many boards it would take to do this or if there is one setup that would work.

I have just started looking at arduino boards and am excited to take on my first project! Thanks for any help in advance.....
Luke

When you say a string of batteries, do you mean they are conected in series? If so, it gets tricky, because you need to shift the signal level down from each battery to ground. You may find it helpful to use some dedicated battery monitor chips, e.g. http://www.ti.com/lit/ds/symlink/bq2019.pdf. That one is designed for around 3v, but I expect there are chips that can monitor 12v too.

Yes, this would consist of 40 - 12 volt batteries in series. I will look at those chips, any other input would be great....

What I think you need is one chip per battery (either a microcontroller or a dedicated battery monitoring chip), powered from that battery, and using opto isolators or possibly pulse transformers to pass the digital output of each chip to a microcontroller that collects all the outputs. Not ideal as a first Arduino project!

Maxim has a 1-Wire based battery monitor that provides temperature and voltage, but it looks like it only goes up to 10V. The nice thing about 1-wire devices is you can network them together over very long distances and there are already Arduino libraries to read them.

DS2438 - Smart Battery Monitor
See link to datasheet on right of page

FYI: I have purchased them before from Mouser.

willnue

Another option is to let the arduino float, like holding a multimeter, and use relays to switch each battery voltage to be measured to the arduino analog input and ground.
MAX6921 looked like an interesting chip, could replace with 24mA capable shift registers & 5V coil relays.

I know we've discussed something like this before, not sure where it was left last.

You said 12v battery - so would need voltage divider resistor to get down to 5V also.

wow, 480V relative to something..

Optical isolation sounds like a Good Idea!

Here are 8 isolated relays, for example: http://arduino-direct.com/sunshop/index.php?l=product_detail&p=156

But a better solution to me is to have each 12V battery have an arduino/equivalent powered from the 12V, measuring the voltage and temp (with a Ds18B20, say) and then driving an optoisolator from the serial port, reporting results. Then use a digital multiplexor to select 1 of 40 serial channels, wait for a valid start sequence and collect the data from each battery.

Modular, independent of how many batteries of whatever type.

??

I know we've discussed something like this before

About a 100 times :slight_smile:

I've always voted for the sort of thing terry is suggesting, independent processors powered by the battery that they are monitoring and an isolated link of some type.


Rob

Yeah, one method is probably better for stationary things and one is likely better for non-stationary objects.
Use a little 8-pin uC with and A/D, ATTiny 25/45/85, that can be powered from a simple zener limiter and drive an 6-pin optoisolator, AN425? Build up little boards with temperature controller and install onto each battery, use a promini standalone kind of board with DG406 to cycle thru them all & get the battery voltage reading.

So, what would be a good way to simplify the 'receiving' part of this, if the individual battery monitors were transmit-only to a simple optoisolator?

There could be a multiplexer to scan across the individual 40 optoisolator outputs.

But...

WhatIf the individual monitors just blindly and pseudorandomly sent a packet with a 1-byte preamble like AA , a 16-bit unique ID, 16 bit voltage and temp data, and checksum, at, say 38400 baud? That packet would take about 8 bytes, which would take 11 bits each with Parity and 1 Stop bit, so 88 bits. 88/38400= about 2 milliseconds. 1/500 of the bandwidth. So total of all the packets takes 8% of each second. Any packet with parity or checksum error is simply thrown away. A running average is kept for each battery, quite accurate if inspected every 10 seconds by a higher-level system. Just OR all the 40 channels together.

(Replacing a battery would be "noticed" by the higher-level system and a new history started for it. Each battery could have a history maintained in a database.)

??

There could be a multiplexer to scan across the individual 40 optoisolator outputs.

I don't like using a MUX, it's not really scalable.

You could reduce the packet size slightly by having a 1-byte ID.

You can reduce it even more by having an 8-bit voltage value. That doesn't really reduce the resolution because we're dealing with a reduced range voltage meter, ie 11-14v so 8 bits is still 11mV resolution.

That brings the packet size down to 6 bytes, or 156uS or .15% of the available second.

With a random retry period (say based on the 3 LSBs of the voltage reading) I'd say that's acceptable for this application.

OK I forgot the temp, so add another byte.

As I doubt batteries need to be monitored every second you could increase the odds by transmitting say every 10 seconds.

Another option...

How about daisy-chaining all the nodes, the end one (#40?) sends it's reading to #39, 39 echos 40 and add it's own reading, etc etc.

The "master" receives a 40 (or 80 if 16-bit) byte packet every second and parses it into the constituent values.

The down side? Each node has to Tx as well as Rx and two optos are needed.
The up side? Really easy protocol.


Rob

Why not use opto-isolated I2C to communicate between the master Ardiono and the battery monitors? No multiplexers needed because each battery monitor can be given a different address. Needs at least 3 optos per battery though (1 clock, 1 Tx, 1 Rx).

Alternatively, there is a 12v battery monitor chip BQ78412 data sheet, product information and support | TI.com with a UART. It looks like the device can be programmed to only transmit data when it is polled with a unique address. This would allow all the TxData lines to be or'ed after the opto isolator.

My favored solution for this one is to have a voltage to frequency converter chip on each battery and the output is opto isolated and fed back to the arduino (via some multiplexing) for conversion back into a voltage. That way you reduce the cost of each battery node.

This is not a beginners project.

there is a 12v battery monitor chip http://www.ti.com/product/bq78412#technicaldocuments with a UART.

That's a neat-looking chip, I can't find a 6v version, do you know if they have one?


Rob

I like the idea of seperate circuit on each battery talking via opto to the one after it.
Start with all listening, end board gets a message from master circuit
"Send me data"
It takes a measurement, sends to next device #2 as (0x01,string), device #2 adds its measurement, replaces (0x01) with (0x02) and adds to string, and so, end device takes it measurement and adds to string & sends to master circuit. The 0x0n tells the receiving device how many bytes are coming.

So something like this - need to check that Serial in & out is consistend for high & low, maybe use newsoft serial on the analog pins & keep SPI pins free instead.

Yep, that's exactly what I was suggesting, pity there's no UART in the small AVRs and the 2313 doesn't have an ADC I think.

That would be a very simple circuit (you have 1 pin left for the temp sensors as well).

FWIW I have the same thing (but not isolated) planned for a monitoring gadget I'm working on, albeit with slightly larger (32-bit) processors.


Rob

Stringing all the battery monitors in series as Crossroads suggests cuts down on opto isolators (which could be reduced to 1 per board), however it has the disadvantage that if one board fails, the whole string fails and you can't immediately locate the fault. Having the boards individually addressable mostly avoids this, because most failure modes of a single board won't cause the entire system to fail, they'll just cause that board to fail to respond.

1 Like

That's true, in my system I have a method to bypass a faulty node.

I think the above would be reliable enough for this application, but it is one-out-all-out. Maybe a watchdog and an error light so at least you'd know which one was faulty. The error signal could be used to hold in an analog switch/relay so a faulty node was automatically bypassed.

I guess it's a tradeoff between code and hardware simplicity. Or go back to one of the MUXed ideas, I just hate the idea of 40 wires though when 1 can do.


Rob

Anyone noticed that the OP appears to have gone away. This is possibly all too much for him.

I'm still enamored of the idea of just wire-ORing 40 open collectors from optoisolators with a receive-end minimum-but-workable pullup, and allowing the occasional collision.

I would like to be able to replace any battery and (usually, in most failure modes) keep working even if one battery monitor dies. The higher level should be able to alarm when a battery is just not heard from for a minute or so..

And the hardware is simple.

Hmmm??