This simple circuit will energize and de-energize a relay at the push of a button. Any type of momentary action push-to-make switch can be used. Pushing the button once - will energize the relay. And pushing it a second time - will de-energize the relay.
The green LED tells you whether the switch is on - or off. I've drawn a single-pole relay in the schematic. But you can use a multi-pole relay if it suits your application. The circuit will work at anything from 5 to 15-volts. You just need to select a relay - with a coil voltage that suits your supply.
Here - the IC is used to produce a recurring sequence of just two events - on-off-on-off
etc. In other words - the IC is only being asked to count up to two. But a single 4017 is capable of counting up to ten. So you can turn the toggle-switch into a sequential-switch - simply by moving D2 to a different output pin.
Connecting D2 to pin 7 will extend the sequence to three events. Connecting it to pin 10 will give four - pin 1 will give five etc. And you're not limited to a series of - "one after the other"
- events. It's possible to produce Complex Sequences
with events that overlap - or repeat.
Do not use the "on-board" relay to switch mains voltage. The board's layout does not offer sufficient isolation between the relay contacts and the low-voltage components. If you want to switch mains voltage - mount a suitably rated relay somewhere safe - Away From The Board
The Support Material includes a Breadboard Layout
a detailed Circuit Description
- a step-by-step Construction Guide
- details of how to Test Your Finished Circuit
- and a Free Circuit Simulation