Lead Acid battery monitoring

Hello,

I want to monitor the level of Lead acid batteries in our Solar vehicle

The solar panels intermittently charge the batteries, ie they are always wired for charging but voltage fluctuates a bit i guess because the car will be moving and angle of incidence of sunlight changes

The battery is being discharged by the BLDC

I want to know the exact or appropriate filter for filtering out charging and discharging voltages and read the battery voltage

i can read the voltage directly with arduino analog pin but the battery level may not be correct as the voltage fluctuates because of charging and i will end up with a false battery level

Divide down the voltage to be monitored into the 1.1V range and set Aref to use the internal 1.1V reference. Similarly, try the 3.3V available onboard. Have read here that 1.1V varies a lot tho. Or add an external reference: 3V http://www.digikey.com/product-search/en?vendor=0&keywords=ref193 4.5V http://www.digikey.com/product-search/en/integrated-circuits-ics?k=ref194

CrossRoads: Have read here that 1.1V varies a lot tho.

If it does then you've got big problems in your circuitry...that voltage is designed to be stable.

It's spec'ed at 1Vmin to 1.2Vmax:

Internal reference voltages of nominally 1.1V or AVCC are provided On-chip.

VBG Bandgap reference voltage VCC=2.7 TA=25°C min 1.0 typ 1.1 max 1.2 V

That's 20% variation.

fungus:

CrossRoads: Have read here that 1.1V varies a lot tho.

If it does then you've got big problems in your circuitry...that voltage is designed to be stable.

CrossRoads is correct. It does vary significantly. From processor to processor it can vary by as much as 0.2 volts.

You are correct. For any one processor the voltage is very stable.

Stable at one temperature maybe. I wouldn't be surprised if it varied with temperature tho. That would seem normal being used in a vehicle.

kiriti:
Hello,

I want to monitor the level of Lead acid batteries in our Solar vehicle

The solar panels intermittently charge the batteries, ie they are always wired for charging but voltage fluctuates a bit i guess because the car will be moving and angle of incidence of sunlight changes

The battery is being discharged by the BLDC

I want to know the exact or appropriate filter for filtering out charging and discharging voltages and read the battery voltage

i can read the voltage directly with arduino analog pin but the battery level may not be correct as the voltage fluctuates because of charging and i will end up with a false battery level

There are two distinctly different things you need to worry about.

#1 is your voltage REFERENCE. The analog voltage reading you get is referenced to either the Arduino supply voltage (5 volts) or an internal reference inside the AVR chip (selected by using the “analogReference()” function). The Arduino has a built in 5 volt regulator, so having a stable power supply (i.e. a stable reference) should not be a problem.

#2 is rapid fluctuations in your battery voltage. To filter those out, the easiest thing to do is average a lot of readings. You can do something like this:

#define average 1000;
uint16_t x;
uint32_t accumulator = 0;
for (x = 0; x < average; x++) {
    accumulator += analogRead (YOUR_PORT);
}
return (accumulator / average);

To average over longer time periods, either increase the “average” define or add a small delay inside the loop. Just be sure that the number of times you sample doesn’t overflow the accumulator.

The technique of digital averaging works very well, is easily “adjustable” and doesn’t require any external “filtering” components.

Lastly, if you are connecting your A/D input to a lead acid battery, and if you are in an electrically hostile environment, you would be wise to use a pair of diodes to clamp the A/D inputs between VCC and GND, and also place a small capacitor across the A/D input and GND to filter out any short duration high voltage spikes.

Hope this helps.

Apart from all the above the voltage level of a lead-acid battery has very little to do with it's state of charge unless the batteries have been rested for quite some time. So I'm not sure what you will gain from the project.


Rob