Simple serial input circuit
I've been hoping to get a feature added to Frodo to allow it to be used legally in California. Basically I need to implement an automatic mechanism to disable certain features (video playback, applications, etc) when the vehicle is being driven.
Here is a simple serial port based circuit that will allow you to interface with your brake lights, ebrake switch, gear position switch or whatever you want. It only uses a single SPDT relay. Software must initialize the circuit by setting DTR high and RTS low (unless you want to use the +/-12v or +/-5v rails from your PSU). It can then read the on/off status of the relay over the DSR line. If you want the logic to work in the opposite direction, you can simply set DTR low and RTS high.
Input --- Coil ---- GND or Input --- Coil --- +V depending on what you're interfacing with.
I've tested this with a simple vb.net program and it works great. Hopefully one of the major front ends will adopt support for it (or something similar) in a future release.
BTW, if you need more inputs (upto 4), you can add more relays. The SWPole lines can be hooked up to CD,CTS, and RI also.