Some wrongly refer these as VU meters. VU Meter is too much but these are entertaining. Volume Unit meter (VU meter) device display representation of the signal level in audio equipment, which has some of standards. We are just building a “sound meter”. You need some LEDs, couple of resistors, ceramic capacitor to build this Arduino Sound Meter. Frankly there are more easy guides with almost nothing – one Arduino board, few resistors and LEDs. Those are too less. There are ready to use Arduino, Raspberry Pi PCB with amplifier – they are too much.
Arduino Sound Meter With LED : Easy But Better
I lack idea who created the circuit. I got in one electronics forum uploaded by one member, that is circuit diagram :
List of items needed is :
---
- Arduino board
- Condensor microphone
- One 220 Ohm resistor
- One 4.7K resistor
- One 10K ohm resistor
- One 0.1uF ceramic capacitor
- 4 LED (you can add more)
- Few jumper wires
There is not much bell and whistle. Create the circuit properly on breadboard. This is the code :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #define MIC A0 int sig = 0; void setup() { pinMode(2, OUTPUT); pinMode(3, OUTPUT); pinMode(4, OUTPUT); pinMode(5, OUTPUT); } void led() { sig = analogRead(MIC)*50; if (sig>1) {digitalWrite(2, HIGH);} else {digitalWrite(2, LOW);} if (sig>300) {digitalWrite(3, HIGH);} else {digitalWrite(3, LOW);} if (sig>800) {digitalWrite(4, HIGH);} else {digitalWrite(4, LOW);} if (sig>950) {digitalWrite(5, HIGH);} else {digitalWrite(5, LOW);} } void loop() { led(); } |
If you want to add more LED then you have to add more pinMode
:
1 2 3 4 5 6 | void setup() { pinMode(2, OUTPUT); pinMode(3, OUTPUT); pinMode(4, OUTPUT); pinMode(5, OUTPUT); } |
And you have to adjust to accommodate more values :
1 2 3 4 | if (sig>1) {digitalWrite(2, HIGH);} else {digitalWrite(2, LOW);} if (sig>300) {digitalWrite(3, HIGH);} else {digitalWrite(3, LOW);} if (sig>800) {digitalWrite(4, HIGH);} else {digitalWrite(4, LOW);} if (sig>950) {digitalWrite(5, HIGH);} else {digitalWrite(5, LOW);} |
These are no way really accurate for scientific analysis, they will be visually correct. This kind of project basically good with ATTiny for some real thing out of breadboard. These are entertaining projects for the kids.
A modified circuit with LM393 is sold as “sound sensor breakout” on online shops for $1. Which reminds more about old “clap switch” project.
Tagged With VU Meter , arduino sound meter , arduino audio meter , led brink vu sensor sound diy , vu meter arduino