Clap-Controlled Switch

Not rated 6,297

Circuit Image

This circuit can switch two or more devices on and off in response to a series of rapid handclaps. The claps are detected by an electret microphone and amplified by a 741 operational amplifier (IC1). IC1 is configured as an inverting amplifier, with its gain and sensitivity adjustable via a trimpot (VR1). The output from IC1 is fed into a pulse-shaping stage that uses a 555 timer (IC2). The 555 timer is set up as a monostable multivibrator, with its trigger input (pin 2) normally biased to approximately 0.4VCC by 150kΩ and 100kΩ resistors. When a sufficiently loud sound is detected, pin 2 is pulled below 1/3VCC, triggering the monostable. The output (pin 3) then swings high, causing transistor Q1 to conduct and generating a 250ms low-going pulse at the collector of Q1. The output from this pulse-shaping stage is sent to a missing-pulse detector, which is based on a second 555 timer (IC3) configured as a monostable multivibrator. This second monostable circuit features a "retrigger" function enabled by transistor Q2, which discharges the 10μF timing capacitor rapidly if a pulse arrives while the timer is active. Consequently, once triggered, IC3's output remains high as long as additional trigger pulses are received within its timing period. Pulses from Q1's collector are also directed to the clock (CP0) input of a 4017 decade counter (IC4). Initially, output 0 (pin 3) of the counter is high, illuminating LED1. The first pulse advances the count and lights LED2, indicating that the circuit is active and ready to receive a handclap "command." Each subsequent pulse (clap) increments the counter by one, provided that IC3's timing period has not expired (i.e., no claps detected for 750ms). Once this period elapses, the output (pin 3) goes low, turning off transistors Q3 and Q4. The rising voltage on the collector of transistor Q3 clocks two J-K flip-flops (IC5a and IC5b), with the resulting states at their Q outputs dependent on the states of the O2-O5 counter outputs. Given the various logic states of a J-K flip-flop, the circuit generates corresponding "commands." Finally, the rising voltage on the collector of Q4 resets the counter, preparing it for the next clap sequence. A 10nF capacitor is added between the reset input (pin 15) and ground, in conjunction with a 10kΩ resistor, to introduce a short delay in the reset signal, ensuring that the counter is not reset until after the J-K flip-flops have been clocked. This circuit can be easily expanded by incorporating additional flip-flops and counters if desired.

The circuit operates by utilizing an electret microphone to detect sound, which is then amplified by the 741 op-amp. The inverting amplifier configuration allows for sensitivity adjustments, enabling the circuit to effectively respond to varying sound levels. The pulse-shaping stage, implemented with a 555 timer in monostable mode, ensures that only significant sound events (claps) trigger the subsequent logic. The missing-pulse detector further enhances the circuit's responsiveness by allowing it to ignore brief intervals of silence, thus maintaining functionality during rapid sequences of claps.

The 4017 decade counter provides a straightforward method for counting the number of claps, with visual feedback through LEDs that indicate the current state of the circuit. The use of J-K flip-flops allows for more complex command generation, enabling the circuit to control multiple devices based on the count of handclaps received. The design also includes safety features, such as the delay in resetting the counter to prevent premature resets that could disrupt normal operation.

Overall, this circuit exemplifies a practical application of audio detection and digital logic, offering a user-friendly interface for controlling multiple devices through simple hand gestures. By integrating various components like operational amplifiers, timers, and counters, the circuit achieves a balance of sensitivity, responsiveness, and expandability, making it suitable for a range of electronic control applications.This circuit can switch two or more devices on and off in response to a series of rapid handclaps. The claps are picked up by an electret microphone and amplified by a 741 op amp (IC1). IC1 is configured as an inverting amplifier, with its gain and hence the sensitivity of the circuit adjustable via trimpot VR1. Its output is then fed into a pulse -shaping stage based on a 555 timer (IC2). The 555 is configured as a monostable multivibrator, with its trigger input (pin 2) normally biased to about 0. 4VCC by the 150kW and 100kW resistors. When a loud enough sound is detected, pin 2 will be pulled below 1/3VCC, triggering the monostable. The output (pin 3) will immediately swing high, causing transistor Q1 to conduct. The result is a 250ms low-going pulse at the collector of Q1. The output from the pulse-shaper stage is fed into a missing-pulse detector based on a second 555 timer (IC3), which is also configured as a monostable multivibrator.

However, this monostable circuit differs from the first because it includes a "retrigger" function. Retriggering is made possible by transistor Q2, which acts to rapidly discharge the 10mF timing capacitor should a pulse arrive when the timer is already running. This means that once triggered, IC3`s output will remain high as long as additional trigger pulses are received within its set timing period.

Pulses from Q1`s collector are also applied to the clock (CP0) input of a 4017 decade counter (IC4). In the initial state, output 0 (pin 3) of the counter is high, illuminating LED1. The first pulse advances the count and lights LED2, indicating that the circuit is active and ready to receive a handclap "command". Each time another pulse (clap) is received before IC3`s timing period expires, the process repeats, incrementing the counter by one.

When IC3`s timing period is allowed to expire (ie, no claps have been detected for 750ms), the output (pin 3) will go low, turning off transistors Q3 & Q4. The rising voltage on the collector of transistor Q3 clocks two J-K flipflops (IC5a & IC5b), with the result at their Q outputs dependent on the state of the O2-O5 counter outputs.

Considering all the possible logic states of a J-K flipflop, the "commands" will therefore be: Finally, the rising voltage on the collector of Q4 resets the counter, ready for the next clap sequence. Note the addition of a 10nF capacitor between the reset input (pin 15) and ground, which in conjunction with the 10kW resistor adds a short delay to the reset signal.

This ensures that the counter is not reset until after the J-K flipflops have been clocked. If desired, the circuit could easily be expanded by adding more flip-flops and counters. 🔗 External reference