Audio Spectrum Visualizer Using Arduino & Matrix Display

Almost all of us have expensive or cheap music systems in our homes. Most musical concerts, festivals and nightclubs are accompanied by fancy disco lights to show visual effects according to music rhythm. So, I planned to build my own Audio Spectrum Visualizer that reacts to music or audio. For this, I used Arduino Nano as the main heart of this project, and 32×8 Dot Matrix Display, and a sound sensor.

The individual LEDs on the Dot Matrix Display will react according to the Analog audio signals that Arduino Nano receives through the sound sensor that is connected to its Analog pin. Arduino has a built-in ADC (Analog to Digital converter) input pin which can receive the Analog audio signals from the sound sensor and convert it to a digital signals.

Some days ago I have built a Music Reactive LED System Using ESP32 and WLED. You can also check this out.

Project

Audio Spectrum Visualizer

Circuit Diagram

Audio Spectrum Visualizer Circuit Diagram

Components Required

  • Arduino Nano
  • MAX7219 Dot Matrix Display Module (8×32)
  • Sound Sensor
  • Connection Wires
  • Breadboard
  • 5 Volt Power Supply

About Parts of the Wireless Notice Board

Dot Matrix Display

LED matrices are available in the market in different colours like single colour, dual colour, and RGB colour. They are also available in different dimensions like 5×7, 8×8, 16×16, 8×32, 32×32, and more.

8x8-LED-Matrix-Display

This 8×32 LED Matrix Display is a multitude of 4 single Matrix Displays which are internally connected. These displays also have the ability to separate from each other, as every module carries the same Maxim MAX7219 chip, and can be connected with the same power and data connection. That’s why if any of the single displays get damaged, they will be easily replaceable.

8x32-Dot-Matrix-Display

MAX7219 LED Driver Chip

This Matrix Displays can be driven in two ways. One is a parallel way where the parallel data is sent to each row or column. The second one is the serial way where the data is sent serially and an IC is used to convert this serial data into parallel data.

MAX7219-Dot-Matrix-LED-Driver-IC

MAX7219 is a common cathode display driver with serial input and parallel output. It is used to interface microprocessors and microcontrollers with 64 individual LEDs. The 8×8 LED matrix is connected to the MAX 7219. The data input is received from the Arduino board to the MAX7219.

Audio Spectrum Visualizer Circuit Connection

The complete circuit connection for interfacing the 32×8 LED Dot Matrix Display and sound sensor with Arduino Nano is described below.

Both the Dot Matrix Display and sound sensor are using 5V power supply from the Arduino Nano 5V output pin. But you can use an external power source for better current supply. The Analog data pin of the sound sensor is connected to the A0 pin of the Arduino Nano.

Now, come to the Dot Matrix Display part. Connect the VCC and ground pin of the display module to the +5V and ground pin of the Arduino Nano respectively. Also, connect the DIN, CS, and CLK pins to the D11, D10, and D13 of the Arduino Nano.

PCB Design

You have to connect all the required components as per the circuit diagram. The circuit is very simple, you can directly give AC supply to the DC circuit. Before designing the PCB I also checked the Audio Spectrum Visualizer circuit on a breadboard. After testing the circuit, I designed a PCB layout by using EasyEDA software to make the circuit compact and look professional.

Now come to the main part, where we need to order our PCB prototype. I always prefer PCBWay for its quality assurance, fastest delivery, and 24/7 customer support.

PCB View

Audio Spectrum Visualizer 2D View
2D View
Audio Spectrum Visualizer 3D View

My Opinion About PCBWay

PCBWay is a Chinese-based PCB manufacturing company which is providing prototypes, PCB assembly, SMT Stencil and Flexible PCBs. I am in collaboration with them for about recent 1.5 years, and I feel like PCBWay gives an excellent price and customer service factor in one single serving. What is also spectacular about PCBWay to me, as an electronics hobbyist and customer, is their on-time service. In this review, I will explain my personal opinion regarding the quality and processing aspects of PCBWay.

When I first approached PCBWay, I found their PCB prototyping and customisation options capture huge areas with every aspect of you can customize the PCB as per your wish. You can choose different types of solder masks, silkscreen, surface finish, materials and much more. Below, I have attached some solder mask quality provided by PCBWay.

Addressing their SMT stencil service, it is often ordered with your standard PCB boards if your design includes surface mount components being soldered on. Really it is too professional and accurate also checked by their engineers. It is like a template which makes it easy for your project as surface mount soldering isn’t the easiest skill to grasp. Besides the prototype customization, PCBWay also offers different interchangeable options such as the stencil type, thickness, existing fiducials, whether you like electropolishing or not etc.

Now come to the PCB Assembly service, where components can be assembled by them, and your PCB board will come ready to be used. Also here you could choose the option to have PCBWay supply all the components on your design or have the option for your own where you need to supply all the components. Alternatively, you could choose the combo option where PCBWay supplies some parts, along with you will have to supply the rest of the components. I strongly recommend going for the combo option if you have some of the parts you need for that project.

The best part of PCBWay in my opinion, their engineers check your Gerber file and if there is a correction needed, they might contact you or correct it with their PCB expertise. Pointing to that, I think this is the most valuable service that they are providing you than other companies.

Now, once you have done all your customisations and made your final choices, you can receive a quote along with a rough price estimate directly from their website. The price of your product will be based on the options you choose, with the higher, more expensive options contributing to your price more heavily. Shipping is also included separately, DHL is the expensive method and standard airmail is the cheapest method of shipment. The nice thing about PCBWay’s website is that you can see how the final price is broken down by certain costs. Furthermore, there is a choice for you to select your build time and shipping method so that when you change it, you can instantly see the price difference.

Arduino Code

To compile this code, you have to have to install these two libraries into your Arduino IDE.

arduinoFFT.h

MD_MAX72xx.h

You can find these in Sketch > Include Library >Manage Libraries > click on the search bar type these and install.

4 thoughts on “Audio Spectrum Visualizer Using Arduino & Matrix Display”

  1. Dear, guru your project is awesome,
    i want to do this project but i decided to run the code,
    it is showing fatal error: FFTWINDOW is not a class,
    expansion of macro ‘FFT_WIN_TYP_HAMMING’
    expansion of macro ‘FFT_FORWARD’ Error compiling.
    Kindly help.
    Thanks.

  2. this is awesome, I was just posting about something like this, but I don’t need the whole spectrum, Just divided into 4, Low frequency, Med Low, Med High and High.
    50 to 100 Hz, 100 to 300 Hz, 300 to 800 Hz and 800 to 1300 Hz.
    Is your sound sensor a Microphone or do you have a direct input jack for line-level audio? Thank you.
    Michel

Leave a Comment