It displays the current, maximum and minimum values in decibels, and generates 3 kinds of sound pressure level versus time charts.
It uses a Fast Fourier Transform algorithm to implement a high precision A weighting filter and sophisticated digital signal processing techniques to achieve the best possible SPL readings out of your Android phone or tablet. If(!display.DeciBel is the result of a serious effort to make an Android based SPL meter as close to a professional-grade device as the phone hardware limitations allow.
Copy the code given below in that file and save it. Open your Arduino IDE and go to File > New. OLED Display Interfacing with ESP32 – Display Text, Draw shapes and Images Arduino Sketch IoT Sound Pollution Monitoring System.ESP32 OLED GND GND Vin VCC GPIO22 (I2C SDA) SCL GPIO21 (I2C SCL) SDAĪssemble the devices as shown in the schematic diagram below:Īfter installation of the libraries, restart your IDE. By default, the I2C pin in ESP32 for SDA is GPIO21, and for SCL is GPIO22. SCL of the display will be connected with the SCL pin of the module and the SDA of the display will be connected with the SDA of the module. As the OLED display requires an operating voltage in the range of 3.3-5V hence we will connect the VCC terminal with 3.3V which will be in common with the ESP32 board. The OLED display has 4 terminals which we will connect with the ESP32 board. You can use any appropriate anlog pin of ESP32. GND of both the devices will be in common. The VCC will be connected with the Vin pin from the ESP32. We will connect 3 pins of the KY-038 sound sensor module with ESP32.
Note: We will use the analog output pin for this project IoT Sound Pollution Monitoring System Circuit Diagram However, the analog output depicts the direct microphone signal as a voltage level that changes with the intensity of the sound. In our case, the digital output will be HIGH and it will be LOW when the sound will be detected. When a particular sound will be higher/lower than the threshold level, the digital output will be low/high. The potentiometer is used to adjust the sensitivity of the digital output pin. The digital output is obtained when the sound is at a particular threshold value. There are two types of outputs accessible from this sensor, both digital output and analog output. Similarly, the output of this sensor could be checked by connecting the LED or any other device at output pins.
It also consists of a potentiometer which is used for setting the sound level and by setting this sound level the output of this sound sensor module could be easily controlled. It detects the sound with the help of a microphone and then feeds this sound to processing circuitry which consists of an operational amplifier LM393. The module converts sound waves to electrical signals. The KY-038 sound sensor module consists of capacitance sensitive microphone (50Hz-10kHz) and an amplification circuit. If your IDE does not have the plugin installed you can visit the link below: Installing ESP32 library in Arduino IDE and upload code.
Additionally, you also need to install the ESP32 plugin. Thus, you should have the latest version of Arduino IDE. Best Decibel Meter Apps To Measure Noise Levels 1) Sound Meter & Noise Detector Coming in at number one we really like Sound Meter & Noise Detector. We will use Arduino IDE to program our ESP32 development board. We will require the following components for our sound pollution monitor.