
Sometimes I have trouble remembering to turn off the headlights. This very simple circuit was designed to sound a buzzer if the headlights are on when the key isn't in the ignition.

Normally, when the ignition is on, Q1 is turned on and clamps the base of Q2. When the headlights are off, no power is supplied to the collectors of the transistors. When the headlights are on and the ignition is off, Q1 is also off and Q2 is biased on by R2, activating the buzzer. When both headlights and ignition are on, there is current flowing through R2 and Q1. At 12V, this current is around 21mA.
Q1 and Q2 are your standard NPN transistors, 2N2222, 2N3904, 2N4401, C945, C3198, C3202, etc. Almost anything will work, as long as it has a reasonable gain. Q2 may need to be a bit larger if the buzzer has higher current draw. You can even get creative and put in some Darlington pairs, etc.
The schematic as it appears above is optimized for 12V negative ground and the most common combo switch configuration. For higher voltages, use larger resistors and an appropriate buzzer, or a voltage regulator to drop the voltage down to the rating of the buzzer you have. For positive ground, use PNP transistors instead, such as 2N3906, 2N4403, A1270, etc.
Different buzzers have different current requirements. You can attach a potentiometer in place of R2 and adjust it until the buzzer sounds correct and then measure the resistance and use that size resistor. This way you can keep the resistors as large as possible and the quiescent current as low as possible.
A good source of cheap buzzers is under the dashboards of old cars. The best buzzers come from cars made before 1990 since anything after that is more likely to have an electronic chime which may possibly be tied in to the computer system and is prettymuch useless.
All drawings were made with XCircuit
(opencircuitdesign.com/xcircuit), a platform independent, X-Windows
application.