LEAD ACID BATTERY CAPACITY MONITOR

An area to discuss 8-bit PIC specific problems and examples

Moderator: Benj

Post Reply
SILVESTROS9
Posts: 115
Joined: Wed Aug 03, 2016 10:45 pm
Has thanked: 24 times
Been thanked: 11 times
Contact:

LEAD ACID BATTERY CAPACITY MONITOR

Post by SILVESTROS9 »

Hello to all!
I would like to use ADC inputs of PIC16F1937/39 to make some measurements of battery voltage (lead acid 12V) , and display that as percentage (%), to monitor the capacity of the battery, on a LCD 4x20. I have 2 voltage limits of the battery , high=14.4V and low=11.2V. I would like to set the parameters of ADC..(0-4) macro , so that, at the low limit(11.2V) to have at LCD 0%, and at high limit(14.4V) to have 100%...I think to use an op amp before ADC input, but there is no space on PCB, so I'ii try to use ADC inputs of PIC...my problem is the resolution ...I need resolution at low-high limit window, at 1% step...how can I set parameters of ADC..(0-4) component macro , for above PIC , to have that resolution?...how can I enable the 10bit ADC module , because the ADC component macro parameters , I'm not sure , but I thinnk use 8bit byte..with that small voltage window is not possible to have 100 steps..with 10bit byte maybe is possible...Is there a code that I can add at FC7 code with c input , that enable the 10bit ADC for PIC16F1937/9 ? Thanks!

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: LEAD ACID BATTERY CAPACITY MONITOR

Post by medelec35 »

Hi SILVESTROS9,
If you use an integer variables and within component use GetInt or GetAverageInt then you should have a 10 bit range of 0 to 1023 .
As the maximum ADC will be 5V you will need to decide the PD ratio so the calculations can be worked out.

Martin
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: LEAD ACID BATTERY CAPACITY MONITOR

Post by Steve001 »

Hi SILVESTROS9

to add to martins post, are the batteries industrial? Please be aware that the capacity vs terminal voltage is not linear. this is for an industrial battery (i cannot say for Automotive or other types ). You may also need to monitor current.

You will need to get the battery data sheet and look at the discharge rates (C value's) ie C10 rate and plot the discharge against voltage for various discharge rates. Unless you can get the kt value from the manufacturer (unlikely).

Some battery manufacturers also show discharge tables. (this rate also changes with temperature)
High ambient temperatures will increase battery Ah capacity but reduce service life of the battery.
Low ambient temperatures will increase service life of the battery but reduce battery Ah capacity.

This will also change if you change the Ah rating of the battery. You could work on the terminal voltage but the reading will be incorrect.

Enersys Reserve power have some good technical information on there batteries should help you in the right direction

https://www.enersys.com/GlobalLanding.aspx

try: datasafe Hx range / SBS range / powersafe range

The wiki has examples of reading 10 & 12 bit adc values

https://www.matrixtsl.com/wikiv7/index. ... bit_sample


Steve
Success always occurs in private and failure in full view.

User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times
Contact:

Re: LEAD ACID BATTERY CAPACITY MONITOR

Post by Jay Dee »

HI, Just to throw a simple idea in...
When I've needed to do a quick and dirty measurement of 12v supply to a PIC project,
Use the 10 bit ADC reading in integer values ( as per Martins suggestion)
I used a very simple 4:1 voltage divider on the input, (using high value resistors to minimize input loading).
Thus my 5v ADC input, will accept 0-20v. For 1024 bits, you will get 0.02V resolution, which is typically fine for most battery monitoring.
I also put in zenner limiter to clamp the input voltage at around 16v. Note the limiter only starts to clamp at this voltage so you need to read the datasheet to confirm the upper clamp voltage. All very crude but works.

If you want to dive into LeadAcid and SLA battery charge/discharge also look up peukert, since this covers the available power from a battery based on how quickly you discharge it. Basically the lead-acid chemistry needs a finite time to react to the discharge demand.
J.

Post Reply