Arduino Loudness Monitor Project

by bettyweng_ in Circuits > Arduino

331 Views, 1 Favorites, 0 Comments

Arduino Loudness Monitor Project

螢幕快照 2021-04-17 下午11.01.05.png
螢幕快照 2021-04-17 下午11.01.46.png

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

  1. Arduino Leonardo x 1
  2. Green 5V LED x 1
  3. Red 5V LED x 1
  4. 560 Ohm resistors x 2
  5. Jumper wires (male to male) x 11
  6. Breadboard x 1
  7. Electret microphone with MAX 4466 amplifier x 1
  8. Speaker x1
  9. USB to USB Mini B cable x 1
  10. 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

螢幕快照 2021-04-18 上午1.34.53.png

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

13904561990626.jpg
螢幕快照 2021-04-17 下午11.01.05.png

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.

https://create.arduino.cc/editor/bettyweng/17889e1...

Make a Cover for the Device (Optional)

13904561980089.jpg
13904561953834.jpg
螢幕快照 2021-04-17 下午11.01.46.png

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!

Done!

Arduino Voice Monitor Project