Device customised Clap Circuit

Thread Starter

T_mothy

Joined Oct 27, 2024
4
1000127767.jpgI'm working on a clap-on clap-off circuit to control two devices: a light and a fan. The goal is to have the following functionality:

Single Clap:
The light turns on with the first clap.
The light turns off with the second clap.
Double Clap:
The fan turns on with the first double clap.
The fan turns off with the second double clap.

Requirements:
The light and fan should operate independently. For instance, if I double clap first, the fan should turn on without affecting the light.

Components Allowed:
555 Timer: To generate timing signals.
741 Op-Amp: For signal amplification.
Flip-Flops: To toggle outputs based on clap detection.
Microphone: To detect claps.
Monostable and bistable multivibrators.
Additional passive components (resistors, capacitors) and transistors to drive the devices.

Current Challenge:
I have created a circuit, but don't know whether it'll work or not. I'd like to know if there are any mistakes here.

I would appreciate guidance on how to structure this circuit effectively, considering the components allowed.
Thank you
 
Last edited by a moderator:

Ian0

Joined Aug 7, 2020
13,097
How does the circuit know, at the end of the first clap, whether it is going to be a double clap or not?
 

Tonyr1084

Joined Sep 24, 2015
9,744
Welcome to AAC.
Components Allowed:
555 Timer: To generate timing signals.
741 Op-Amp: For signal amplification.
Flip-Flops: To toggle outputs based on clap detection.
Microphone: To detect claps.
Monostable and bistable multivibrators.
Additional passive components (resistors, capacitors) and transistors to drive the devices.
Wouldn't a microcontroller be a better approach? Why are there only specific components allowed? Is this a school project or contest?
 

Tonyr1084

Joined Sep 24, 2015
9,744
"THE CLAPPER" (sold in America and maybe elsewhere) requires two claps to occur within a set time period. The first clap wakes the unit. If a second clap comes within (let's just say) one second it then switches the state of the output. If the resting output is OFF, two claps turns it ON. If it's active (ON). two claps turns it off. If you only had one clap the timer would start. But if the second clap doesn't come within that supposed one second the unit will return to sleep and not change the output.

This is why I asked about using a microcontroller. It can detect the "wake" clap and the "command" clap within a programmed time period. It can also be programmed to detect the number of claps. If it detects three or four claps it can change the output of a different IO port. It all depends on how you program it.
 

Thread Starter

T_mothy

Joined Oct 27, 2024
4
"THE CLAPPER" (sold in America and maybe elsewhere) requires two claps to occur within a set time period. The first clap wakes the unit. If a second clap comes within (let's just say) one second it then switches the state of the output. If the resting output is OFF, two claps turns it ON. If it's active (ON). two claps turns it off. If you only had one clap the timer would start. But if the second clap doesn't come within that supposed one second the unit will return to sleep and not change the output.

This is why I asked about using a microcontroller. It can detect the "wake" clap and the "command" clap within a programmed time period. It can also be programmed to detect the number of claps. If it detects three or four claps it can change the output of a different IO port. It all depends on how you program it.
This is for a project. That's why I'm not allowed to use microcontrollers
 

Thread Starter

T_mothy

Joined Oct 27, 2024
4
1000129798.jpg
I'm working on this clap-switch circuit and have already posted a question before. I've modified the circuit to toggle a motor with double claps. Here’s how it currently works:

1.A microphone receives sound, which is amplified using a BC547 transistor.

2.The amplified signal triggers a 555 timer, which outputs a pulse.

3.This pulse is sent to a D flip-flop IC, specifically the CD4013, configured to toggle the motor on or off for every double clap.

The problem I'm facing is that the circuit toggles the motor regardless of the time interval between claps. For example, if the first clap is at t=0 seconds and even if the second clap is at t=60 seconds, the motor still toggles on. I want the motor to toggle only if I clap twice within a 3-second window. If a second clap does not occur within this period, the flip-flop should reset to its initial state.

Could anyone suggest how to add this timing constraint to the circuit?
 

sghioto

Joined Dec 31, 2017
8,633
Different version using a CD4017.
Same function: 2 claps ON and 2 claps OFF
After first clap pin2 goes high and C4 begins charging through R5. After 3 seconds the charge on C4 is high enough to reset the 4017 through D1 to reset pin15.
C3 and R4 provide initial reset on power up.

1730876688404.png
 

MisterBill2

Joined Jan 23, 2018
27,164
Your circuit is simply counting the pulses. That is the problem.
What you need is for the first clap sensed to start a timer enabling the second clap to toggle only for that short time. So the first clap will trigger the first FF that resets after the time. While the first FF is triggered, it opens an "AND" gate to allow the second FF to be triggered.

Resetting the first trigger after the short time can be done with a "Flop-Shot and does not require a 555 timer IC. It is the limited time AND function that will be a challenge without a second IC foran actual AND gate.
You can implement that with a JK flipflop, like a CD4027. Or maybe not?
 
Top