flbatt 0.3 --------------------------------------------------------------------------- News from flbatt 0.2: - Protocol to switch a (capable) charger off upon full charge detection. Full charge is now signalled by LED, Screen (VESA) and BackLight flashing, acompained by CPU consumption bursts. The current drain bursts so produced entail a precise battery voltage drop pattern, which can be detected by a simple charger controller. Upon detection, this controller switches the charger into trickle charge. Details are given in the www.agendawiki.com page "ChargerController". - After full charge, goes to sleep upon charger has turned off or trickle - Improved non-linear deltaV smoothing (less delay when it is close to 0) - Menu entries to test low-batt and flat-batt signalling - Button/menu to manually send commands to the charger controller - Menu toggle to enable/disable sound signalling (beeps) - Other minor changes in scales, etc. News from flbatt 0.1: - Close-to-Discharge / Very-Close-to-Discharge / Full-Charge detection - Red LED flashing and beepper ringing to signal the above conditions (LED and beep operation needs writting permission to /dev/console, LED flashing only works with 8.1 or newer kernels) - Awk script 'plotFlbattLogFile' to plot log-files --------------------------------------------------------------------------- Usage: flbatt [-h] [] This FlTk application can be used to monitor the charge/discharge of the the Agenda Vr3 batteries. It uses ring buffers to obtain smoothed (running averaged) values of battery Voltage and Voltage derivative. Buffer sizes are configurable by recompilation. Default values are: 2 and 5 minutes for Voltage and voltage derivative, respectively. Shows: - CPU usage in % - Charge estimate in %, according to the charge/discharge tables used - Battery instantaneous and average voltages in miliVolts - Voltage derivative (delta V) and averaged delta V in mV per minute - Elapsed time in minutes:seconds - "Delta time" in seconds: time elapsed since last AvgV change - Close-to-Discharge / Very-Close-to-Discharge / Full-Charge conditions - Red LED flashing and beepper ringing to notify the above conditions Buttons and labels: - Battery type selector (four-way button: Alk,NiCd,NiMh,Custom) - Charge/Discharge/Auto selector (three-way button + auto labels) If event is DRAG (not click) and this button is in AutoChg or AutoDis and deltaV is 0 (or small), then toggles AutoChg/AutoDis. Custom battery tables can be specified in the flbatt config file, "~/.flbatt", by including a line of the form: "battable ". Examples of tablefiles and config file are "EnergizerBatt.tbl", "GPbatt.tbl" and "dot.flbatt". If is given, the evolution of battery Voltage and Voltage derivative as a function of time will be recorded in this file. The recording period is also configurable by recompilation (default: 1 min). Tips: - To allow LED/beep signalling, login as root to the agenda and type: "chmod 666 /dev/console" and/or "chown root flbatt; chmod +s flbatt" - In order to avoid interferences from the screensaver operation, run flbatt as: "xset s off && flbatt []" - Use the awk script 'getChargeTable' to convert the log-files produced by flbatt into charge/discharge tables - Use the awk script 'plotFlbattLogFile' to plot log-files To do: - adjust for sampling period = 5 or 10 seconds (rather than 1 second) - estimate time left, both for discharge and for full charge - a "back-up" method to stop fast-charge, based on estimated left time - make/use correct Alkaline/NiCd (dis)charge tables - improve robustness in reading charge/discharge tables - use binary search for the charge look-up-table method - improve efficiency in general; use only integer arithmetic - go to sleep if level<1% More to do in the future: - daemon working in "suspended mode"; i.e., sampling by scheduled wakeups