Clap Switch Circuit using IC 4017

In this 4017 project, I have explained how to make a clap switch circuit using 4017. With this clap switch, you can turn on or turn off any device with the clap.

Clap Switch Turn ON

Here I have connected a bulb with the relay. So if I clap the first time the switch will turn ON.

Clap Switch turn OFF

Now, If I clap again the switch will turn OFF. So each time I clap, the switch will change its current state.

Clap Switch Circuit Diagram

clap switch circuit diagram

How does a clap switch work?

  • At first, the clap sound sensed by the condenser mic.
  • The condenser mic converts the sound into an electric pulse.
  • Then the electric pulse amplified by the BC547 transistor.
  • After that, the electrical pulse fed to the CLK pin of CD4017 IC.
  • For each high pulse at CLK pin the state of the PIN 2 changes.
  • When the PIN 2 becomes HIGH, the second transistor turns ON.
  • If the second transistor turns ON the Relay also turns ON.
  • Now when the condenser sense the second clap sound, the next high pulse received at CLK PIN.
  • The PIN 2 changed the state (becomes LOW), so the second transistor turns OFF.
  • So the Relay turns OFF and the load connected with the relay also turns OFF.

Required Components:

  1. CD4017 IC -1no
  2. BC547 NPN transistors -2no
  3. DC Condensor Mic -1no
  4. 100nf (103) Capacitor -2no
  5. 10k Resistors -2no
  6. 270k Resistor -1no
  7. 1M Resistor -1no
  8. 220-ohm Resistors -2no
  9. 1N4007 Diode -1no
  10. LED 5mm 3volt -1no
  11. 5v SPDT Relay
  12. AC Lamp 220v/110v
  13. 5v DC supply
  14. Breadboard or PCB

Tutorial Video on Clap Switch Circuit

In this tutorial video, I have shown all the steps to make the clap switch circuit with relay to control devices.

You can order custom design PCB for different electronics project from PCBWay.

About PCBWay and their services

PCBWay not only produce FR-4 and Aluminum boards, but also advanced PCB like Rogers, HDI, Flexible and Rigid-Flex boards, with very reasonable price.
For the online instant quote page please visit –
Inspect your Gerber file before placing the order – OnlineGerberViewer

You may order as small as 5pcs of PCB from PCBWay. You can place an order as per your requirement.

You can explore different useful PCB projects from PCBWay Open-source community –

For more details please visit the following articles.
Why PCBway
PCB Capabilities
High-Quality PCB

Steps to order PCB from PCBWay

To order the PCB first visit

Step 2 to order from PCBWay

Then enter the following details:

  1. PCB Size (Length & Width) in mm & PCB quantity
  2. Select masking color for the PCB
  3. Select country and shipping method
  4. Click on the “Save to Cart” button
Step-3 to order from PCBWay

Now click on the “Add Gerber Files” to upload the PCB Gerber file.

Then click on the “Submit Order Now” to place the order.

After that they will review the Gerber file and accordingly confirm the order.

You will receive the PCB as per the shipping method you have chosen.

Testing the Clap Switch circuit

Here, I have made the circuit on a breadboard. Now before connecting the relay it is better to test the circuit. The LED should turn ON after the first clap and turn OFF after the second clap.

Clap Switch circuit on breadboard

After testing the circuit I have connected the relay and the 220V blub with the circuit. Please take proper safety precaution while working with 220V supply.

Clap Switch using 4017

Please share your feedback on this mini-project and also let me know if you have any queries.

You can also subscribe to our newsletter to receive more such useful electronics projects through email.

I hope you have liked this electronics project, Thank you for your time.