add wishlist add wishlist show wishlist add compare add compare show compare preloader
Article

DIY Clap Switch using CD4017 Decade Counter IC

Let's begin with this innovative project tutorial where you will learn to make a Clap Switch circuit, which you can use in multiple devices and applications like turning on/off lights, curtain sliders, etc. It is mainly helpful for mobility impaired person. Because this circuit does not require a remote control to operate, there is no need to worry about changing batteries.

Components Required

What is CD4017 ?

The CD4017 IC is a ten-digit decade counter. It has ten outputs that represent the digits 0 through 9. Every rising clock pulse adds one to the counter. When the counter reaches 9, the next clock pulse resets it to zero. It can be used to build a circuit for chasing LEDs.
It is very common for a counter to return its output in binary form. However, the output of the decade counter in the CD4017 is decoded, which means that it will set one of the output pins (Q0 to Q9) high to correspond to the counter value. For instance, if Q3 is high, the counter value is 3.
The simplest way to build a decade counter is to connect ten D flip-flops in series to form a shift-register. The output of the last flip-flop is then connected back into the input of the first. And you connect the reset signal so that when you reset it, it sets the first flip-flop to one and the rest to zero.

This is also referred to as a ring counter. An example of a 4-bit ring counter is shown below:

The CD4017's counter circuit, on the other hand, is not a standard ring counter. Instead, it employs a technique known as a Johnson counter, which allows it to achieve the same result with only 5 flip-flops and some logic gates. LED chasers, alarms, frequency dividers, and even a music sequencer are common applications for the CD4017.

Pinout

CLK: Every time the Clock (CLK) pin goes from low to high, it adds one to the counter. As the count rises, the output pins (Q0-Q9) rise one by one. After the tenth input pulse, the counter resets and begins again at zero. To increase the counter, change this pin from low to high.

Q0-Q9: As the counter increases, the output pins Q0 to Q9 go high one by one. If you want to see the pins change states, connect them to a resistor and an LED.

Clock Inhibit (CI) pin: It deactivates the counter, causing any clock pulse on the CLK pin to be ignored. To activate the counter, set this pin to low.

Carry-out (CO) pin: When the counter reaches 10, it goes from low to high and then resets to 0. It remains high for 5 clock pulses before returning to the low state. If you want to count more than ten, connect this pin to the clock input of another decade counter.

VDD: Connect positive terminal +3V to +15V

GND: Connect negative terminal.

Working
The condenser mic initially detected the clap sound.
The sound is converted into an electric pulse by the condenser microphone.
The electric pulse is then amplified by the BC547 transistor.
The electrical pulse is then fed to the CD4017 IC's CLK pin.
The state of PIN 2 changes with each high pulse at the CLK pin.
The second transistor is turned on when PIN 2 becomes HIGH.
If the second transistor is turned on, the Relay is activated as well.
When the condenser detects the second clap, the next high pulse is received at CLK PIN.
PIN 2 changed its state (became LOW), causing the second transistor to turn off.
As a result, the relay is turned off, and the load connected to it is also turned off.
 

Circuit Diagram

Clap Switch

Leave a comment

Logo
Logo
Logo
Logo
Logo
Logo
Logo
Logo
Your Cart