Clap switch project

bertus

Joined Apr 5, 2008
22,270
Hello,

What kind of microphone do you use?

Measure the DC on the microphone connection to the opamp.
You could try to change the value of R2 to mattch it with this voltage.

Bertus
 

Alec_t

Joined Sep 17, 2013
14,280
Adjustment of VR1 is critical. Have you tried that? The voltages at pins 2 and 3 of the opamp need to be very nearly the same. Which one of the two should be higher than the other may depend on the polarity of the leading edge of the microphone ouput signal.
 

RichardO

Joined May 4, 2013
2,270
Some things are missing in the circuit.
The counter needs to react to the total sound of the clap -- not the individual "tones" within the clap.

There needs to be a peak detector between the microphone and the voltage comparator. The peak detector will create a single pulse for each clap. The CD4017 can then count the number of claps. The microphone may need to be amplified some for the peak detector to work well.

To count the claps correctly, the clock input pin must have fast and clean transitions. The comparator needs some hysteresis to keep it from giving multiple output pulses for a single clap pulse.

Because the 741 op-amp is so slow, I worry that the clock input circuit of the CD4017 will oscillate during the transition. I expect that either a faster amplifier -- or better yet an actual voltage comparator part -- will be needed. In addition, the 741 or other amplifier may not output voltages close enough the power supplies of the CD4017 for it to work right.
 

AnalogKid

Joined Aug 1, 2013
10,987
Without getting into room acoustics, a clap is pretty much a unipolar positive pressure event. But it is unwise to trust that positive pressure at the microphone diaphragm equated to a positive direction output voltage change. It might be that a clap is sending the 741 input negative, so the comparator never changes state.

Your writeup does not indicate how the circuit is adjusted. When sitting quietly, is the output of the 741 high or low? As an experiment:
Meter or scope the output of the 741.
Adjust the pot until the 741 output just changes from high to low.
Clap. Any change?
Adjust the pot until the 741 output just changes from low to high.
Clap. Any change?

ak
 

GopherT

Joined Nov 23, 2012
8,009
First, change R6 to a 10k ohm resistor from 100 ohm (100 ohm allows way too much current into the transistor and may damage both the transistor and the 4017 chip).

Then, because it works when you blow, you may consider that the 4017 chip is dividing the noise impulse by 10 and, since a single clap is so short, it may be clicking one step for each clap. Does it turn on after every 10th clap or one brief flash every 1oth clap?

I do not think this is a reasonable design for a clapper. You should try a flip-flop with a peak detector instead.
 

AnalogKid

Joined Aug 1, 2013
10,987
The 4017 is wired as a toggle flipflop, and the 741 is wired as an adjustable level detector. A differentiator probably would work better, and might eliminate the need for the adjustment. The actual clapper tracks the background sound level and the amplitude of a bandwidth-limited transient channel.

ak
clapper-diagram.gif
 
Top