0

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

Vishnu.P
  • 13
  • 1
  • 5

1 Answers1

1

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.

R. Hirur
  • 152
  • 3
  • 10
  • I am measuring the current also using a hall effect sensor. if it is a 'No' then how multimeter is reading the value? – Vishnu.P Dec 10 '15 at 08:47
  • I just need to read the voltage across battery terminal. On the user end my application will display the battery current,battery voltage, Inverter voltage(rms) and inverter current(rms). – Vishnu.P Dec 10 '15 at 08:49
  • I had built a single cell (Li-ion) charger unit (using Bq2057) the output of the charger was held at 4.2V while charging and to measure the battery capacity I had used STC3100 battery guage IC. I dont know how different it would be if you are using an inverter. And is your multi-meter "True RMS" ?http://electronics.stackexchange.com/questions/18368/what-value-does-ammeter-or-voltmeter-measures-rms-average-or-peak – R. Hirur Dec 10 '15 at 09:10
  • My device measures true rms for AC signals and it is reading properly. But whenever the battery is connected to charging and inverter circuit microcontroller is not reading any other value other than a constant voltage, say 25.6V. It is supposed to increase while charging and if I use a multimeter the voltage is increasing as it is charged. why did you use STC3100 instead of microcontroller ADC? the battery voltage will vary from 23-28 in my application. – Vishnu.P Dec 10 '15 at 09:21
  • For my application I needed very accurate capacity measurement as it also takes care of the leakage current from the battery. Any way, I take that you are using a timer to generate gating pulses for the inverter. Make sure you dont use same time base for pulse generation and ADC measurement. – R. Hirur Dec 10 '15 at 09:32
  • Thanks Hirur. No. Let me brief my connection. Inverter and battery are connected externally to my device. My device will be measuring the battery voltage using a voltage divider, battery current using hall effect sensor,inverter rms voltage, and inverter rms current. I am not controlling the charging of battery for your information. There are no control circuitry but only monitoring in my application. – Vishnu.P Dec 10 '15 at 09:42