top of page

Interfacing Sound Sensor with Arduino

Updated: Apr 1

Sound senor, the name itself signifies that a sound sensor is used to detect sound waves. It is very affordable and easy to interface with devices like #Arduino, nodemcu, esp8266, etc. A sound #sensor can detect voice, claps, doorknobs, loud voices, humming sounds, etc. This article covers a sketch on how to interface a sound sensor with Arduino, along with a circuit diagram, codes, and video solution.


List of components used:-


The components used for this #interfacing are a sound sensor, an Arduino board, a LED, a 1k ohm resistor, a breadboard, and jumper wires for connection purposes.

List of components
List of components

Bread Board:- A breadboard is a rectangular board with small holes in it which are used for connecting elements. The connections are not fixed and can be varied. In a breadboard, all the holes in one horizontal line are in series connection with each other. Breadboards are made from plastic and come in all shapes, sizes, and even different colors, the most common sizes are "full-size," "half-size," and "mini" breadboards.

Breadboard
Breadboard

Resistor:- A 1k resistor used in the circuit is shown below.

LED
LED

LED:- A Light Emitting Diode is a semiconductor device that emits light when current flows through it.

LED
LED

Jumper wires:- Jumper wires are used to establish a connection between different elements in the circuit and Arduino board.

Jumper Wires
Jumper Wires

Arduino Board:-Arduino Board can read inputs such as light on a sensor, a finger on a button, or a Twitter message and convert it to an output such as activating a motor, turning on an LED, publishing something online. All of this can be done by sending a set of instructions to the microcontroller on the board by the use of the Arduino programming language.


Arduino Board
Arduino Board

Sound sensor:- A sound sensor typically has 4 pins namely analog, digital, ground, and positive. For this interfacing, particularly the digital pin is taken into account. It has a microphone(the one in the silver color in the picture) installed in it, which is an electric microphone.

The microphone constitutes a thin diaphragm which is similar to an eardrum. The diaphragm is one plate of a capacitor and the second plate is a backplate. When a sound hits the microphone it leads to the vibration in the diaphragm. These vibrations change the voltage between the capacitor plate. In this way, one can measure the amplitude of the sound. This is how an electric microphone works.


The black chip in the image is an lm393 comparator to digitalize the input. Also, there is one blue box which is a built-in potentiometer used for sensitivity adjustment. The module also has two #LEDs one for power and the other for status.


Sound Sensor
Sound Sensor

Circuit Diagram


The annotation of the circuit diagram is shown below. The connections are as follows VCC of the sound sensor is connected to 5 volts of Arduino board, the ground pin is connected to the ground of the breadboard, and the digital pin is connected to the 7th pin of the Arduino board. The negative terminal of the LED is connected to the ground of the breadboard and the positive terminal of the battery is connected to one end of the 1k resistor, the other end of the resistor is connected to the 12th pin of the Arduino board.



The physical connections between the Arduino board and the breadboard are shown below.


Connection of Arduino to Breadboard
Connection of Arduino to Breadboard

The physical connection between the Arduino board, breadboard, and the sensor looks like this.


Arduino, breadboard, and sound sensor connection
Arduino, breadboard, and sound sensor connection


Code




Working


When the codes are applied to the Arduino board and a humming sound is made on the microphone, the internal structure of the sound sensor converts this analog signal to a digital one, and the LED glows. In a similar manner when again a humming sound is made the LED turns off. This project is designed in such a way that when the sound is detected and the led is off it goes on and when the led is one and sound is detected the led goes off.


Circuit view with Codes injected
Circuit view with Codes injected

A video explanation for a better understanding of the project.

Learn Electronics. (Sept 14, 2020). "Interfacing Sound Sensor with Arduino". https://www.youtube.com/watch?v=NJjKnQ_tESw


This specific #DIY interfacing deals with one of the many ways a sound senor can be used. On can also code in a different approach for making the switch ON and OFF. The sound sensor finds several applications in switches, security purposes, as well as for monitoring purposes.

 

See Also:

345 views2 comments

Related Posts

See All
bottom of page