Continuous battery monitoring during charging as well as discharging

adcbattery-chargingpicvoltage measurement

enter image description here

My application is basically a power monitoring system in which inverter voltage(RMS),current(RMS) and battery voltage,current are measured. 24V battery is being used in the application. I am using PIC16F877A microcontroller for measuring and do the rest of the functions based on the readings. ADC code is working fine. It is measuring the battery voltage correctly if it is isolated from charging or discharging. But whenever I connect the battery to charging and inverter circuit the ADC is measuring only a constant value, in my case 25.7V even if the battery is charging. but multimeter is reading incremental voltage as battery charges.
I am using a simple voltage divider to step down the voltage to a microcontroller level voltage.I have added a 100nF cap to ADC input but didn't help. Is there anything I need to consider in circuit side or firmware side to do accurate measurement.

Thanks

Best Answer

I dont have enuf reputation to make a comment :( so i am posting this as an answer.

To get an accurate measurement of the battery capacity you also need to measure the current thru the battery. I would suggest you read about "coulomb counter".

and to your question regarding measuring battery voltage while charging using a voltage divider and ADC, I would say 'No' because you would in effect be measuring the charging voltage not the battery voltage.

Related Topic