After we came up with the Bi-color LED Matrix Driver Module kit, we have been looking around for interesting projects to work with it.
Most electronics hobbyist seems to be interested in projects involving Audio Spectrum Analyzer/Visualizer at some point in time. We decided to come up with this project to show how an Audio Spectrum Visualizer can be built using the Bi-color LED Matrix DIY kits.
To build this project, basic electronics knowledge with electronics component soldering skill and some knowledge on using the Arduino are required.
You may view the following YouTube video to see what we are building.
Building the Arduino Bi-color LED Matrix Audio Spectrum Visualizer
We will be building a two LED Matrix tall stereo audio spectrum visualizer here driven by an Arduino Nano. We will basically be using four Bi-color (Red and Green) LED Matrix Driver Module kits from jolliFactory and two MSGEQ7 IC chips made by Mixed Signal Integration.
Two of the LED Matrix kits are for the audio left channel and another two for the audio right channel. Each of these modules uses two MAX7219 Display Driver ICs to drive a Bi-color LED Matrix. These ICs are excellent because they take a lot of work off the micro-controller and simplify the wiring and logic design.
You can find this Bi-color LED Matrix Driver Module kit from here.
This kit comes with all through-hole components and someone with basic soldering skill should be able to assemble it without much difficulty.
See the following YouTube video on how to assemble the LED Matrix Driver Module Kit:
The MSGEQ7 IC is a single channel seven band Graphic Equalizer Display Filter. By feeding an audio signal to it, it will filter out seven frequency bands centred around 63Hz, 160Hz, 400Hz, 1,000Hz, 2,500Hz, 6,250Hz, and 16,000Hz.
The seven frequencies are peak detected and multiplexed to the output to provide a DC representation of the amplitude of each band. All we need is to read these DC values with the microcontroller analog input and output the spectrum to the Bi-color LED Matrix displays.
We need two MSGEQ7 ICs here, one for the left and another for the right audio channel. The wiring connection diagram above shows how a MSGEQ7 IC is typically connected.
Wiring
After the four LED Matrix kits are
completed, they are connected together with the two MSGEQ7 ICs and
micro-controller as shown in the wiring diagrams. One of the wiring
diagrams is with the LED Matrices removed for a better view of the
connections. An Arduino Nano is used here to control the entire
electronic circuit setup.
Note the use of 10Kohms pull-down resistors on the LOAD input pins for the LED Matrix modules. When power is first applied to the micro-controller or when they are reset, their I/O lines float. The LED Matrix module MAX7219 ICs can see this as valid data and display garbage until the micro-controller gains control. The pull-down resistors prevent these problems.
Except for the four Bi-color LED Matrix Driver modules, we hook up the entire circuit on a small piece of perf-board around 90mm x 30mm. See our completed circuit on perf-board below.
Note there are two 3.5mm stereo audio jack sockets in the wiring diagram in the previous section. One serves as a stereo audio input and the other is a pass-through output which allows you to connect this Audio Spectrum Visualizer in-line between your audio source and your stereo system. However, due to space constraint on our perf-board, we are using a 4 pin angle header to replace one of the 3.5mm stereo audio jack sockets and we had to modify our audio cable for it to fit to the 4 pin angle header. If you are working on this project, a larger perf board around 110mm x 30mm should be sufficient to populate all the correct parts required for this project.
The Arduino board needs to be loaded with the Arduino sketch to drive the Audio Spectrum Visualizer.
We used Arduino IDE V1.03 for our project. Download the Arduino sketch below for this project and upload it into your Arduino board.
Download jollifactory_Audio_Spectrum_Visualizer_V1_0.ino
You may amend the sketch to enhance the visualizer to your liking. For us, we like the slow falling effect for each of the frequency band's peak.
To test our Audio Spectrum Visualizer, we downloaded some Android Audio Signal Generator apps from Google Play for testing.
There are quite a handful of Android apps around which may be suitable for testing. Here, we will be using the Android Frequency Sound Generator by José Morais. This application generates audio tones from 1 to 24000 Hz which is suitable for our use. The application is quite intuitive for use and we will not delve into the detail on how we carry out the testing.
Basically, we use this application to generate the 7 frequencies ( 63Hz, 160Hz, 400Hz, 1,000Hz, 2,500Hz, 6,250Hz, and 16,000Hz) and input them to our spectrum Visualizer to check that the LED Matrix displays are displaying correctly as our intended design.
You may check out the following video on how we carry out the test:
We did not put too much effort to build a proper enclosure for this Audio Spectrum Visualizer. In fact, we just grabbed what we have around which we think is suitable for the enclosure and fit everything into it just to hold everything in place. We may one day build a better and proper enclosure for this project.
What we have for the enclosure here is a cardboard box with a rectangular window opening in front. We spray painted it black to go with our desktop black sub-woofer. We cut a grey tinted acrylic sheet to size to fit into our cardboard box to reduce the glare from the LED Matrix displays. We did not even secure the LED Matrix display modules and the perf-board to the enclosure as they fit quite nicely in the enclosure.
The pictures show the various stages of assembling the sub-modules together and into the enclosure.
Hope you find something interesting with this project and embark to build the Audio Spectrum Visualizer.
We do enjoy watching the 'firework' effect on the spectrum visualizer with some music out there such as Yanni's Within Attraction.
Let the Music Begin!
Note the use of 10Kohms pull-down resistors on the LOAD input pins for the LED Matrix modules. When power is first applied to the micro-controller or when they are reset, their I/O lines float. The LED Matrix module MAX7219 ICs can see this as valid data and display garbage until the micro-controller gains control. The pull-down resistors prevent these problems.
Except for the four Bi-color LED Matrix Driver modules, we hook up the entire circuit on a small piece of perf-board around 90mm x 30mm. See our completed circuit on perf-board below.
Note there are two 3.5mm stereo audio jack sockets in the wiring diagram in the previous section. One serves as a stereo audio input and the other is a pass-through output which allows you to connect this Audio Spectrum Visualizer in-line between your audio source and your stereo system. However, due to space constraint on our perf-board, we are using a 4 pin angle header to replace one of the 3.5mm stereo audio jack sockets and we had to modify our audio cable for it to fit to the 4 pin angle header. If you are working on this project, a larger perf board around 110mm x 30mm should be sufficient to populate all the correct parts required for this project.
Programming the Arduino Board
The Arduino board needs to be loaded with the Arduino sketch to drive the Audio Spectrum Visualizer.
We used Arduino IDE V1.03 for our project. Download the Arduino sketch below for this project and upload it into your Arduino board.
Download jollifactory_Audio_Spectrum_Visualizer_V1_0.ino
You may amend the sketch to enhance the visualizer to your liking. For us, we like the slow falling effect for each of the frequency band's peak.
Testing the Audio Spectrum Visualizer
To test our Audio Spectrum Visualizer, we downloaded some Android Audio Signal Generator apps from Google Play for testing.
There are quite a handful of Android apps around which may be suitable for testing. Here, we will be using the Android Frequency Sound Generator by José Morais. This application generates audio tones from 1 to 24000 Hz which is suitable for our use. The application is quite intuitive for use and we will not delve into the detail on how we carry out the testing.
Basically, we use this application to generate the 7 frequencies ( 63Hz, 160Hz, 400Hz, 1,000Hz, 2,500Hz, 6,250Hz, and 16,000Hz) and input them to our spectrum Visualizer to check that the LED Matrix displays are displaying correctly as our intended design.
You may check out the following video on how we carry out the test:
Enclosure and Assembly
We did not put too much effort to build a proper enclosure for this Audio Spectrum Visualizer. In fact, we just grabbed what we have around which we think is suitable for the enclosure and fit everything into it just to hold everything in place. We may one day build a better and proper enclosure for this project.
What we have for the enclosure here is a cardboard box with a rectangular window opening in front. We spray painted it black to go with our desktop black sub-woofer. We cut a grey tinted acrylic sheet to size to fit into our cardboard box to reduce the glare from the LED Matrix displays. We did not even secure the LED Matrix display modules and the perf-board to the enclosure as they fit quite nicely in the enclosure.
The pictures show the various stages of assembling the sub-modules together and into the enclosure.
Let the Music Begin
Hope you find something interesting with this project and embark to build the Audio Spectrum Visualizer.
We do enjoy watching the 'firework' effect on the spectrum visualizer with some music out there such as Yanni's Within Attraction.
Let the Music Begin!
Hello. First off all thank you for share your knowledge and project. I would like to build this circuit but how can I connect to it music source. If i use headphones output it mutes speaker output. I think i should connect it to the preamfi output? I hope u understand my question.
ReplyDelete