Reply
Thread Tools
Posts: 462 | Thanked: 550 times | Joined on Sep 2008 @ Moscow
#751
Originally Posted by pali View Post
Can you try run this script?
http://enivax.net/jk/n900/bq.tar

It show all info about battery. It use same way as bq kernel driver, but all in userspace with i2cget
Code:
[user@Nokia-N900|~/bq]sudo ./bq27200.sh 
LOOPMODE=0
Reading values...........................done.

CSOC: 0 % RSOC: 0 %
Average Current: 429 mA
TTF: 65535 minutes TTE: 0 minutes
NAC: 0 mAh CACD: 0 mAh CACT: 0 mAh 
SI: 15 mA STTE: 0 minutes
MLI: 1028 mA MLTTE: 0 minutes
AR: 0 mA ARTTE: 65535 minutes
Last Measured Discharge: 78 mAh
Cycle Count since Learning: 98 Total Cycle Count since last full reset: 98
Reported Battery Voltage: 3569 mV
Battery Gauge die Temperature: 44 C
Flags:     0x10
     Charge:0 NOACT:0 IMIN:0 CI:1 CALIP:0 VDQ:0 EDV1:0 EDVF: 0
eeprom data:
     ILMD=2056 EDVF=3000 EDV1=3248 ISLC=20
     DMF=14700 nanoVolt SD=201 thousandths of percent per day
     AGELMD=1 TAPER=102 mA
     IMLC=1028 mA
I just stopped video playback.
About 72mAh according to BME.
 
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#752
By "new battery" colin was talking about turning N900 off, replacing almost empty battery with freshly-charged one (charged externally, not in N900). He wasn't talking about new or old battery (age) AFAIK.

I understand that it's upstream module Pali and that You can't do much about it. Again, AFAIK as i know it work pretty well in notebooks etc, but for some reason doesn't work on our N900 as it should - maybe joerg_rw got more info why.

I reported it, cause - as documentation that you quoted said - charge_now and charge_full DOESN'T use charge_design to calculate value, but pull it from last know full and empty battery states, calculating uAh charged/discharged by monitoring current in given time. Technically, it works like advanced RC battery charger - with difference that RC battery charger charge/discharge with stable, given current (can change it when charging/discharging is almost done, to lower value) and measure time, with adjusting calculation when processor lower changing current for safe charge-finish.

Our N900 use different current all the time, depending on usage of device - chip act (via bq module) as super digital charger, adjusting calculations all the time, to get real uAh value. After few full charge/discharge cycles done internally on N900 (via USB charging) these values (charge_full and charge_now) should be quite correct - little lower than real battery capabilities, cause N900 discharge it only to 3,3 V.

Ho ever, in current approach, bq module reports much higher values than battery really posses (even after many cycles of charging/discharging), and i have no idea why.

Also, current_now value seems quite higher than it's really. If I got battery that i know have 1100 mAh, active usage of 200 000 uA - 300 000 uA (200-300 mAh) should drain battery in 4-5 hours. Ho ever, battery last much longer in tests. Also, as i mentioned reported values for "charge_full" and "charge_now" are higher that it should be. Mixing it with wrong current_now values, internal calculations are correct, except that higher than it should be. Higher current_now readings result in higher charge_full and charge_now values.

Maybe that 22/3570 uA value (instead of 1 uA) in kp46 was there on purpose? I wonder if current, patched bq module, just adjusted to operate at "wrong" 22/3570 uA values could provide real charge_full and charge_now data... Maybe data pulled out from chip is wrong, and that "incorrect" value put in bq was there in fact to correct it, to adjust calculations by error factor?

I would LOVE to have working charge_full and charge_now values (of course, also charge_empty), because that would allow everyone with kp to quite precisely measure real battery capacity in mAh (after calculating it from uAh), so everyone could contribute to threads like "battery test", and check if super-uber advertised battery really have it advertised capacity.

Last edited by Estel; 2011-06-20 at 22:42.
 
Posts: 270 | Thanked: 37 times | Joined on Sep 2010
#753
is it possible to add °C to
echo $(cat /sys/class/power_supply/bq27200-0/temp) | awk '{ print $1/10}'
I am not able to to this
 
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#754
Originally Posted by mr_pingu View Post
is it possible to turn BME off then, but how the bq driver does handle charging?
bq27x00 chip has nothing with charging. It reports battery status.
 
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#755
@Estel:

bq driver in kernel power v46 is old and reported bad units. it was because people who started initial support badly read (or not read) datasheet. Note that we have kernel 2.6.28 and upstream is 2.6.39.

If you are interesting in fixing bq driver you can see datasheet for our battery chip:
http://focus.ti.com/docs/prod/folder...t/bq27000.html

And also source code of our kernel driver:
http://tomoyo.sourceforge.jp/cgi-bin...7x00_battery.c

And you wrote that this driver may work on netbooks, but not on n900. Why? bq chip must be same (Do you think that TI created special battery chip for n900? With same name?). This bq chip is not for charging battery.
 
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#756
Originally Posted by iscio View Post
is it possible to add °C to
echo $(cat /sys/class/power_supply/bq27200-0/temp) | awk '{ print $1/10}'
I am not able to to this
Code:
echo $(cat /sys/class/power_supply/bq27200-0/temp) | awk '{ print $1/10, "°C"}'
 
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#757
Originally Posted by 412b View Post
Code:
...
Last Measured Discharge: 78 mAh
...
...
About 72mAh according to BME.
I think this is OK. BME and bq script reports same values. +/- 6 mAh should be OK.

Is bq kernel module reporting same values as bq script?
 
Posts: 462 | Thanked: 550 times | Joined on Sep 2008 @ Moscow
#758
Originally Posted by pali View Post
I think this is OK. BME and bq script reports same values. +/- 6 mAh should be OK.
Indeed, it was measured with a little time difference, so it was totally ok for almost empty battery, not for the charged one.

Originally Posted by pali View Post
Is bq kernel module reporting same values as bq script?
Unfortunatelly, yes, but it's wrong. I've got a fully charged battery at the moment and it still shows 78mAh, so doing full discharge/charge cycle didn't help.

I guess there should be a method to start bq learning again... Gotta read docs when get home.

Or bq isn't learning properly...

Last edited by 412b; 2011-06-21 at 14:48.
 
Posts: 270 | Thanked: 37 times | Joined on Sep 2010
#759
Originally Posted by pali View Post
Code:
echo $(cat /sys/class/power_supply/bq27200-0/temp) | awk '{ print $1/10, "°C"}'
thank you very much
 
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#760
Originally Posted by 412b View Post
Indeed, it was measured with a little time difference, so it was totally ok for almost empty battery, not for the charged one.
Ok.

Originally Posted by 412b View Post
Unfortunatelly, yes, but it's wrong. I've got a fully charged battery at the moment and it still shows 78mAh, so doing full discharge/charge cycle didn't help.
So if are same, there is no bug in kernel driver (or in script is same bug as in kernel driver if exists).

Originally Posted by 412b View Post
I guess there should be a method to start bq learning again... Gotta read docs when get home.

Or bq isn't learning properly...
So there may be bug in chip? Or I think that this chip can be configured (as written in datasheet some battery option can be configured). Could BME configure this chip to retrun "bad" values and BME monitoring bq chip and calculate its own values?
 
Reply

Tags
battery-status, bq27x00_battery, kernel, kernel-power, misiak4king, noobs-cant-read, pali4president, patches, readdirections, revolverspinyou


 
Forum Jump


All times are GMT. The time now is 18:38.