I am using a lead-acid battery in a solar charging system. I am writing for an ATMEGA328 to determine the state of charge of the battery. Its my understanding that this will require a sort of data sheet for the battery cross-referencing:

Charge Percentage - Voltage - Temperature - Discharge Rate

How is this information usually passed from the manufacturer to the programmer?

Iv'e found many visual charts but what I'm really looking for is some kind of data file with a 4-dimensional array.

As mentioned already, there are a lot of factors which affect the voltage/current/state-of-charge including temperature and temperature cycling, age, number of charge-discharge cycles, storage. As far as I know, most state-of-charge monitors use some initial set points and generic values and then 'learn' the battery system they are connected to. Some good information is available from HomePower magazine here. I have also produced a basic info sheet on generic battery questions.

• Thanks for your help, do you know of any place where I can obtain 'generic values' as a starting point. And I mean in data set format not in graph (image) format? Commented Dec 11, 2012 at 17:21

I'm not sure that "lead acid battery manufacturer" really understands the term "programmer" yet ... LiPo batteries are probably better in that respect!

In any case the charge percentage includes many other factors such as its age, the number of deep cycles in its history, the length of time since it was charged (leave it fully charged for a year and its plates can "sulphate" losing capacity permanently) and so on.

So you may have to calculate for the specific battery, based on how much capacity it had last time you charged it, rather than relying on a fixed table from the manufacturer.

• Assuming I am somehow calibrating for the last full charge, how do I take that measurement? I guess maybe my question is what is a generally accepted algorithm to determine a battery's state based on its voltage? Commented Dec 11, 2012 at 15:33
• When you are charging it, measure current (in!), time, voltage, temperature. You probably need to measure all these anyway to know when to stop charging...
– user16324
Commented Dec 11, 2012 at 15:37
• So once I have that, which I do, can you recommend a table that I can use to compare my incoming data to in code? That's really what I meant in my original question Commented Dec 11, 2012 at 15:46
• Not really. I would probably use equations from the published data instead; e.g. stop charging at 2.4V/cell (with some correction for temperature) or rapid temperature rise. But the manufacturer may have better advice.
– user16324
Commented Dec 11, 2012 at 15:52