Sound Off: Silencing Noise Pollution with Arduino and IoT

Increasing noise levels have become a major issue in many urban areas today due to factors like population increases, urban development, and technological advancements. Moreover, excessive noise from a neighbor or colleague can seriously impact one’s well-being and quality of life.

Conversations conducted at high volumes in office settings are understandably disruptive. Having a coworker who regularly speaks loudly can undermine focus and hinder productivity for those around them. To help address noise-related disturbances in the workplace, we are introducing a noise detection and recording device. This innovative solution monitors sound levels and alerts the user whenever noise exceeds a predetermined threshold. It also automatically captures the offending sounds and saves the audio files for future review.

By objectively documenting disturbances and their sources, this new technology aims to raise awareness, encourage consideration among colleagues, and potentially resolve recurring noise complaints through respectful discussion. The goal is to foster a more conducive environment where all employees can work effectively without unnecessary distractions.

This Sound Monitoring System is suited for use in environments like libraries, offices and classrooms where focusing undivided attention is important. Its purpose is to help promote focused spaces conducive to their intended functions.

The system works to objectively identify times when sound levels exceed what is generally considered appropriate for the given setting. This data collection aims to increase awareness of how noise can impact others so minor disturbances can be addressed respectfully and productively between all parties.

To construct this solution, the following components are required:

Components Required

  • Vibration motor/ Buzzer
  • Bluetooth HC 05
  • Sound sensor module
  • Wires
  • Arduino Nano

Coding

To begin, we will declare and initialize the necessary variables to store values and pin assignments within our code. The SoftwareSerial library will then be imported to enable Bluetooth communication.

Next, the pin modes for the Arduino pins will be set and the baud rate for the Bluetooth module established.

The main program logic will be contained within a loop function. Here, we will implement a conditional statement to check the number received via Bluetooth. This number will determine the threshold level for the noise sensor.

Upon receiving the threshold input, the loop will call a separate sensor function. This function will collect an average reading from the noise sensor over time (see Figure 1). By averaging the readings, small fluctuations can be filtered out to determine if sound levels exceed the preset threshold level.

This overall flow allows dynamic setting of the sensor threshold remotely via Bluetooth while continuously monitoring sound levels within the local environment.

Fig 1. Arduino Code setting variables
Fig 2. Arduino code for reading strings from Bluetooth.

Within the sensor function, a for loop will repeatedly collect sensor readings a specified number of times (e.g. 160 iterations) to build a sample dataset.

The function will calculate the average value from this dataset. This filtering process mitigates transient fluctuations in the readings.

Next, a conditional statement will compare the calculated average to the predefined threshold level set remotely via Bluetooth.

If the average sound reading exceeds the threshold, the function will transmit the value to a companion mobile application (see Figure 3).

This app, to be developed in a subsequent step, will receive any detected exceedances of the threshold. It allows for real-time monitoring of noise levels as assessed by the sensor system against the adjustable limit.

By averaging the multiple sensor readings within the for loop, parsing them against the threshold, and communicating the results to the app, this function delivers continuous noise monitoring functionality as per our designed implementation.

Fig 3. Arduino code calculating noise level

App Making

We are going to use the MIT app inventor for creating our app. In the first part, we need to create a layout and add the following components

  • A list picker
  • A text level
  • 2 buttons
  • 1 text view
  • Sound recorder
  • Tiny DB
  • Bluetooth client

After that join the code blocks according to fig 4 .

Fig 4. App Layout
Fig 5.MIT App code blocks

Connection

Now connect all the components as illustrated below (Refer Fig 6).

Arduino Nano Components
Pin A7 Sound Sensor Out
5v VCC Bluetooth & Sound sensor
GND GND Bluetooth & Sound senor
D4 RX
D3 TX
D12 Buzzer VCC
GND Buzzer GND
Fig 6. Connection

Testing

We are now ready to power on the Arduino board and pair the Bluetooth module with the custom mobile application. Once a connection is established, testing of the system can commence.

Simple sounds at increasing volumes should be made near the sensor to intentionally cause the readings to surpass the preset threshold. When this occurs, the Noise Detector device will activate a buzzer, providing an immediate audible notification.

Simultaneously, the mobile app will begin recording the detected sound through triggering by the exceeded threshold value. Recording on the app will continue until noise levels drop back below the limit.

This demonstrates the full integrated functionality of the hardware sensor system jointly operating with the software app (see Figure 7). Remote monitoring of occurrences, durations and audio samples of exceeded noise thresholds is now possible through the combined solution.

Proper operation validates a fully functional noise monitoring prototype has been successfully developed through following the outlined design and implementation steps.

Fig 7. App Working

About The Author

Ibrar Ayyub

I am an experienced technical writer with a Master's degree in computer science from BZU Multan University. I have written for various industries, mainly home automation, and engineering. I have a clear and simple writing style and am skilled in using infographics and diagrams. I am a great researcher and is able to present information in a well-organized and logical manner.

Follow Us:
LinkedinTwitter
Scroll to Top