I want to give you guys updates on my findings regarding fuel gauge chip Samsung is using in our tabs.
It's MAX17042. I spend lots of time looking for datasheet but cannot find it. I found some very similar chip but still not exact. It looks like this chip was specially designed for Samsung by Maxim. So any further knowledge was derived from looking at various drivers for different Samsung devices.
Ok, looks like max17042 is utilizing combination of coulomb-counter with impedance tracking algorithm. What does it practically mean?
There is "quick start"/"quick charge estimate" software function but it's not accessible without special cable or kernel software change. If someone wants to try this I can elaborate on that more.
What can we do without any special thingy?
Tab needs to be at rest (turned off) for at least an hour when its empty and then when it charged back. This will let chip to make 2 open circuit voltage measurements.
How to make sure that tab is discharged enough for calibration to take the place? If capacity is off big time then gauge may report SOC 30% but in the fact battery is in 70%, so chip will not execute calibration procedure.
The most sure way to check this is in terminal, execute this command:
cat /sys/class/power_supply/battery/voltage_now
or through adb:
adb shell cat /sys/class/power_supply/battery/voltage_now
your good discharged start point should be anything below 3700 (3.7V). If your tab is telling that you have 0% capacity but voltage is more then 3700 then keep rebooting tab (this will refresh counter for a moment) or just boot in CWM and let tab run/sit there for some time.
Then charge it with power adapter to 100%, you can check voltage at this point - should be around 4100, usually you should be good.
Then shutdown tab for another hour or two.
That's it. You should be good now unless you are still using certain custom kernels.
PS: I have heard cases when SOC miscalculation occurred on totally stock devices, well, I have no explanation for that, but with custom kernels which allow to charge through USB cable - there is a code path to write wrong data into remaining capacity counter stored in the fuel gauge chip.
After it happens and even when you are back on stock kernel then it will take some time for the chip to slowly correct itself or you need to force recalibration outlined above.
Btw, resent custom kernel (from pershoot) does not include charging by USB functionality. Well, there is nothing wrong with that idea. It just Samsung implementation of charging algorithm is not good if such function will be allowed.
It's MAX17042. I spend lots of time looking for datasheet but cannot find it. I found some very similar chip but still not exact. It looks like this chip was specially designed for Samsung by Maxim. So any further knowledge was derived from looking at various drivers for different Samsung devices.
Ok, looks like max17042 is utilizing combination of coulomb-counter with impedance tracking algorithm. What does it practically mean?
There is "quick start"/"quick charge estimate" software function but it's not accessible without special cable or kernel software change. If someone wants to try this I can elaborate on that more.
What can we do without any special thingy?
Tab needs to be at rest (turned off) for at least an hour when its empty and then when it charged back. This will let chip to make 2 open circuit voltage measurements.
How to make sure that tab is discharged enough for calibration to take the place? If capacity is off big time then gauge may report SOC 30% but in the fact battery is in 70%, so chip will not execute calibration procedure.
The most sure way to check this is in terminal, execute this command:
cat /sys/class/power_supply/battery/voltage_now
or through adb:
adb shell cat /sys/class/power_supply/battery/voltage_now
your good discharged start point should be anything below 3700 (3.7V). If your tab is telling that you have 0% capacity but voltage is more then 3700 then keep rebooting tab (this will refresh counter for a moment) or just boot in CWM and let tab run/sit there for some time.
Then charge it with power adapter to 100%, you can check voltage at this point - should be around 4100, usually you should be good.
Then shutdown tab for another hour or two.
That's it. You should be good now unless you are still using certain custom kernels.
PS: I have heard cases when SOC miscalculation occurred on totally stock devices, well, I have no explanation for that, but with custom kernels which allow to charge through USB cable - there is a code path to write wrong data into remaining capacity counter stored in the fuel gauge chip.
After it happens and even when you are back on stock kernel then it will take some time for the chip to slowly correct itself or you need to force recalibration outlined above.
Btw, resent custom kernel (from pershoot) does not include charging by USB functionality. Well, there is nothing wrong with that idea. It just Samsung implementation of charging algorithm is not good if such function will be allowed.