Introduction: Vu Meter That Responds to Mic!
Today we are going to make this VU Meter. It picks up every sound and lights up the LEDs of this Volume Unit Meter. That’s the explanation of VU Meter if in case anybody was wondering. So without wasting time let’s dive into it.
Step 1: Parts Required:
- Condensor Mic
- Film capacitor
- 470K and 10K resistor
- BC547 transistor
- ATMega328 IC
- 16Mhz Crystal
- 22pf Capacitors
Step 2: Mic Module:
This is a commercially available mic module for the arduino. It has the Positive 5v, GND and the signal output. This costs about Rs.160 and is very complicated. So I found this another circuit which does the same thing but with less components and also for a fraction of the cost. After tracing back the circuit I came up with this circuit design. The condensor mic picks up sound which amplified using the BC547 transistor. The resistors act as a way to charge and discharge the capacitor. This requires 5V and gives output as a signal which we can process using Arduino.
I wire this circuit on the breadboard to test if all is working. I connected the output pin to A2 of my Arduino and run my code. I just made an analogRead of A2 pin and displayed in the serial monitor. Whenever I clap I am able to see the bump in value. That is good news.
Now it’s time to prototype the board. To do that I opened my Eagle Cad and drew the schematics and prepared the board. You can download the schematics and board design from the description.
Step 3: Arduino:
Next we need to convert the input signal we get in the Arduino to light up the LEDs. The Atmega chip has around 13 Digital pins. If we leave out the TX and RX pins then about 11 digital pins. That is more than enough as I want to just connect 10 LEDs. I quickly wired up each digital pin to the positive lead of the LED. 220ohm resistor is connected to the ground for protecting of LEDs.
And now I add more lines to my code. First I define the LEDs here. Then declare two variable which I will later use in the code. I will set these LEDs as outputs.
Now I have to convert the numbers I get during analogRead to a value that I can use. With a little bit of calculation the lowest value I get is 0 and the highest is 10. Which is the same number of LEDs I have connected. So with a simple loop I can light up all these LEDs with a slight delay.
Once I uploaded the code to my Arduino I began testing. With every clap I can see the LEDs light. Awesome!
Time to build a board. Again I used Eagle cad to design the schematic and build the board. I used the ATMEGA328 chip as the brain in between. Because the input will be 12 volts I used a 5v Voltage regulator. Finally I etched the board. If you want to know how you can etch PCBs then please click on the link below.
Here is the board with the components soldered. I designed these boards to be modules so I can attach and remove them whenever required. Also the board can be placed far away from the mic.
Step 4: Installing Vu Meter:
Now let me put everything together. I will connect the the 12v power. And then connect the mic module. Now when I play a music it just works fine. I secured it with some hot glue inside the speaker. And here I am testing it one more time.
Step 5: Conclusion:
Now you may ask. Why not connect one of the output of the speaker as an input into Arduino and read the values. Why use a Mic module instead? Well that was my initial thought. But what I soon learnt was that the output to the speaker is an AC voltage. Converting them into DC and again amplifying it is just too much of work. Most of the websites which build VU meter for audio systems take the output that they get out of the audio jack like this and then feed that to a micro controller to read the values. The value that we usually get from the audio jack is a DC voltage so that would work. But here it’s a bluetooth speaker we can’t do anything like that.
Hence I came to this solution and built this - and it works. Unless it a big noise the mic does not pick it up because it’s inside the enclosure. That’s all for this video my friend.
If you repeat this project please tag me as #mediamilan. I would love to check what you have made. And follow me on instagram @mrjcrp to see what I am working on right now. Let me know your question in the comment.
Until next time. Happy Learning!
We have a be nice policy.
Please be positive and constructive.