Audio Spectrum Analyzer (VU Meter)

by indoorgeek in Circuits > Audio

9150 Views, 13 Favorites, 0 Comments

Audio Spectrum Analyzer (VU Meter)

Audio Spectrum Analyzer (VU Meter) | Op-Amp
ThumbnailTN.jpg

What is Music? From a technical point of view, music is basically a signal with varying voltage and frequency. Audio Spectrum Analyzer is a device which shows the voltage level of a particular frequency. It is an instrument mainly used in places like recording studios to analyze the sound.

Though it is an instrument, it is fun to stare at the dancing lights and a great way to visualize music. A few years back, I had made a smaller version with two columns on the prototyping board. A lot of soldering and a complete mess! This time I wanted it to be neat and tidy and a treat for the eyes.

Let's get started!

Supplies

For one column:

5x LM324 Quad Op-Amp IC

20x Green LEDs

20x 100 ohm Resistor

20x 10k Resistor

1x 59k Resistor

1x 270k Resistor

1x 2N2222 NPN Transistor

1x 10uF Capacitor

Op-Amp As a Comparator

Sequence 01.00_00_29_11.Still007.jpg
Sequence 01.00_00_45_16.Still009.jpg
Sequence 01.00_01_02_04.Still011.jpg
Sequence 01.00_01_11_03.Still013.jpg
Sequence 01.00_01_15_11.Still014.jpg
Sequence 01.00_01_23_17.Still016.jpg
Sequence 01.00_01_28_19.Still017.jpg
Sequence 01.00_01_29_16.Still018.jpg
Sequence 01.00_01_38_29.Still020.jpg
Sequence 01.00_01_53_00.Still021.jpg
Sequence 01.00_02_03_08.Still022.jpg

I won't be explaining the working of an Op-Amp rather we will see one of its application. There are a ton of good videos on YouTube explaining the working of an Op-Amp.

An Op-Amp is a 3 terminal device.

  1. Non-Inverting pin (+)
  2. Inverting pin (-)
  3. Output

We will be using an op-amp to compare two voltages. The voltage Vin at the inverting pin (-) is compared with the voltage Vref at the non-inverting pin (+).

Let us build a circuit to demonstrate it. LM324 IC which is a quad op-amp is used for this example. The reference voltage Vref of 2.5V is provided at (+) pin using a voltage divider circuit and the voltage Vin at (-) pin is varied using a potentiometer. An LED is connected at the output. When Vin < 2.5V, the output stays low and when Vin > 2.5V, the output becomes high and the LED turns ON.

Let us scale up this circuit using four op-amps. A voltage divider circuit is used to provide a reference voltage (1V, 2V, 3V and 4V) to each op-amp. (-) pin of all the op-amps are connected together. As the voltage at (-) pin becomes greater than 1V, the output of the first op-amp becomes high. Since 1V is less than the reference voltages of other op-amps, their outputs remain low. As the voltage further increases, the LEDs turn ON one after the other.

Using the same principle but with more op-amps, we can build an Audio Spectrum Analyzer since music is nothing but a signal with varying voltage.

The Plan

Block.jpg

Audio signal straight out from your phone is good enough only to drive your earphones. We need to increase the amplitude using an Audio Amplifier. I will be using a bluetooth speaker as it has the audio amplifier built-in.

Music is a mixture of various frequencies. I am not a sound expert by any means. A quick google search gave the following results:

20 to 60 Hz Sub-bass

60 to 250 Hz Bass

500 Hz to 2 kHz Midrange

4 to 6 kHz Presence

6 to 20 kHz Brilliance

To separate these frequencies, bandpass filters will be used. A bandpass filter is a device which passes a particular frequency and rejects other frequencies. A column of the display shows the amplitude or voltage level of that frequency.

Designing Bandpass Filters

Schematic_Audio-Spectrum-Analyzer_Display_20190926214857.png
formula.jpg

Using the formula given below, you can calculate the values of R and C for a given frequency.

Note: Do not use electrolytic capacitors

PCB Designing and Assembly

Sequence 01.00_02_35_23.Still023.jpg
Sequence 01.00_02_39_11.Still024.jpg
Sequence 01.00_02_41_23.Still025.jpg
Sequence 01.00_02_53_14.Still026.jpg
Sequence 01.00_02_58_09.Still027.jpg

Using EasyEDA, I first made the schematic and then converted it to PCB. EasyEDA is perfect for beginners like me. There are fewer things to worry about and so we can focus just on designing the PCB. You can directly order your PCBs from JLCPCB. Each column of the display is same and so the 10 PCBs which we get can be utilized. I have used five for five different frequencies. You can scale up the circuit as per your level of craziness!

After ordering, I received my PCBs within 5 days. Now get out your iron, gather all the components and start soldering! After a hell lot of soldering, 5 columns were completed.

Putting Things Together

Sequence 01.00_03_04_28.Still031.jpg
Sequence 01.00_03_07_03.Still032.jpg
Sequence 01.00_03_12_09.Still034.jpg
Sequence 01.00_03_15_03.Still035.jpg
Sequence 01.00_03_00_03.Still028.jpg
Sequence 01.00_03_27_04.Still038.jpg
Sequence 01.00_03_17_07.Still036.jpg
Sequence 01.00_03_27_05.Still039.jpg
Sequence 01.00_03_35_21.Still040.jpg
Sequence 01.00_03_02_10.Still030.jpg
Sequence 01.00_03_49_27.Still044.jpg
Sequence 01.00_03_56_15.Still043.jpg
Sequence 01.00_00_00_15.Still003.jpg

I designed a case in Fusion 360 for the electronics and to hold the five displays. I printed it using Creality Ender 3. Just a beginner in 3D modeling, but it worked.

I used an old bluetooth speaker as an audio source since it has an amplifier already built inside it. I won't be explaining the connections as your's will be different. Just follow the block diagram mentioned earlier in Step 2. I connected the Audio Input of the bandpass filter to the output (speaker connections) of the amplifier.

Solder the signal and power wires coming from the displays to the bandpass filter board.

The rest of the things are up to you. There was an indicator LED on the bluetooth speaker's circuit board which I desoldered and attached it on the front side. Be creative!

Enjoy!

Sequence 01.00_04_10_14.Still047.jpg
Sequence 01.00_04_03_20.Still045.jpg

That's it! Power it up and enjoy your favorite song!

Thank you for sticking to the end. Hope you all love this project and learned something new today. Let me know if you make one for yourself. Subscribe to my YouTube channel for more upcoming projects. Thank you once again!