I am using a micro-controller to drive a buck converter for Li-ion battery charging purpose(Micro-controller providing PWM to the buck converter). During charging the battery's current and voltage have to be constantly monitored in order to supervise charging. I have used external ADCs for monitoring the charging voltage and current.
To learn how to charge Li-Ion cells, i was going through a couple of documents. These documents tell, when to measure the battery voltage and charging current during charging. The problem is that i have read two different kind of methods in two different documents, and i am not sure which one is right and which one to follow.
1) This document by MicroChip says to measure both the voltage and current during the OFF time PWM duty cycle (when PWM is low)
This can be seen (Page. 6 "Voltage Sense" and Page. 7 "Current Sense").
2) However This document by NEC designs a battery charger, which measures the charging voltage during the OFF time PWM duty cycle and measure the charging current during the ON time PWM duty cycle.
This can be seen (page 23, 6.3 Battery Monitor, also figure 6-6: Battery Monitor) and (page 37 where the code is listed, inside the function "void do_adc_conversions (void){" it states "// measure battery current if charger output enabled... // ...otherwise measure battery voltage") .
So can anyone please tell me what is the right way to go ?
Your helpful suggestions and comments would be appreciated.
Thankyou!