# Which chip used to optimize measuring many batteries

#### hples

Joined Aug 13, 2016
5
My project is to measure 12 V voltage of a number of batteries on the same circuit and then monitor on PC.
I'm not going to design one circuit for one battery but one circuit all batteries (36 batteries expected).
This circuit must be optimized to reduce number of electronic components. I, at the beginning, intended using some MUX to multiplex 12v signal from batteries before sending to MCU. However there is no MUX with 12 v (exactly 0 V-16 V) input.
I'm finding another component to replace MUX, does anybody help me?

#### crutschow

Joined Mar 14, 2008
25,264
A 4067 16-channel analog multiplexer will work at up to 18v maximum.

You could also use a resistive divider at the mux inputs to reduce the battery voltage.

#### hples

Joined Aug 13, 2016
5
Thanks Crutschow.
For 4067 I must feed Vdd a voltage, 18 V for instance , so that i can get equivalent Vin/out (– 0.5 to Vdd + 0.5).

#### hp1729

Joined Nov 23, 2015
2,304
My project is to measure 12 V voltage of a number of batteries on the same circuit and then monitor on PC.
I'm not going to design one circuit for one battery but one circuit all batteries (36 batteries expected).
This circuit must be optimized to reduce number of electronic components. I, at the beginning, intended using some MUX to multiplex 12v signal from batteries before sending to MCU. However there is no MUX with 12 v (exactly 0 V-16 V) input.
I'm finding another component to replace MUX, does anybody help me?
Switch? Relays? Voltage dividers?

#### crutschow

Joined Mar 14, 2008
25,264
Thanks Crutschow.
For 4067 I must feed Vdd a voltage, 18 V for instance , so that i can get equivalent Vin/out (– 0.5 to Vdd + 0.5).
Yes,you need a Vdd voltage equal to the highest voltage you will be measuring but I would keep it to no more than 17V since 18V is the Absolute Maximum operating voltage.
Note that the logic voltage high input level needs to be close to Vdd so you may need a logic level translator.
How are you interfacing this to a PC?

Last edited:

#### kubeek

Joined Sep 20, 2005
5,731
Are the batteries in series?

#### hples

Joined Aug 13, 2016
5
Switch? Relays? Voltage dividers?
Switch, Relays, Voltage dividers or MUX are good solutions however i have to chose just one of them for the best solution.
As said above my project monitors voltage of batteries which are now connected to UPS in series.
My circuit compose of multiplexer, MCU, display...however I must find a multiplexer solution with optimized design in order to reduce number of component.
Do you any help?

#### hples

Joined Aug 13, 2016
5
Are the batteries in series?
Thanks Kubeek, my batteries are in series. You know batteries are connected to UPS in series.

#### crutschow

Joined Mar 14, 2008
25,264
Now I'm totally confused.
Post a diagram of exactly how all the batteries are connected, and how you want to measure them.

#### Marley

Joined Apr 4, 2016
356
I was going to say that using reed relays is a good way of multiplexing these voltage measurements. Reading down, and seeing that you are measuring a lot of batteries connected in series means you can't have a fixed 0V for your measurements.

A good way of taking isolated voltage measurements using reed relays is to use the "flying capacitor" method. Each input has a 2-pole change-over relay. When de-energised, the relays just connect a capacitor across the battery which charges to the battery voltage. When you need to measure a battery, the relay is energised (only one at a time) that disconnects the capacitor from the battery and connects it across the ADC input. Then trigger a conversion.

This way, no battery is ever directly connected to the ADC.

Normally the conversion will only take milliseconds. Depending on the input impedance of the ADC, choose a capacitor value that will hold 99% of its voltage over the conversion time. Probably 100nF or less.

See attached diagram.

#### Attachments

• 447.8 KB Views: 7

#### hples

Joined Aug 13, 2016
5
Now I'm totally confused.
Post a diagram of exactly how all the batteries are connected, and how you want to measure them.
I was going to say that using reed relays is a good way of multiplexing these voltage measurements. Reading down, and seeing that you are measuring a lot of batteries connected in series means you can't have a fixed 0V for your measurements.

A good way of taking isolated voltage measurements using reed relays is to use the "flying capacitor" method. Each input has a 2-pole change-over relay. When de-energised, the relays just connect a capacitor across the battery which charges to the battery voltage. When you need to measure a battery, the relay is energised (only one at a time) that disconnects the capacitor from the battery and connects it across the ADC input. Then trigger a conversion.

This way, no battery is ever directly connected to the ADC.

Normally the conversion will only take milliseconds. Depending on the input impedance of the ADC, choose a capacitor value that will hold 99% of its voltage over the conversion time. Probably 100nF or less.

See attached diagram.
crutschow,thanks for your detail suggestion. The relays must be controlled so that one relay closes at a time, how do you do that?

#### Marley

Joined Apr 4, 2016
356
The MCU that contains the ADC will be used to control the relays. It will:
• Energise a single relay (using I/O)
• Wait for the contacts to make and stabilise (~5ms)
• Wait for the conversion to finish
• De-energise the relay
• Wait for the contacts to open (~5ms)
• Repeat for the next relay
At some point - possibly immediately after the conversion has finished, it will send the results to the PC (serial/USB).

#### crutschow

Joined Mar 14, 2008
25,264
I agree that Marley's suggestion to use relays with a flying capacitor would seem to be the best way to measure the voltage of a number of batteries in series.
The relays should be reed type or other type with contacts designed for low current, voltage measurement ((dry contact type, not a standard power relay).

Edit: Note that you should put a small resistor in series with the capacitor to avoid a high current spike when the capacitor is connected to the battery, which could burn or weld the contacts.

Last edited:

#### Marley

Joined Apr 4, 2016
356
Note that you should put a small resistor in series with the capacitor to avoid a high current spike when the capacitor is connected to the battery, which could burn or weld the contacts.
Definitely have a small resistor in series with the capacitor. For a 12V battery, 100 ohms will limit the peak current to 120mA. Should not affect the accuracy of the reading because the input impedance of the ADC should be much higher.

Use reed relays. 2-pole changeovers are available. If you want to do a high quality job use Coto (US) or Pickering (UK).

Very topical for me, this, as I am currently for work designing an automated tester that will test 30 lithium cells in one batch (as they arrive in boxes of 30). I will be using reed relays but don't need the flying capacitor as all the cells are isolated. Got to test the whole batch in just 10 seconds!