I need some kind of sound sensing in my microcontroller project. I have a condenser microphone and some transistors around, so while prototyping I found this circuit:

Original circuit

With my parts on hand and removing the C2 cap because it didn't work, I got this working circuit:

changed circuit

However, the signal amplitude is very low, I get peaks only when clapping. The noise floor is around 225mV and my peaks are at 230mV at best. So which parts in my circuit do I have to change to get stronger peaks? Do I add another transistor or change some resistors?

Also is there a better solution for this usecase like a dedicated chip? Ideally I want something like the sparkfun sound detection modules but integrated on my own PCB.

  • 1
    \$\begingroup\$ You need to reduce your noise floor. Split R10 (in your second diagram) into two equal resistors and connect a 10 uF capacitor from the middle junction to ground. Without that, you're coupling all of your power supply noise directly into your microphone signal. \$\endgroup\$
    – Dave Tweed
    May 26, 2021 at 15:06
  • \$\begingroup\$ Christopher, are "beats" in lower frequencies? Or do you expect to look into the higher frequencies too? (Actually, I've never even thought about "beat detection" before. So you may need to train me on what that actually means.) \$\endgroup\$
    – jonk
    May 26, 2021 at 16:10
  • \$\begingroup\$ Your 3.3V supply is so low that the mic gets barely any operating voltage from your normal 10k for R10. R10 feeds an unfiltered bunch of supply noise directly at the input. The value for R11 is so high that some BC547 transistors are cutoff and do not amplify. \$\endgroup\$
    – Audioguru
    May 26, 2021 at 16:58
  • \$\begingroup\$ Am suspicious of what is meant by a noise floor of 225mV. As measured by the micro's ADC? Does this mean that a peak is 225mV above (or below) the average value? An electret microphone should be much quieter than that. @DaveTweed suggests a possible fix for that. Your BC547 amplifier is good and gives about as much gain as can be expected from a single transistor. Detecting a "beat" suggests more gain at input frequency below 20 Hz than above 500 Hz. \$\endgroup\$
    – glen_geek
    May 26, 2021 at 18:38
  • \$\begingroup\$ @jonk: Beats, at least in a musical sense, are a combination of measuring direct low-frequency energy (such as from a bass drum) and measuring the envelope associated with high-frequency energy (clapping, emphasized melody notes, rhythm guitar, etc.). \$\endgroup\$
    – Dave Tweed
    May 26, 2021 at 23:00

1 Answer 1


Reducing C6 towards 10nF will remove the bass as well as hum.

R12 must be removed for a lot more sensitivity.

Then increase R9 till you get the desired threshold from 100k to 1M

  • \$\begingroup\$ I removed R12 and replaced R9 to around 5M (is this too much?) I can detect loud claps in proximity now. Can I amplify the signal with a secont BC547? \$\endgroup\$ May 27, 2021 at 9:17
  • \$\begingroup\$ Seems like I was using a bad cap at first. I replaced it with a 70nF cap and now I'm plotting what looks like a proper waveform. Zero is at 108mV, peaks with reasonable loud music is around 6mV above that but detactable and loud clapping gets me down 30mV \$\endgroup\$ May 27, 2021 at 9:29
  • \$\begingroup\$ Also changing R9 back to around 60k gives me a wider range with Peak to Peak being ~200mV \$\endgroup\$ May 27, 2021 at 9:48
  • \$\begingroup\$ Proximity of mic, speakers, gain R and 2nd stage are all factors of sensitivity you can choose but then loading must be considered. It works now. You could even go to 10M but how sensitive do you want it? You must define all the variables. \$\endgroup\$ May 27, 2021 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.