edit

Grove - Loudness Sensor

The Grove - Loudness Sensor is designed to detect the sound of environment. Based on LM2904 amplifier and a built-in microphone, it amplifies and filters the high frequency signal that received from the microphone, and outputs a positive envelop. This is used for Arduino’s signal acquisition. The output value depends on the level of sound input. In order to avoid unnecessary signal disturbances, input signal will go through two times’ filtering inside the module. There is a screw potentiometer that enables manual adjustments to the output gain.

Version

Product Version Changes Released Date
Grove-Loudness Sensor V0.9b Initial Dec 2012

Features

  • Grove Interface
  • Easy to use
  • Basic Grove element

Tip

More details about Grove modules please refer to Grove System

Specifications

Parameter Value/Range
Voltage 3.5~10 VDC
Working Frequency 50~2000 Hz
Sensitivity -48~66 dB
Signal-to-noise Ratio >58 dB
Output Signal range Analog Signal (0-1023)

Platforms Supported

Arduino Raspberry Pi BeagleBone Wio LinkIt ONE

Caution

The platforms mentioned above as supported is/are an indication of the module's hardware or theoritical compatibility. We only provide software library or code examples for Arduino platform in most cases. It is not possible to provide software library / demo code for all possible MCU platforms. Hence, users have to write their own software library.

Getting Started

Note

If this is the first time you work with Arduino, we firmly recommend you to see Getting Started with Arduino before the start.

Play With Arduino

Hardware

  • Step 1. Prepare the below stuffs:
Seeeduino V4.2 Base Shield Grove-Loudness Sensor
enter image description here enter image description here enter image description here
Get One Now Get One Now Get One Now
  • Step 2. Connect Grove-Loudness Sensor to A0 port of Grove-Base Shield.
  • Step 3. Plug Grove - Base Shield into Seeeduino.
  • Step 4. Connect Seeeduino to PC via a USB cable.

Note

If we don't have Grove Base Shield, We also can directly connect Grove-Loudness Sensor to Seeeduino as below.

Seeeduino Grove-Loudness Sensor
5V Red
GND Black
NC White
A0 Yellow

Software

  • Step 1. Please copy below code to Arduio IDE and upload to arduino. If you do not know how to upload the code, please check how to upload code.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
int loudness;

void setup()
{
    Serial.begin(9600);
}

void loop()
{
    loudness = analogRead(0);
    Serial.println(loudness);
    delay(200);
}
  • Step 2. Open the serial to monitor the output. It will be a significant change when blow to the sensor.

Play With Raspberry Pi

Hardware

  • Step 1. Prepare the below stuffs:
Raspberry pi GrovePi_Plus Grove-Loudness Sensor
enter image description here enter image description here enter image description here
Get One Now Get One Now Get One Now
  • Step 2. Plug the GrovePi_Plus into Raspberry.
  • Step 3. Connect Grove-Loudness Sensor to A0 port of GrovePi_Plus.
  • Step 4. Connect the Raspberry to PC through USB cable.

Software

  • Step 1. Follow Setting Software to configure the development environment.
  • Step 2. Git clone the Github repository.
1
2
cd ~
git clone https://github.com/DexterInd/GrovePi.git
  • Step 3. Excute below commands to monitor the loudness.
1
2
cd ~/GrovePi/Software/Python
python grove_loudness_sensor.py

Here is the grove_loudness_sensor.py code.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
import time
import grovepi

# Connect the Grove Loudness Sensor to analog port A0
# SIG,NC,VCC,GND
loudness_sensor = 0

while True:
    try:
        # Read the sound level
        sensor_value = grovepi.analogRead(loudness_sensor)

        print("sensor_value = %d" %sensor_value)
        time.sleep(.5)

    except IOError:
        print ("Error")
  • Step 4. We will see the loudness status as below.
1
2
3
4
5
6
7
pi@raspberrypi:~/GrovePi/Software/Python $ python grove_loudness_sensor.py
sensor_value = 135
sensor_value = 23
sensor_value = 196
sensor_value = 258
sensor_value = 98
sensor_value = 131

FAQ

  • Q1: What is the difference between Grove-Loudness sensor and Grove - Sound Sensor?
    • A1: The Grove-Loudness sensor have screw potentiometer to adjust the output gain.

Resources

Projects

Solar Powered Environmental Monitoring Kit: A solar-powered open source kit for monitoring air quality, sound level, humidity, and temperature.

The Da Vinci Code: The work combines art and electronics. The art part makes the skeleton and consists of 11 layers of medium density fiberboard.

Tech Support

Please submit any technical issue into our forum.