Arduino Loudness Monitor Project
by bettyweng_ in Circuits > Arduino
331 Views, 1 Favorites, 0 Comments
Arduino Loudness Monitor Project
This project operates Arduino Leonardo, containing a red LED, a green LED, a speaker, and a microphone for the reception of sound. When the microphone detects a volume greater than the set value, the red LED light will be activated along with the speaker, giving out a medium note to alert individuals to lower down their voices. If the volume detected is in the acceptable range, then the green LED light will light up instead.
Design Credit: https://www.instructables.com/Voice-Loudness-Moni...
Supplies
- Arduino Leonardo x 1
- Green 5V LED x 1
- Red 5V LED x 1
- 560 Ohm resistors x 2
- Jumper wires (male to male) x 11
- Breadboard x 1
- Electret microphone with MAX 4466 amplifier x 1
- Speaker x1
- USB to USB Mini B cable x 1
- USB Power Bank or 5V Power supply x 1
(All materials can be found in local hardware stores or online shops)
Connect the Two LEDs
You will need 6 jump wires, two LEDs (a red and a green one), and two Ohm resistors in this step. First, connect the anode to 5V and the cathode to GND. Then, connect: Green LED +ve to Arduino D3, Green LED -ve to the cathode, Red LED +ve to Arduino D2, and Red LED -ve to the cathode. Remember to assemble the Ohm resistors as well.
(The image provides a clearer position of each circuit.)
Connect the Microphone and the Speaker
Connect three jump wires respectively to Mic VCC (V), Mic GND (G), and Mic OUT (S). Next, connect Mic VCC to Arduino 3.3V, Mic GND to GND, and Mic OUT to Arduino A0. On the other hand, connect the speaker’s anode to D4 and the cathode to GND.
(The image provides a clearer position of each circuit.)
Coding
Download the code for this project via the link below. Most part of the code follows the original code (refer to the credit link), but this project includes an additional code to operate the speaker, which is added at the bottom of the code. First, I redefine the threshold from 40 to 55 as the average threshold of the speaker is 47. Next, the major part of the code added instructs that when LED Loud lights up, the speaker will give out a "La" note, or else LED Quiet lights up.
Make a Cover for the Device (Optional)
First, choose a box not too high but still fits the Arduino board. Second, cut a rectangular area on the box, approximately the position of your two LEDs. Then glue a piece of matte glass paper to cover the cut area from inside the box. Next, cut the shape of the microphone out in the front and cut a small rectangle on the side for the USB cable to go through. Last, decorate your box and you're finished!