Re: [POWER] battery calibration parameters from sysfs



On Sun, Dec 13, 2009 at 02:24:14PM +0100, Pavel Machek wrote:

actual charger hardware. My main concern here is that battery
performance monitoring has no pressing need to be in kernel and that
pushing it into the kernel creates a barrier to implementing more
advanced schemes in userspace, which is especially serious given how
involved this needs to be in order to be accurate.

Well, kernel provides /proc/apm emulation and many systems still rely
on it. So it would be nice to provide something halfway-decent there.

Unfortunately that's really painful in kernel since you really need to
do state tracking over reboots, and even if you do that it's really
not trivial.

Plus you need to shutdown/suspend machine on battery critical. That
has to be in kernel and already needs those tricky parts.

Power failure detection based on voltage drop is much more reasonable
but it's a very different thing to general battery capacity estimation.

Normally you'd want to do the power failure detection separately anyway,
monitoring the system supply voltage rather than the battery voltage.
Supply failure is not only an issue in battery operation, it's also an
issue for example in systems systems powered over USB which may be
drawing more than the 500mA that USB delivers and need to supplement the
USB supply with the battery.

I'm not sure how familiar you are with the issues surrounding trying to
do a voltage to charge mapping for a battery but it's much more complex
than a simple table if you want to get it accurate. There's a lot
of

Well... current zaurus kernels use _huge_ table that maps voltage to
battery %... and that table is linear function :-(.

Do you have some papers on that?

Something like "Measure Battery Capacity Precisely in Medical Design"
by Bernd Krafthoefer in Power Electronics Technology Jan 2005 might be
useful here.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [POWER] battery calibration parameters from sysfs
    ... pushing it into the kernel creates a barrier to implementing more ... advanced schemes in userspace, which is especially serious given how ... beyond "battery %age is linear function of measured battery voltage". ...
    (Linux-Kernel)
  • Re: Help! My PC wont switch on.
    ... I did not say what the battery voltage is because battery can vary ... for each motherboard. ... That means battery voltage would be well below 2.8 volts (often well ... Would you advise measuring voltages rather then plugging the PSU into a PSU ...
    (uk.comp.misc)
  • Re: Rechargable batteries and information
    ... residual power is non-linear, and the residual power inside the battery ... - whatever type it is - is not related to the voltage between the dipoles. ... Central to this strategy of monitoring state of charge is the per cell ...
    (uk.tech.digital-tv)
  • Re: House Batteries
    ... First we need to go back into history and look at alternator outputs. ... When considering charging circuits 0.1 volt difference in charging voltage ... voltdrop on the circuit has a bad effect on battery charging. ...
    (uk.rec.sailing)
  • Re: Charge 2 x 6V on 12V Charger
    ... One could use MOSFET body diodes to steer the ... seen cheap spade sockets soldered to the PCB in some battery ... mosfet's diode into the low voltage battery. ... mains voltage to increase billable power sales -- corruption? ...
    (sci.electronics.design)