For the power supply detection circuit, I used a circuit built around a Harris Semiconductor CMOS Micropower Over/Under Voltage Detector (ICL7665S). The lead-acid battery was determined to fail at approximately 10.5 volts, so I made a resistor network which would supply the correct voltage to the ICL7665S at that voltage value: 12V battery (+) ___________________|________________ | ________|_________ | | R1 = 6.8K ohms | | V+ | > R1 | | | | < | R2 = 1M ohm | | Hyst2-----| | | | | > R2 | R3 = 140K ohms C1 --- | ICL7665S | < > R4 --- | Set2-----| < R4 = 1M ohm | | | > R3 | | | | < | C1 = 0.1uF disk | | Ground Out2 | | | | ----|--------|---| | | O = 100K Pot ----------| | O | | | | | | = Ground | | | | = | | = | | | | = ------------------------ To MAX232CPE 12V battery (-) I connected the 12V battery leads to the wearable's DC-DC converter (Datel UWR-5/3000-D5) and to the circuit as shown above. The TTL signal generated by the ICL7665S was passed to a Maxim 232CPE chip which drove appropriate RS-232 logic. From there, it went to pin 1 (DCD) on a standard 9-pin serial cable, so as not to interfere with the operation of the Twiddler keyboard on that serial port. ------------- | | R5 = 20K ohms | | R5 | | From ICL7665S ----^v^v-----T1in | | T1out------------- To Serial Cable | | Pin 1 (DCD) --------C1+ C2+-------- + | | | + | R5 = 20K ohms C2 --- | | C3 --- --- | MAX232CPE | --- C2 = C3 = C4 = C5 = | | | | C6 = 1.0 uF tantalum --------C1- C2--------- | | --------V- Vcc-------------------- +5V from converter | | | | + | C4 --- | | C5 --- C6 --- --- | | --- --- | + | | | + | | | V+-------- | = | GND | = ------|------ | | = Notes: 1. You must tie the 12-volt and 5-volt grounds together on the DC-DC converter in order to use them for voltage supplies in this circuit. 2. The 100K pot is used to tune the failing voltage set by the resistor network. For software, I used Alessandro Rubini's Powerd v. 2.0, with these changes in the default powerd.conf file: serialline /dev/cua0 monitor DCD failwhen low Kevin Pipe morgoth@media.mit.edu