|
.1uF Capacitor |
x 2 | |
|
100nF Capacitor |
x 1 | |
|
10uF Capacitor |
x 2 | |
|
220uF Capacitor |
x 1 | |
|
47nF Capacitor |
x 1 | |
|
10 Ohm Resistor |
x 1 | |
|
1k Ohm Resistor |
x 16 | |
|
2.2k Ohm Resistor |
x 1 | |
|
390 Ohm Resistor |
x 8 | |
|
4.7k Ohm Resistor |
x 2 | |
|
2N3904 |
x 8 | |
|
LM358N |
x 4 | |
|
LM386N-1 |
x 1 | |
|
LED 5mm |
x 16 | |
|
Standerd DC jack (Inner positive) |
x 1 | |
|
Audio Cable |
x 1 |
D.I.Y LED VU Meter
Theory
Operational amplifiers are able to do many things. Besides being a structure of meticulously placed transistors, it can act as an audio amplifier, variable logic gates, and even as an active filter. However, in an op-amp’s most basic form it is a voltage comparator. As a voltage comparator, the op-amp is constantly “reading” the inputted signal, comparing it to a set reference voltage (called Vref). When the inputted signal is higher than Vref, the op-amp will go high, turning an LED on. When the inputted signal is lower than Vref, the op-amp will go low and turn off the LED. Review Fig 1.1 for further help.
Don’t know what an op-amp is? Don’t worry! Click me to learn more about op-amps!
Fig 1.1: (Left) A basic op-amp voltage comparator.
(Right) As the inputted voltage rises (in green), it crosses over Vref. This causes the op-amp to go high (depicted in blue).
Credits: Electronics Tutorials
Op-Amp Comparator Array
It is important to notice that in Fig 1.1, Vref is set through a resistor divider. This means that Vref is proportional to Vcc. Keeping this in mind, if we scale up the design in Fig 1.1, we can create an op-amp comparator array. Using 8 op-amps and 8 resistors, we create 8 voltage “regions” (Refer to Fig 1.2). When the inputted audio signal goes through one of the regions, it will turn an LED on. This will allow us to show the volume that the music is currently playing at.
Fig 1.2: As the signal rises, it crosses over 6 regions causing 6 LEDs to turn on.
Audio Amplifier
Despite the simplicity of the current design, we are still missing a crucial part: an audio amplifier. For the op-amp comparator to work, the inputted volume must have a large enough voltage change to have any real effect on the LEDs. This is where my trusty friend, the LM386 comes in.
By the far the most popular amplifier IC of all time, the LM386 will allow us to amplify the inputted volume close to Vcc. This will allow us to easily see the volume swing up and down throughout the song.
A good way to visualize why we need an amplifier is to imagine that we are shifting the audio signal up and down on a graph. The loudest portion of the song must be able to turn on the top-most LED on the bar. For this to happen, the audio signal must be shifted up to match Vcc. Otherwise, without the amplifier, the loudest portion of the song may only turn on the 3rd or 4th LED*. This will be of no use to us.
* The average i-phone outputs music in the 0-1.5v range, too small to have a noticeable effect on the LEDs. This is why an amplifier must be used
Schematic Design
Theory finally out of the way, the next step is to create the actual schematic for the volume bar. Using all the information above, I created the following schematics in Eagle:
Fig 2.1: Op-Amp comparator array
Fig 2.2: LM386 amplifier circuit
Explanation
As you can see, most of Fig 2.1 is just the repetition of an op-amp comparator. In the design, I only use 8 op-amps resulting in 8 different voltage regions but in your own design, you can use however many you want. As well, the transistors in Fig 2.1 are meant to act like LED drivers to turn on multiple LEDs. This is because the op-amp I chose (LM358) can only drive 50 mA of current. This is enough to drive one LED but with any more and you risk burning the chip.
Prototype
It is always smart to make a prototype before the final product is made. Using a spare breadboard and an amplifier board I stole from a computer monitor, I hodgepodged together a working prototype of the volume bar. Watch the video to see the prototype in action!
Fig 3.1: The op-amp comparator circuit constructed on a breadboard
Fig 3.2: Spare amplifier board (not the same amplifier used in the final design)
PCB Design
After building the prototype, I moved onto making a printed circuit board (PCB) for the final design. Since I made the schematics in EAGLE, all I need to do to make the PCB is to switch from schematic mode to board mode. Once in board mode, I began placing all the necessary resistors, capacitors and IC’s. Once done, I routed the copper connections for them (seen as the blue and red lines in Fig 4.1) creating this PCB:
Fig 4.1: Final PCB design for LED Volume bar
Download PCB and Gerber files here:
Ordering PCBs
Done with the PCB design, I exported the board as Gerber files. From there, it was as simple as click, click, upload, and pay on the PCBWAY website, a Shenzhen based PCB factory. On average, it takes 2-3 weeks for the PCBs to be shipped using China post. In my case, due to coronavirus, it took longer for the shipment to arrive (about 4 weeks)
Soldering Time!
After the 4 week wait, the PCBs have finally arrived! All PCBWAY boards arrive in a vacuum-sealed plastic wrap. This keeps the PCBs as “fresh” as possible, preventing any possibility of oxidization during shipment.
Turning my soldering iron to a scorching 350° Celius, I dabbed the tip in solder and began soldering all the electrical components. Soldering in a stepwise fashion, first came the resistors, then the capacitors, IC holders and then finally the power adapter and audio plug.
Final Product
Once done with soldering, I checked over all my solder joints, plugged in a 12v barrel jack and turned off my lights. Let the LED show begin!
D.I.Y LED VU Meter
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(5)
- Likes(6)
- Brian BriBri Nov 24,2023
- Prasanna K Jan 22,2023
- Ji?í Ho?ek Jan 17,2022
- Rachman Lusana May 28,2020
- DarkoPatic May 14,2020
- Kevin Yang Apr 02,2020
- 7 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
-
6design
-
8usability
-
8creativity
-
10content
-
10design
-
9usability
-
10creativity
-
10content
-
7design
-
7usability
-
8creativity
-
7content
-
7design
-
7usability
-
7creativity
-
10content
-
10design
-
8usability
-
7creativity
-
10content
-
8design
-
8usability
-
8creativity
-
9content
-
9design
-
8usability
-
9creativity
-
8content
More by Kevin Yang
-
-
-
kmMiniSchield MIDI I/O - IN/OUT/THROUGH MIDI extension for kmMidiMini
128 0 0 -
DIY Laser Power Meter with Arduino
190 0 2 -
-
-
Box & Bolt, 3D Printed Cardboard Crafting Tools
171 0 2 -