Friday, November 22, 2024

Noise Detector For Silence Zone Area

Please Keep Silence! You must have seen this message written in places like library and office. But some people intentionally or unintentionally tend to make noise in such silence zone areas, disturbing the others. How about having a device that can help us maintain silence in such silence zone areasHere, in this project we are going to make a very sensitive smart noise detector that will identify loud talker and alert us by displaying red light and trigging buzzer. We can also connect this device to our phone to set its sensitivity level according to our choice.

- Advertisement -

Let’s start the project.

First, we need to have these components –

- Advertisement -

Components

  • Arduino Uno
  • Red LED bulb
  • Buzzer
  • Sound Sensor.
  • Some Jumper wires
  • Battery/ 5v Power bank
  • Bluetooth HC 05

Bill of materials

Coding

After collecting the components, we will set up the variables for storing values. Refer (Fig .1).

Fig .1 Setting variables

Then we will set up Bluetooth and I/O pin for input and output in setup function. Here, I have set up the Bluetooth baud rate with 9600 but if didn’t work you can try default baud rate 38400.

Fig 2. Arduino code setting I/O pins

After this, we have to set loop functions for running code repeatedly (Refer to Fig .3) In this loop function, we create a if()  condition that listens to Bluetooth incoming  string, then we convert that string to integer value and then set that integer value to threshold value.

Fig .3 Setting loop function.

In the next part of coding, we create a sensor () function to get sensor value (refer Fig 4). For sensor value, we take an average of several readings for detecting noise. Formula for obtaining value of sensor is

Sum of all readings/ Total number of readings taken

Here we are going to take average of 160 readings. So, the formula is

Sum of all readings / 160.

Fig 4. Arduino code sensor function.

Building App

Create a layout as in Fig below and add the following components to it

  • 2 Text level
  • 1 Text input
  • 1 List picker
  • 1 Button
Fig 5. APP layout.

Now, go to MIT App inventor coding blocks and set coding blocks according to Fig 6.You can download the whole source code and app from the link below.

Download

Fig 6. MIT APP inventor Code Blocks

Connection

Connect the components as shown in the following illustration  (refer Fig 8)

Arduino Components
GND BUZZER -VE
PIN 8 BUZZER +VE
TX BLUETOOTH RX
RX BLUETOOTH TX
5V BLUETOOOTH VCC
GND BLURTOOTH GND
PIN 13 LED +VE
GND LED -VE
5V SOUND SENSOR VCC
GND SOUND SENSOR GND
ANALOG A0 SOUND SENSOR OUTPUT

 

Fig .8 Connecting components

Now our project is complete.

Testing

Power the Arduino and open the app tap at the Bluetooth Icon and select HC 05 from the list to connect your phone to Bluetooth. Now you can see the noise level value in the text bar. When noise level reaches the threshold value, the LED light and Buzzer will automatically get triggered by Arduino. You can also set threshold value using the app. To do so, tap on the text box next to ‘send’ button and enter the value you want to add and click on the ‘send’ button to set the threshold value.

Code Download


 

Ashwini Sinha
Ashwini Sinha
A tech journalist at EFY, with hands-on expertise in electronics DIY. He has an extraordinary passion for AI, IoT, and electronics. Holder of two design records and two times winner of US-China Makers Award.

3 COMMENTS

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Electronics News

Truly Innovative Electronics

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics

×