**** BEGIN LOGGING AT Tue Apr 19 02:59:57 2022 Apr 19 15:18:41 for the purposes of linux kernel POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN for our bq27200, i'm wondering if we shouldn't report EDV1, or even EVDF? which of these do you think would be more suitable? Apr 19 15:22:17 currently none is reported, https://github.com/torvalds/linux/blob/master/drivers/power/supply/bq27xxx_battery.c#L2059-L2060 . i don't think it's particularly important, but I'm working on a patch (for handling CI=1 state a bit better), and wondered if working on MIN_DESIGN would also be useful. Apr 19 15:25:45 ah, mmm, actually i guess doing it (if i manage) is a good idea, judging by https://github.com/torvalds/linux/blob/master/drivers/power/supply/bq27xxx_battery.c#L2054-L2057 Apr 19 15:26:50 only i'm not sure between EDV1 and EDVF ... i fear EDVF might be too late for userspace programs that need to take action (e.g. upower), but EDV1 might be too soon for calibration purposes Apr 19 15:38:08 anyway, maybe i'll leave this for later. for those interested, the CI=1 patch is https://paste.debian.net/1238380/ . this opens up the possibility to *always* have a capacity value in sysfs, while making it clear that it could be inaccurate. Apr 19 15:39:26 in combination with https://gist.github.com/sicelo/0a0e895d81a6b73b26555d215dee296d , you can actually *always* have a better estimated capacity value than having to start from 2056mAh each time. That WRTNAC register/bit is a hidden gem on the bq27200 :-) Apr 19 22:07:24 sicelo: what is the exact purpose or definition of POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN ? for the BQ27k CI stuff, it's EDV1 for 1 minute or 16s or somesuch Apr 19 22:09:34 i'd say it's just extra info. it's not particularly important for bq27. kernel docs say: "VOLTAGE_MAX_DESIGN, VOLTAGE_MIN_DESIGN - design values for maximal and Apr 19 22:09:37 minimal power supply voltages. Maximal/minimal means values of voltages Apr 19 22:09:40 when battery considered "full"/"empty" at normal conditions' Apr 19 22:11:53 line44 >># bq27200 sense resistor is needed for calculations. On N900 it is 20 megOhms<< noooooo, it's MILLIohm :-D Apr 19 22:13:32 ah :-P Apr 19 22:13:36 that definition clearly says it should be EDVF Apr 19 22:14:19 :) Apr 19 22:15:00 that's a very small resistance! i actually saw datasheeting talking about milli, but i recall some discussions on irc where it was mentioned as meg Apr 19 22:15:55 nah, ~10mili is common for a sense resistance Apr 19 22:16:48 you don't want to just burn energy in it (RiĀ²) Apr 19 22:33:30 I seen a YT video yesterday where they tested a "railgun" (gaus gun, magnetic accel) with a nice handy battery they unplugged and held it to the camera >>this is the battery, it has a 3.3KILO Ampere hours<< https://youtu.be/izW1X2555Wg Apr 19 22:33:39 ;-P Apr 19 22:37:31 oops, this one https://youtu.be/eAHKS0nVlL4 Apr 19 22:41:20 3.3KAh, well, that would be one hefty battery... I wonder what is capacity of Tesla batterypack Apr 19 22:42:03 https://i.imgur.com/ELbPWxQ.png https://youtu.be/eAHKS0nVlL4?t=144 Apr 19 22:44:28 only 3 magnitudes off, milli to mega is 9 magnitudes Apr 19 22:50:38 joerg: i seem to think someone (you?) had capacity vs. voltage curve for N900/bl-5j on the wiki, but I couldn't find it on searching Apr 19 22:52:57 with my bq27200 WRTNAC find, I want to fetch design capacity from rx51_battery if we have CI=1, but this represents 100%, so I want to take a sensible portion of it (based on voltage) to decide the NAC value to write to bq27200 Apr 19 22:54:43 i know it won't be accurate, but still nicer than being too far off with 2050mAh for example, or some other random value Apr 19 23:09:18 sicelo: http://wiki.maemo.org/User:Joerg_rw/jrbme/ will give quite a number of voltage - percentage of charge tuples Apr 19 23:11:55 Hello! In past I had my own mapping table but I do not know where it is... Apr 19 23:12:32 Anyway, our open source implementation of hal-addon-bme should have something like that table. Apr 19 23:15:47 https://github.com/community-ssu/hald-addon-bme/blob/master/hald-addon-bme.c#L713 Apr 19 23:29:06 if you wanna do any more precise than +-20%, you need to factor in the discharge/charge current at the time you measure the voltage Apr 19 23:30:34 and from voltage DROP vs discharge current (like: 3.8V@0mA, 3.7V@100mA) you can calculate a mix of charge state and battery health Apr 19 23:35:13 very nice info guys! thank you :-) Apr 19 23:39:14 Pali: also thanks for your quick review. Implementing the WRTNAC stuff in kernel is way more than I can currently understand (even VOLTAGE_MIN_DESIGN looked a bit complex). But I'll look into it in the next month or two when my workload's lessened a bit :-) Apr 19 23:54:42 ok :-) **** ENDING LOGGING AT Wed Apr 20 02:59:56 2022