Measuring Battery Voltages in Series

Hello all,

I've trying to make a simple BMS (Battery Management System). Basically read cell voltages using the ADC and have over and under voltage cut-offs.
My current situation is that I have 5 cells in series. I'm planning to use an Analog mux such as this:
Analog Multiplex 16 Channel

I can measure multiple sensors on this for sure, but I'm not able to arrive at a way to read individual cell voltages when they're in series. Is there anyway to do this?
Any suggestions/links would help greatly

Thanks :slight_smile:

What type of battery and voltage?

Weedpharma

All voltages measured will referenced to the same point, EI 0v.

The simplest thing to do is just subtract the readings from the next highest one. This does however give you less effective resolution as you go down the string.

The other thing to worry about is the voltage applied to the ADC, unless you are reading 1-volt cells you will kill the CPU and probably the 4067 MUX chip unless you precede the MUX with a voltage divider.

weedpharma:
What type of battery and voltage?

Weedpharma

The batteries are 18650 cells (INR18650-25R Samsung)

Graynomad:
The other thing to worry about is the voltage applied to the ADC, unless you are reading 1-volt cells you will kill the CPU and probably the 4067 MUX chip unless you precede the MUX with a voltage divider.

Yes Yes, the voltages would add up to massive levels by the time I come to the end of the string. Like you said Voltage divider would be most feasable.

Help me out here, Consider 3 cells in series, with each being 4V. I would have 12 V at the ADC. What resistance in series would I need to reduce it to say 4V

Why an external muxer.
Most Arduinos have enough analogue inputs (internal muxer).
Connect + of the first cell (via a 10k resistor) to A0.
Use a voltage divider for each of the remaining cells, and connect to A1, A2, A3 etc.
10k:10k for the second cell. 20k:10k for the third cell. 30k:10 for the next one, etc.
Voltage dividers drain the battery, so disconnect when not in use.
Leo..

Wawa:
Why an external muxer.
Most Arduinos have enough analogue inputs (internal muxer).
Connect + of the first cell (via a 10k resistor) to A0.
Use a voltage divider for each of the remaining cells, and connect to A1, A2, A3 etc.
10k:10k for the second cell. 20k:10k for the third cell. 30k:10 for the next one, etc.
Voltage dividers drain the battery, so disconnect when not in use.
Leo..

Hey man thanks for the advice, that looks simple, the mux was in-case if I were to go for a larger battery pack :slight_smile:

So just to clarify

R1 = 10k R2 = 0 for the first cell ?

If R2=0, Vout=0

vikramnayak:
R1 = 10k R2 = 0 for the first cell ?

R2 = infinity (open circuit) for the first cell. The 10k R1 resistor provides some protection for the input should the voltage being sensed go over the input pin's limit (due to mis-wiring, for example), but the sensed voltage is the same as the battery itself.

For the second cell R1 = R2 = 10k, for the third R1 = 20k, R2 = 10k, and so on

I'm not clear on what your R_load represents. Surely any significant load is across the battery terminals, not across R2.

Try this (forgive the crude drawing, and try a little bit lower resistance, maybe 5K6 or 4K7).

123Splat:
Try this (forgive the crude drawing, and try a little bit lower resistance, maybe 5K6 or 4K7).

Hey man, thanks, neatly laid out. Quick question, If I use 20k throughout should it make a difference, since 20k would drain lesser current off the battery

Just the same values for the voltage dividers for each cell. This makes the math way easier and you're not stuck with extra rounding errors. So a 3 cell makes a total of 3 x 4,2V = 12,6V. So lets say 13V. Using a 68k and a 39k will give more then enough range. (Or 470k and 39k if you use the 1,1V reference.) The higher the resistor values the less current draw from the batteries. But if you go higher then that it becomes a bit unstable. You could buffer it with a opamp.

There was another topic about this last month. Just try to find that :slight_smile:

Will drain less from battery, but will slow down the ATMega's ADC. Give it a shot, if it doesn't work, go to lower resistor values. Regardless of Value chosen, Ratings MUST be the same. try to match the resistance in each leg (measure a batch of resistors with a VOM or DMM and pick the four with the closest match of value).

@123Splat, your diagram does nothing else then load the batteries... There is no divider... The "to A3" is straight connected to the fourth battery so it will just see V1 + V2 + V3 + v4 = +-12V. The resistors have no use... Also, 10k is already pretty low for the adc.

septillion:
@123Splat, your diagram does nothing else then load the batteries... There is no divider... The "to A3" is straight connected to the fourth battery so it will just see V1 + V2 + V3 + v4 = +-12V. The resistors have no use... Also, 10k is already pretty low for the adc.

Yep, all in series, resistors in parallel, realised that now, would've almost burnt my 328.

Oops!

This diagram was used some time ago by another poster (forgot the name).
Upto six cells, including cell balancing. It still might need some polishing.
Leo..

Bal Charger.pdf (35.3 KB)

Holy crap, that's nice and simple :slight_smile:

You want simple, use my diagram....
You want one that works, use Leo's.

Still trying to get my feeble noggin wrapped around this one...
Best I can come up with is a separate divider at each cell junction:
V1 - to common,
v1+ to V2- junction to A0
V2+ to V3- junction to 2R of a 2R/1R divider, 2R to 1R junction to A1, bottom of 1R to common.
V3+ to V4- junction to 3R of a 3R/1R divider, 3R to 1R junction to A2, bottom of 1R to common.
V4+ to 4R of a 4R/1R divider, 4R to 1R junction to A3, bottom of 1R to common.

Does that make sense? what the heck am I missing?

It does not make sense. Draw a picture.

septillion:
There was another topic about this last month. Just try to find that :slight_smile:

Here's that other post -> Measuring multi voltages on multi cells - General Electronics - Arduino Forum

I must say I'm amazed by how often this shows up in the Arduino forums.

If the OP was happy buying the MUX IC, they might be happy just buying an LTC6804 to handle all of the measurements + balancing -> http://cds.linear.com/docs/en/datasheet/680412fb.pdf

LTC has Arduino code to perform all of the basic functions with the IC -> LTC6804-1 Datasheet and Product Info | Analog Devices