Maker.io main logo

Spring into Summer Ambassador Design Competition Audio Visualizer-Part 2

2021-09-30 | By Tyler Marston

License: None

This is a continuation of Team Syracuse’s summer design project, which was described in Part 1.

After receiving our parts, my teammate, Eric Silfies, and I got busy making our audio visualizer. The first step, like I mentioned in the previous blog, was to complete the physical setup of our visualizer. Together, we decided to make a 28 inch x 18 inch x 3 inch frame to house the LEDs and components. We made the frame by cutting plywood to the right lengths and then sanding them to prepare for painting. One tricky thing that we had to do was use a jigsaw in order to create room for our speaker and power cable.

We decided on using a dark blue spray paint for the wood. We chose this to contrast the bright lights inside the frame and match our schools’ colors (Orange, White, Blue). The front of the visualizer is meant to diffuse the light of the LEDs. To do this affordably, we decided on using an acrylic sheet. We wanted the sheet to have a frosted look, but we didn’t want to break the bank. To solve this, we used a pad sander to scratch the surface and create a look similar to that of frosted glass for a fraction of the cost. To show our school spirit, we painted one side of the acrylic with a retro version of our school’s logo. We chose to use white paint because we really liked the look and this way the LEDs can shine through.

At this point we were ready to solder our LED strips together. As predicted, this was where we found the most trouble. We decided to do twelve strips of twenty (12x20) LEDs, which meant we had to solder a lot. Throughout the process of soldering the LEDs together, some of the solders would break due to movement and weak solder joints. Overall, this process was very tedious and sometimes frustrating, but in the end, it was a success. Afterwards, we prepared to assemble all of our parts. The first thing on the agenda was to glue the lights to the backplate. Unfortunately, the hot glue that we intended to use as an adhesive refused to bind with the plastic coating on the LED strips. To solve this problem, Eric and I found some super glue that ended up doing the trick.

Once the LEDs were in place, it was time to attach the sidewalls. We used screws to easily attach the sidewalls with very little trouble. Next, we had to figure out a way to attach the acrylic plate to the front. One idea that came across our mind while building this visualizer was a way to resolve an issue with the possibility of something breaking. To solve this issue, we decided on using industrial strength Velcro to attach the acrylic to the front of the frame. Using this method, fixing issues like a broken solder joint would be easier.

After the physical setup was complete, it was time for us to focus on the electrical setup. The first thing we focused on was playing audio from an SD card. Using a micro-SD card and a card reader, we loaded a wav file, which is a form of audio file, into the Arduino. We used the TMRpcm.h, SPI.h and SD.h libraries in order to do this. At first, the Arduino Uno struggled a lot to play the file. After some time debugging, we figured out the audio file itself was too big for the Arduino to handle. To solve this, we shortened the wav, which was the Syracuse University “Let’s Go Orange!” chant, to reduce the file size. The next problem that we faced was making sure that the audio was loud enough. To solve this issue, we added a simple mono audio amplifier.

Once our audio issues were solved, it was time to focus on the LEDs. The first thing that we had to do was upload the FastLed.h library. This library has plenty of examples and was very easy to work with. We used this library to make sure all of our solders were good, and our lights worked. The next thing to do was to implement a Fast Fourier Transform (FFT). This takes a set of samples, vReal, and analyzes them for certain frequencies. It then forms a summation of frequencies that are responsible for the inputted sound. The last step is to then project the magnitude of these frequencies onto the LEDs using the FastLed.h library. One issue that we encountered while doing this was incorrect input. We tried many microphones, but most were meant for other applications or were giving incorrect readings. We settled on a low power MAX4466 microphone to solve the problem. Just note that this microphone will only work at 3.3 Volts on the Arduino. Lastly, we unfortunately had to separate the two programs, music and lights, because they used too much memory. Using an Arduino Uno for the sound and Arduino Nano for the lights, we were able to run both at the same time.

For a video covering the making and testing of this project, be sure to check out Part 3 of this project.

Recommended Reading

制造商零件编号 1461
ADDRESS LED STRIP SERIAL RGB 4M
Adafruit Industries LLC
¥840.89
Details
制造商零件编号 AKX03025
ARDUINO STUDENT KIT SPAIN
Arduino
¥620.27
Details
制造商零件编号 254
MICROSD CARD BREAKOUT 5V OR 3V
Adafruit Industries LLC
¥61.05
Details
制造商零件编号 1314
SPEAKER 4OHM 3 DIAMETER
Adafruit Industries LLC
¥15.87
Details
制造商零件编号 SEN-14262
SPARKFUN SOUND DETECTOR (WITH HE
SparkFun Electronics
¥107.86
Details
制造商零件编号 5447
WHITE SHORTENING MICROSD TO SD C
Adafruit Industries LLC
¥15.87
Details
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum