The human ear can decipher the loudness of a sound. Also, given two sound signals of different intensities, it can distinguish the differences. But is there a device that can do the same? If you are curious about that, this article is custom-made for you. But before delving into details, know that you can create a device that can measure the sound level. Also, you don't need sophisticated components. An Arduino Uno and a few other electronic components are just enough. For a deeper understanding of the workings of a sound sensor module and how to create it, read on.
What is a Sound Sensor Module?
Arduino, DIY, and electronic components
It is a module that will detect the intensity of a sound signal. It is common in sound detection applications such as security systems, switches, and monitoring devices. Also, you can improve its ease of use by manipulating its accuracy of detection.
How does a sound sensor module work?
Audio microphone retro style
The module uses a microphone sensor to detect sound waves. In this module, the microphone has a diaphragm that changes vibrations to signals. The other critical components of the system include a peak detector and a power amplifier.
After detecting the sound, the sensor will convert it to an o/p signal. The sound then travels to a microcontroller which processes the sound.
The sensor effectively detects noise levels at a frequency range of approximately 3kHz to 6kHz. The human ear is also sensitive to sounds at this range. Hence, the sensor module perfectly replicates the working of the human ear.
Also, some Android smartphones feature a decibel meter that works similarly to a sensor module.
Sound Sensor Pin Configuration
In a sound sensor, you'll find four pins. They include the following:
- VCC pin. It is responsible for providing a power supply to the sensor. It requires a power of between 3.3V to 5V.
- GND pin- Also known as the ground. It is responsible for providing a ground connection to the sensor.
- DO pin- The digital output pin connects to the digital pin of the sensor's microcontroller.
- AO pin- The analog output pin connects to the microcontroller's analog pin.
Features and Specifications
Green printed circuit board (PCB) with components.
The features of the sound sensor module include:
- Simple to use, and it's also compatible with standard control devices.
- It will provide an analog o/p signal.
- Easily incorporates logic modules at the input of the sensor.
- Consistent with standard Digital/Analog IC.
- It requires minimum external components.
The specifications of the module are:
- Has a wide supply voltage range of 3.3V to 5V DC.
- It requires a PCB measuring 3.4cm by 1.6cm.
- Has a current operating capacity of 4~5 mA.
- The module has a voltage gain of 26 decibels.
- It features a high microphone sensitivity at 1kHz.
- The dB levels of the microphone are between 52 to 48 decibels.
- Its microphone features an impedance of 2.2k Ohms.
- The microphone has a frequency of between 16 to 20 kHz.
- The sensor has a signal-to-noise ratio of 54 decibels.
- Its induction distance is 0.5 meters.
- It uses an LM393 comparator that also features a threshold preset.
Interfacing Sound Sensor with Arduino
Microphone in the studio.
The sound sensor module will comprise a small board, a 50Hz-10kHz microphone that works with the detection sensor module.
It also features other processing circuitry external components which will change sound waves to electrical signals.
Another critical hardware component is the LM393 High Precision Comparator. The device is imperative in digitizing the electrical signals to digital output d0.
Additionally, the module will feature a built-in potentiometer to adjust the sensitivity of the digital output d0.
The following are the key components that are necessary for your sound sensor projects:
- A microphone sound sensor
- Arduino Uno
- Board LED
Differently Colored LED
- Breakout board
- A 220 Ohm resistor
- Jumper wires
Assemble the above components as shown in this illustration:
A Sound Sensor with Arduino
Hooking the hardware to the Arduino is pretty simple. First, connect the VCC pin of the sensor module to the Arduino. Make sure the VCC has a power supply of 5V. Next, click the GND pin of the sensor module to the ground.
Also, connect the digital output pin to the digital pin labeled #7 on the Arduino. Additionally, click the control pin of the module to the digital pin #8 of the Arduino Uno.
It is also imperative to ensure the relay module aligns with the AC device you want to control during assembly. It means that you need to cut the live AC line and attach one end to the COM. Next, connect the other to the NO terminal.
After assembly of the electrical components, enter the following Arduino code:
Next, clap next to the sensor's microphone. The Status LED should light up after you enter the code. If it is not responding, you can adjust the sensor by turning the potentiometer. We'll look at this process at length in the next section.
Calibrating Sound Sensor
The Sound Sensor has an in-built Potentiometer.
It will help calibrate your sound sensor to get an accurate reading from it. Note that the sensor module features a built-in potentiometer. It is helpful in the calibration of the digital output of the module.
You can also set the sensor's threshold by turning the potentiometer's knob. Once set, you will know when the sound level is beyond a particular limit. The status LED lights up when the audio output exceeds a specific group. In turn, the digital work (do) will give a low result.
Now you can start calibrating the sensor. First, clap or make some sound near the microphone. At the same time, try to adjust the potentiometer until the Status LED starts blinking. It should blink every time you clap to indicate that it is functional.
Now you have ensured that the sensor sensitivity is at the proper levels.
A Sound Sensor Module is important in Audio Devices.
- Detection of sound pollution using Solar Powered City Pollution Monitor (SPCPM).
- Applicable on a baby monitor with a sound sensor.
- Design of a dog bark tracker with a sound sensor.
- Control of USB device using sound.
- Home automation projects.
- Hearing aids.
- Telephones and audio devices.
- Radio and television broadcasting.
- Essential in speed recognition technology systems.
- Robotics applications.
- Useful in audio amplifiers.
- Imperative in sound level detection systems.
- Smartphones for sound and voice detections.
- Useful in spy circuit systems.
- Ambient sound recognition instruments.
- Home and office security systems.
A Noise Signal Illustration
You might find that your sound sensor is not functional despite getting the assemblage right. Here are some of the troubleshooting tips that will help:
- First, double-check the power supply connection. The sensor module is an analog circuit. Thus, it is susceptible to noise on the power supply. Therefore, make sure the power supply connection is clean.
- Also, check the electret microphone. It is prone to influence by wind noise and vibrations. You can protect it from such a problem by using a resilient material to mount it on the system.
- The sound sensor has a small sensing range that's approximately 10 inches. Hence, it may not detect noise at a greater than 10 inches distance. Ensure the sound is as close to the sensor for improved detection.
We have just elaborated on how you can create an inexpensive sound detection system for your home security project. The system is also easy to interface with other external components. Also, the assembly is easy to make, as you can see from the illustration we have provided above.
Now, nothing is holding you back as you go ahead with your project. But in case there is something you would like us to clarify, talk to us. We'll promptly respond to your queries in the best possible way.