Monday, February 17, 2014

High Sensitivity Arduino Sound Level Detector

Generally we want to sense the environment when something interesting is occurring. Sometimes the presence of sound is indicative of an interesting activity. If we can detect sound level we can trigger a sensing activity to capture information about the activity of interest. I have posted a short video of this simple high sensitivity Arduino sound level detector working.

In this project we use an Arduino Uno, an electret microphone and an LM358 dual operational amplifier to create a simple sound level detector. The signal from the mic is amplified by the one side of the LM358 with a gain of approximately 221 (see op-amp wiki) as defined by the 220k feedback resistor and the 1k pull down resistor connected to the negative input of the LM258 amplifier. The output of the first stage amplifier provides input to the other side of the LM358 used as a comparator. The triggering threshold of the comparator is controlled using the potentiometer. When the audio signal from the first amp exceeds the triggering threshold the comparator sends a digital '1' to the Arduino Uno on pin 8. When the Uno detects the sound level high input it turns an LED on. You can see a schematic diagram of the sound detection part of the circuit below.

Prototyping this on a breadboard looks something like this:

The actual breadboard prototype appears below:

... and the simple sketch I used to drive the Arduino Uno appears below:

I include the sketch code below if you'd like to try it out yourself:


void setup(){

void loop(){
    digitalWrite(LED_DIGITAL_OUT_PIN, HIGH);
    delay(50); // delay long enough for you to see the LED on
  else {
    digitalWrite(LED_DIGITAL_OUT_PIN, LOW);

Stay tuned for projects that receive the sound detection as input and use it to drive other interesting activities. Have fun. Feel free to share below if you built something cool with this, or have some ideas for enhancements.

You may also be interested in a high sensitivity vibration sensor using the Arduino Uno.

Note: if you notice your output locking in on state try lowering the feedback resistor of the op-amp from 220k to something lower, for example 160k.

If you are interested in how this type of sensor can be integrated into a broader solution that includes notification of detected sound level on a users Android phone see Detect Intrusion with Passive Infrared, Sound, or Vibration


  1. Hello,

    Do you know the sensitivity of your sound level/microphone? I am trying to build an SPL monitor with a sensitivity of at least 1dB.


    1. This comment has been removed by the author.

    2. Hi Victoria, I haven't measured. However with this circuit in all applications I have done the highest sensitivity is too sensitive and needs to be reduced. Have fun.