Noise Detector with Automatic Recording System Using Arduino With The IoT - electronics holiday More Than Circuit and Hobby Kit

Breaking

Post Top Ad

Responsive Ads Here 1

Post Top Ad

Responsive Ads Here 2

วันพุธที่ 11 ธันวาคม พ.ศ. 2562

Noise Detector with Automatic Recording System Using Arduino With The IoT

Connection for Noise Detector with Automatic Recording System

Noise pollution is a growing problem in modern cities, thanks to rapid population growth, urbanisation and new technologies. Moreover, at times, a noisy neighbour or co-worker can drive you crazy and affect your well-being.
Talking loudly is an annoying habit in an office environment. Having a loud co-worker can distract us from our work and harm our productivity. To help solve this problem, we bring to you today a noise detector with automatic recording system. This device notifies users whenever it detects loud noise (when the sound crosses certain limits), as well as it automatically records the sound and saves this recorded sound in a file.
Change Video Language
This Noise Detector System can be used in library, office and classroom environments to identify noisy people so that necessary action can be taken against them.
To build this device, we need to first collect a few components.

Components Required

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

Coding

First, we will initialise the different variables in our code to store values and pin numbers and then include the Software Serial library. After this, we will set the Pin modes for the Arduino pins and the baud rate for Bluetooth. Following this, we will set a loop function where we will create an ‘if condition’ that checks the incoming number from Bluetooth. This number is used for setting the threshold level for noise sensor. Then the loop function jumps to other function (i.e. sensor) that collects the average sensor data (Refer Fig 1).

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

In sensor function, we will create a ‘for loop’ that collects the sensor data until the for loop ends (up to 160 times) and calculates the average of the collected data. After that an ‘if condition’ checks the average, if the average value is greater that the threshold value then it sends the value to an app that we are going to make in next part (Refer Fig 3).

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 .

App Layout for Noise Detector with Automatic Recording System
Fig 4. App Layout
Fig 5.MIT App code blocks

Connection

Now connect all the components as illustrated below (Refer Fig 6).
Arduino NanoComponents
Pin A7Sound Sensor Out
5vVCC Bluetooth & Sound sensor
GNDGND Bluetooth & Sound senor
D4RX
D3TX
D12Buzzer VCC
GNDBuzzer GND

Connection for Noise Detector with Automatic Recording System
Fig 6. Connection

Testing

Now, power the Arduino and connect the Bluetooth with your app. After successful connection, you can test it by making loud noises.  When your sound level crosses the threshold value, the Noise Detector device will buzz to notify about it and at the same time the app will start recording the sound and it will go on recording until the noise level comes down below the threshold level. (Refer Fig 7).

Working App for Noise Detector with Automatic Recording System
Fig 7. App Working

Download Source Code

ไม่มีความคิดเห็น:

แสดงความคิดเห็น

Post Top Ad

Responsive Ads Here 3