I needed to convert from an on/off toggle switch to a push on/push off switch with discrete components from my junk box.

Basically, the old system uses a simple on/off toggle switch: when the toggle is on, the system is on, when the toggle is off, the system is off. The new system has one of these switches where you press once to turn on, then press again once to turn off. All is 5v type environment. Searches on the internet would not understand my needs, so this is what I came up with.

Circuit explanation

When you turn on the toggle switch, the relay is activated whilst the capacitor is charging, closing the switch circuit. Once the capacitor is charged, the relay releases its pull and the switch circuit is opened.

When you turn off the toggle switch, the resistor “bleeds” the capacitor, activating the relay momentary, closing the circuit momentary.

Choice of relay, capacitor and bleed resistor varies, so I had a few goes, then when you find the suited combination, works like a charm.