Decibel Sound Sensor

by konglor2021 in Circuits > Arduino

98 Views, 0 Favorites, 0 Comments

Decibel Sound Sensor

IMG_3340.jpg
IMG_3340.jpg

The motivation behind this project was to complete the individual assignment of our ME 608 class. This project revolved around the Spark fun Sound Sensor. The goal of this project is to create a device that would record sound data and convert the value into Decibel then displaying it on an LCD.

Supplies

The components used in this experiment are listed below:

-1 Spark Fun Sound Sensor

-1 Arduino Uno

-LCD Display

-Breadboard

-Potentiometer(Optional)

-Approximately 20 wires

Hardware

ME 608 Individual Project Sound Sensor.jpg
ME 608 Individual Project LCD.jpg
ME 608 Indvidual Project Hardware 1.jpg

To begin the arrangement of the hardware, plug the 5 V and the ground pins into the bottom of the breadboard so that these pins can be allocated to all other components. Then set up the LCD according the the images shown. Once the LCD is set up correctly, the optional potentiometer can be set up as well. The potentiometer will be used to change the contrast of the LCD screen as needed.

Finally the sound sensor set up is listed down below:

GND → Supply Ground

VCC → Power supply voltage between 3.5 and 5.5 Volts

Gate → Pin 2

Envelope → Connected to A0

Software

ME 608 Individual Project Codeblock 1.jpg
ME 608 Individual Project Codeblock 2 .jpg

Shown in the image is the bulk of the code. The three main sections in the code is the pre setup, the void setup, and the void loop. In the pre setup, The Liquid Crystal library is added in and all the pins float and pin values. In the void setup function, the LCD set up happens and it prints "Initializing" as a delay. In the void loop, the Decibel calculation happens and then the LCD prints the both the results of the calculation and the actual reading of the sound sensor. Going into more depth about the Decibel calculation(Line 31 to Line 52), shows that the values that read below 0 and above 1024 of the amplitude peak are thrown out as they do not contribute to accurately calculating the decibels. Line 52 show the exact calculation of the decibel.

Improvements and Conclusion

The sound sensor function well without the introduction of the LCD when just printing in Serial. Due to the sensitivity of the sound sensor, the “noise” or interference of the LCD made the sound sensor not as strong as it can be. The difficulties of this experiment come down to hardware and conversion of decibel. The sound sensor is again was sensitive and with the "noise" from the LCD display because the share the same 5 V, it makes it not too accurate. To solve this, another source like a battery pack can be used. Another solution is using a capacitor connected to the sound sensor. What this does is cancel out the extra noise(volts) that comes form the interactions with the LCD and potentiometer. Overall, this is a not to difficult project that can be fully functioning given more time input and extra components.