Arduino Based Bi-color LED Matrix Audio Spectrum Visualizer




Introduction: Arduino Based Bi-color LED Matrix Audio Spectrum Visualizer

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.

You may be interested in some of the projects we have put up at instructables using this LED Matrix kit.

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 instructable to show how an Audio Spectrum Visualizer can be built using the Bi-color LED Matrix DIY kits.

As usual, before we decided to come up with this instructable, we browsed through the existing instructables to check if there are any similar projects. There is already a handful of instructables involving Spectrum Analyzers/Visualizers but we decided to go ahead with this instructable as we will be offering something different here and hopefully someone may find it useful.

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.

Step 1: 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.

Step 2: 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 above for our completed circuit on perf-board.

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.

For those who do not want the hassle of wiring up the audio spectrum visualizer board, you may use the JF Stereo Audio Spectrum Visualizer kit which is available at our Tindie store.

Step 3: 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.

Step 4: 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:

Step 5: 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.

Step 6: Let the Music Begin

Hope you find something interesting with this instructable and embark on the project 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!



  • Water Contest

    Water Contest
  • Fix It! Contest

    Fix It! Contest
  • Metalworking Contest

    Metalworking Contest

18 Discussions

Hello, I have a question, I have just built this and it works perfect, I am a complete novice to the Arduino and the programming code. Would it be possible to add a LED matrix display to each side to make it 3 high, and how complicated is it to edit the code? or am i better starting from scratch, any advice would be most appreciated.

3 replies

It is possible to do so and not too complicated to edit the code if you are familar with the program code.

Is any one able to point me towards what bits of the code need changing?

Where would you suggest looking to learn more about the code? This is my first project, I can run the third matrix with the test program so the hardware is good.

Hello, I have a little question.

I don't have a bicolour dot matrix my modules only have one SMD MAX7219, the code can work with my arduino micro and thoose dot matrix modules?

(Sorry, for my english I'm spanish and don't speak wery well the english ^^")

1 reply

You will need to amend the program code for it to work on single color MAX7219 matrix modules.

Ok the link is working now , I will test it to see if it is working

Can you download the Bi-color LED Matrix display test program in the link below to test that your display setup is correct?

Your display shall light up red row by row to fill the entire display and then cleared off followed by the color green and then orange in sequence.

One of the causes for the display to stay fully lit is that the LED matrix is installed in the wrong orientation. Rest assured that nothing will be damaged if the LED matrix is incorrectly installed.

Hello , I'm doing this project at the moment but with my project when I hook up everything my matrixes all light up and stay lit , even when music is inputted through the controller board , can you help me

Hi I'm in the process of working on this for a school project if like to know how this was power and by what.

3 replies

So there is no other power source , only the arduino nano with the use of the use adapter is what is powering the entire thing

Yes. Just the USB power to the Arduino Nano. This is possible as we are using the Bi-color LED Driver Modules for the display. These modules are designed using the awesome MAX7219 ICs which takes care of the multiplexing of the LEDs.

This is great - I'd love to build one of these!
Only question really for me is if it would be simple to swap out the LED modules for bargraph type ones? For instance I have some which are simply a stack of ten rectangle LEDs together in one casing. Would that sort of thing be fine to use instead of these modules? Many thanks, and great instructable thankyou!

1 reply

Thanks for your interest in this project.

It may not be an easy task to replace the Bi-color LED Matrix modules we used here with those bargraph LEDs modules you have. You will need to figure out the electrical connection changes required. You may also need to modify the Arduino code for it to work properly.

You can never have enough ways to visualize music. This looks great!