View Single Post
Posts: 306 | Thanked: 566 times | Joined on Jan 2010 @ Romania
#1
Measuring battery mAh is not a true indication of health.
I propose check internal battery resistance.
Some theory:
Suppose if you have an battery charged to 3.7 V and this battery have Rint = 1 ohm. trying
to charge with 500 mA will fail because voltage drop on internal resistance will be 0.5V and
across batt conections will be 4.2 V and charger will say "enough"
when a such battery power a device and that device sink 500 mA the voltage at battery
conectors will drop 0.5V and the device will shut down. Large resistance is a bad thing
Worse, trying to charge with elevated current let say 1.2A the internal resistance will
decrease max final voltage . For ex. 200 mOhm will limit final voltage to 4.2V - 1.2A x
0.2Ohm = 3.96 V ! quite discharged battery !!

Internal resistance makes its presence felt even when battery discharge. 100 mA load, 200
mOhm resistance -> add 20 mV to cutt of voltage thus will limit swing value of battery
voltage from charged to discharged. from teoretical 1V ( 4.2 down to 3.2 ) to 4.18 - 3.22 =
0.96
For obvious reasons limiting charge current to 100 mA when battery voltage is above a limit,
is a must.
n900 final charge current is ~100 mA.

so
200 mOhm ~~ 4% wear @ 100 mA, 20 % @ 500 mA load current
500 mOhm ~~ 10 % @ 100 mA, 50% @ 500 mA
A battery with increased internal resistance can drive a wall clock but not an N900
From similar n900 battery datasheet @1300mAh the resistance of a new battery is @ 50 mOhm.

bq27200 sense resistor add 20 mOhm to this value and copper traces and few mOhm also.
Until now I have no idea about resistance of battery protection circuit
N900 consumption vary from 5mA to 300>>500 mA on heavy jobs , hostmode, high brightness,
....

Estimating wear is not a guess but not precise as we want.
Anyway, i make a script for measuring batt Rint. ( guest star bq27200 )

Attach a charger and run ( as root ) the attached code
The script is not finished! I can't find any info about r_sense resistor influence for
bq27200 voltage readings.

Code:
setbr(){
gconftool-2 -s /system/osso/dsm/display/display_brightness -t int $1
}
readbq(){
[ $(($(i2cget -y 2 0x55 0x0a))) -ge 127 ] && s="-" || s="+"
i=$s$(($( i2cget -y 2 0x55 0x14 w ) * 357 / 2 ))
v=$(($( i2cget -y 2 0x55 0x08 w)))
}
getiv(){
n=0;i0=0;v0=0
while [ $n -lt $samples ]
do
sleep 6
readbq
i0=$(($i0 + $i));v0=$(($v0 + $v))
n=$(($n+1))
done
i=$(($i0 / $samples ));v=$(($v0 / $samples))
}
[ $(cat /sys/class/i2c-adapter/i2c-1/1-0048/twl4030_usb/vbus) = 1 ] && rc=0 || rc=20
samples=5
setbr 1
sleep 3
getiv
ilow=$i
vhigh=$v
stop -q bme
/usr/sbin/i2cset -y -m 0x07 2 0x6b 0x01 0x06
setbr 5
sleep 3
getiv
ihigh=$i
vlow=$v
i=$(( $ihigh - $ilow ))
v=$((( $vhigh - $vlow ) * 1000000 ))
setbr 2
start -q bme
rint=$((( $v / $i ) - $rc ))
echo Battery Rint $rint mOhm.
__________________
Automatic speed Hostmode

Last edited by blue_led; 2012-01-09 at 23:00.
 

The Following 3 Users Say Thank You to blue_led For This Useful Post: