[Openec] RFC: One-Wire-Filesystem (owfs) for charging battery on XO and openec, (long)

Frieder Ferlemann frieder.ferlemann at web.de
Tue Oct 9 14:01:14 EDT 2007


Hi Rafael,

Rafael Enrique Ortiz Guerrero schrieb:
> Hi all,
> Richard: thanks for the clarification.
> 
> frieder: some additional info can be found at
> http://wiki.laptop.org/go/Laptop_Batteries
> 
> I would need the data to do a characterization of the batteries through
> graphs,
> this characterization has to be done at different temperature scales, an
> with this graphs we could be able to determine charging values that wouldnt
> overcharge the NIMH batteries and thous not affecting the operative life.
> 
> Will be the scheduler accurate enough to do the trick?

Yes, you could set up two table entries (say number 4 and 5)
which would toggle to each other after say 50 milliseconds
(and on each toggle you'd protocol the 'is' values).
As the DS2756 has f.e. new current data about every 88ms
you won't miss much:^)

Or you'd read out an 'is' value (which contains U, I, Q, T)
and write it back as both the upper and lower limit.
As time you'd specify f.e. 1 minute so you'll be
notified on each change then (noise included:^) or
if nothing changes you'd have at least one entry per
minute.



But I would not use the scheduler...


Instead I'd use the One-Wire-Filesystem (and a bash script
or some smallish program which just does some file IO)
The bash script would open a file (with a name like
"batt_<64bit ID>_20071009T193345.txt" then do an
  echo "#Time Voltage Current Charge Temperature" >> FILE
and then periodically have a
  date >> FILE
  cat 35.000035CA0000/volt >> FILE
   ..
  cat 35.000035CA0000/temperature >> FILE


You could then feed gnuplot with that file.
Not only to produce diagrams after the complete file has been
acquired but also (with some tee / tail -f tricks)
while the file is being updated...
(Probably I can dig out something in that direction.)

Greetings,
Frieder


More information about the Openec mailing list