Interface Sound Sensor with Arduino, Node MCU, ESP32
and Control Devices with a Clap
These sound sensors are inexpensive, simple to use, and capable of detecting voice, claps, or door knocks.
You can use them for a variety of sound-reactive projects, such as making your lights clap-activated or monitoring your pets while you’re away.
Inside a microphone is a thin diaphragm and a backplate. Collectively, they function as a capacitor.
When you speak into the microphone, your voice generates sound waves that strike the diaphragm, causing it to vibrate.
When the diaphragm vibrates in response to sound, the plates move closer or farther apart, causing the capacitance to change. As a result, a voltage is generated across the plates, which we can measure to determine the amplitude of the sound.
The sound sensor is a small board that incorporates a microphone (50Hz-10kHz) and some processing circuitry to convert the sound wave into an electrical signal.
This electrical signal is fed to the on-board LM393 High Precision Comparator, which digitizes it and makes it available at the OUT pin.
The module includes a potentiometer for adjusting the sensitivity of the OUT signal.
You can use it to set a threshold, so that when the amplitude of the sound exceeds the threshold, the module outputs LOW, otherwise HIGH.
This setup is very useful for triggering an action when a certain threshold is reached. For example, when the amplitude of the sound exceeds a threshold (a knock is detected), you can activate a relay to control the light.
This setup is very useful for triggering an action when a certain threshold is reached. For example, when the amplitude of the sound exceeds a threshold (a knock is detected), you can activate a relay to control the light.
Rotate the knob counterclockwise to increase sensitivity and clockwise to decrease it.
The module also includes two LEDs. The Power LED illuminates when the module is turned on, and the Status LED illuminates when the sound level exceeds the threshold value.