Some of the electrically-powered additions I'm making to our FJ Cruiser draw a lot of power – enough that leaving them on accidentally could easily run down the battery. Two obvious examples: the four “headlights” I've mounted to the roof, and the 2KW inverter that I have yet to install. To be safe (with respect to the battery) I'd prefer that these devices would only have power supplied to them when the engine is running. Unfortunately there is no simple way to do this. The stock vehicle does have power wires that are active only when the ignition is turned on – but that doesn't necessarily mean that the engine is running.
So I designed and built a little circuit to solve this problem. It detects that the engine is running by sensing the battery voltage. When the engine is not running, the alternator is not running, and therefore the battery voltage will be something less than 12.8 volts. When the engine is running, the alternator is also running, and the voltage will be variable, but certainly over 13 volts (as measured in the FJ, it's generally over 14 volts. So a simple comparator circuit, com)paring the actual battery voltage to 12.9 volts, does the job quite nicely. The comparator's output drives a MOSFET relay driver, and the relay provides 30A that's on only when the engine is running. Since I was going to this trouble anyway, a minor addition also provides a separate output that is on whenever the ignition is on. This duplicates something already in the truck, but it does it with a separate relay and fuse – better than tacking it onto the stock system.
Here you see it all installed. I put a pair of LEDs on the front, more for testing than anything else. The relays are the four little cubes off to the right.
This simple little circuit provides a very clean way to power those “big draw” devices without worrying about leaving them on while the engine is off. For we ancient and forgetful ones, this is very comforting :) It was also very satisfying for me to be able to design, build, and debug an old-fashioned analog electronic circuit – it's been quite a few years since the last time I'd done that!