2 x 12 Volts Battery Serial voltage mesurement??

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
Speedy2k
Posts: 91
Joined: Mon Aug 06, 2012 5:04 am
Has thanked: 2 times
Contact:

2 x 12 Volts Battery Serial voltage mesurement??

Post by Speedy2k »

Hi! I don't know where to post this question, i have the programming part done, but i need some help on the schematic. I have 2 x 12 volts batteries in series to have 24 volts, i would like to monitor them separatly to know if one is failing faster then the other. I there any way of doing this ??

I have uploaded all i have so far, for measuring them when not connected togheter, it work perfectly, but not when in series. Thanx a lot for any help!
Attachments
Battery Monitor.zip
(34.12 KiB) Downloaded 256 times

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: 2 x 12 Volts Battery Serial voltage mesurement??

Post by Enamul »

Hi,
One way could be just by measuring string voltage i.e. 24V in one ADC channel like ADC0 and in another ADC channel like ADC1 you can measure lower battery 12V max..so you can get other battery voltage in PIC...ADC0 minus ADC1. You can easily get then which one is discharging faster..
Enamul
Enamul
University of Nottingham
enamul4mm@gmail.com

daveb0360
Posts: 139
Joined: Mon Sep 21, 2009 10:17 am
Location: Leicester
Has thanked: 35 times
Been thanked: 12 times
Contact:

Re: 2 x 12 Volts Battery Serial voltage mesurement??

Post by daveb0360 »

Hiya,
If you look at the images below, you will see a method that is straightforward as long as the measurement circuit using the pic, can float.
It relies on matched resistors for accuracy, the better the match, the better the accuracy.

Basically, the pic is powered from both batteries and the adc is connected to the centre of the two batteries. If both batteries are at even current drain and discharge equally, the centre point, will always be equal to V1+v2/2. It's independent of the actual voltage. The circuit would work with any dc voltage with proper resistor scaling.
It is important for there to be equal resistors top and bottom of the zener so that there is even current flow between the cells, that way, with a 5V zener (yes, I know they don't exist......it's just to demonstrate the concept) the adc input will be at Vz/2 or 2.5V WRT VSS. With any battery imbalance, this central measurement point will veer away from the centre point and can be measured. The current drawn by the pic will be equal between both batteries and will, therefore, not upset the balance.

A decay in the upper battery will bring about an increase in voltage measured at the centre point WRT VSS and vica versa.

It should be easy enough to understand but ask if you need any more info.

Short note...none of the resistors have been 'calculated'....it's just a demo. Also, the ground symbol is just to satisfy the simulator.

Hope this helps
Dave
Attachments
Batteries out of Balance.PNG
(35.66 KiB) Downloaded 2275 times
Batteries in balance.PNG
(35.7 KiB) Downloaded 2275 times

daveb0360
Posts: 139
Joined: Mon Sep 21, 2009 10:17 am
Location: Leicester
Has thanked: 35 times
Been thanked: 12 times
Contact:

Re: 2 x 12 Volts Battery Serial voltage mesurement??

Post by daveb0360 »

Hiya,
Just to add a note to the above schematics.
One major benefit of this type of floating circuit is that the measurements taken are ratiometric.
That is to say that if VDD is used as reference, the mid point of the measurement range will always be at 1024/2 (10bit) regardless of whether the pic is zenered to 3.3v, 5v or any other value. For the same reason, ignoring minutiae, thermal effects will also cancel out so the circuit becomes virtually immune to it's operating environment and absolutes.
For example, the batteries could both decay to 3v, 2v, 1v or any other value and as long as they do this together, in unison, the midpoint will always be 1024/2 or, at NULL. (yes, I know there would be not enough total supply to power the chip at these low levels....it's just theoretical)
The only thing to note is. Code will have to recognise that 1024/2 or 512 is in fact ZERO from the point of view of measurement. Deviations above or below this, will be the measured imbalance.

The current drawn by the pic and it's circuitry, will be shared 50/50 between the 2 cells so it can't add to any imbalance and corrupt it's own measurements.
And of course, you're also only using a single port.
I'm rambling......sorry.


Dave

Speedy2k
Posts: 91
Joined: Mon Aug 06, 2012 5:04 am
Has thanked: 2 times
Contact:

Re: 2 x 12 Volts Battery Serial voltage mesurement??

Post by Speedy2k »

Thanx Enamuel, i have tried your method and it seems to work so far, haven't got time yet to try the other one daveb0360 talked about but will do for shure!

Thanx a lot! IT is really appreciated!

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: 2 x 12 Volts Battery Serial voltage mesurement??

Post by Enamul »

Hi,
Thanks for letting us know..
Enamul
Enamul
University of Nottingham
enamul4mm@gmail.com

Post Reply