Grove - Sound Sensor

Made by:  Seeedstudio

What is this?

The Sound sensor module is a simple microphone. Based on the power amplifier LM386 and the electret microphone, it can be used to detect the sound strength of the environment.

Sub-assemblies

Status: Completed
Available as a part: Grove - Sound Sensor
Tags: sensor, sound sensor

Introduction

Grove - Sound Sensor can detect the sound strength of the environment. The main component of the module is a simple microphone, which is based on the LM358 amplifier and an electret microphone. This module's output is analog and can be easily sampled and tested by a Seeeduino.


Features

  • Easy to use sound sensor module
  • Provides analog output signal
  • Easily integrates with Logic modules on the input side of Grove circuits
  • Uses Standard 4-pin Grove Cables to connect to other Grove modules such as Grove Power Modules, Logic Gates and Grove - Base Shield


Specifications

  • Operating voltage range: 4-12V
  • Operating current (Vcc=5V): 4-8mA
  • Voltage Gain (VS=6V, f=1 kHz): 26dB
  • Microphone sensitivity (1Khz): 52-48dB
  • Microphone Impedance: 2.2KΩ
  • Microphone Frequency: 16-20Khz
  • Microphone S/N ratio: 54dB


Usage

Standalone

Follow these steps to build a sample Grove circuit using this module but without using any microcontroller board:

  1. Connect the sound sensor module to the input side of your circuit (to the left of the power module). On the output side of the circuit, you may use a range of User Interface modules (Grove - Red LED, Grove - LED String Light, Grove - Mini Fan, Grove - Buzzer, Grove - Recorder etc.)
  2. Power up the circuit when complete.
  3. The sound sensor module can now be used to trigger an output. For example:
  • When used in conjunction with a Grove - Red LED output module, observe that the LED turns ON when the sound sensor detects audio and turns off in silence. The same behavior can be seen when the sound sensor is used with the Grove - LED String Light module - when there is sound, the lights will turn ON, and when there is silence, the lights will turn OFF.
  • Add a Grove - NOT module between the sound sensor and the power module to reverse the logic that triggers the LEDs on the Grove - Red LED or Grove - LED String Light modules. With the addition of the Logical NOT gate on the input side, you should see that the LEDs remain OFF when sound or music is detected, and turn ON when there is silence. 

You can use either the Grove - USB Power module or the Grove - DC Jack Power module for building this Grove circuit.

With Arduino

Follow these simple steps to build a Grove circuit using the light sensor:

  1. When using the module in conjunction with an Arduino or a Seeeduino, use the Grove - Base Shield and connect the Grove - Sound Sensor module to the shield using a designated Grove Interface. Also attach an output module such as a Grove - LED or Grove - Red LED which will get triggered based on input received from the sound sensor (shown below).
    Sound LEDjpg
  2. Upload the following sample sketch to make the LED turn ON and OFF based on input from the sound sensor:
// Function: If the sound sensor senses a sound that is up to the threshold you set in the code, the LED is on for 200ms.
// Hardware: Grove - Sound Sensor, Grove - LED
/*macro definitions of the sound sensor and the LED*/
#define SOUND_SENSOR A0
#define LED 3      // the number of the LED pin
#define THRESHOLD_VALUE 400//The threshold to turn the led on 400.00*5/1024 = 1.95v
void setup() 
{
    Serial.begin(9600);
    pins_init();
}
void loop() 
{
	int sensorValue = analogRead(SOUND_SENSOR);//use A0 to read the electrical signal
	Serial.print("sensorValue ");
        Serial.println(sensorValue);
        if(sensorValue > THRESHOLD_VALUE)
	{
		turnOnLED();//if the value read from A0 is larger than 400,then light the LED
		delay(200);
	}
	turnOffLED();
}
void pins_init()
{
	pinMode(LED, OUTPUT);
	pinMode(SOUND_SENSOR, INPUT); 
}
void turnOnLED()
{
	digitalWrite(LED,HIGH);
}
void turnOffLED()
{
	digitalWrite(LED,LOW);
}
If the sound of the environment is greater than the threshold, then the LED will light up.


Availability

This Grove module is available as part of the following Grove Kit Series:

  • Grove Mixer Pack V2
  • Grove - Mixer Pack
  • Grove - Toy Kit

Alternatively, it can be bought stand-alone here at the Seeed Studio Bazaar.


Resources


File name Annotation
No files
No insights.

Comments

Loading comments. Hold tight.