Acrylic Spectrum Analyzer

CURRENT PROGRESS

OVERVIEW AND BLOG

Welcome to the blog page for my Semeser-Long project in Music and Technology 2 at RPI. In this class I will attempt to push myself musically, creatively, and technologically to create something unique and significant to me. This page will serve as an outline of the project, as I will be updating it every step of the way.

The overall project plan and progress can be tracked on this Gantt chart.


Music and Technology 2 Semester Project Gantt Chart.xlsx

Building sounds, microphones, surface microphones, prominent frequencies, resonant frequencies, well known music, build out chord progressions, build music from environment.

Hum a tune, into mic, music maker builds out piece, follow common songs or make something unique, create music from initial tone.

Loud song, test resonant frequency in room, build out music with frequencies, play out and hear parts of the room shaking.

  • use information to boost frequencies the room likes, can also conversely balance the room to create a more pleasant listening experience

Multi channel audio, spatial audio, surrounding, recreating real sounds using technology.

How people are affected by EQing on different types of music, people know what sounds good but there tends to be a threshold where they stop noticing the improvement, finding the threshold.

1/22/22

I find myself fascinated with the idea of designing a spectrum analyzer of some kind. There are a few previous projects on YouTube that exhibit creative takes on a spectrum analyzer - building one that is more of a showpiece than something that would actually have a functional purpose from an audio analysis standpoint.

The tubes used in this version are interesting, I think I could do something really cool with the rustic nature of these tubes and make an interesing display piece that has some older themes to it. I agree with the creative decision made by this person to leave the wiring exposed, as it definitely complements a project like this.

The idea of "infinity mirror" LEDs is one that I have been familiar with for a while; yet is nonetheless ingtreguing in this context. I think the final product that this creator was able to put together is impressively clean, but it lacks a wow factor that I think would come from having a more physically differentiated piece. - What I mean by this is that the display that this project creates is one that could be replicated with a simple monitor or TV - it is flat and uninteresting, and thus captures less attention and seems less impressive.

The creator of this project and this video - PlATINUM - is one of my favorite channels on YouTube. This was the original spectrum analyzer video that I watched some time ago and that sparked my interest. This project looks stunning and using the same simple board that was used in the previous video. I am confident that I could pull off this project this semester, I am just concerned with how simple the electronics are as it doesn't give me a chance to grow or understand what is actually happening in the circuitry.

1/25/22

Ideas for lighting up:

-ping pong ball LEDs

-acrylic tower

My goal is to complete a 30 band spectrum analyzer, I would like to do the filtering of the audio wave using hardware components rather than a single microcontroller.

It seems like the most feasible way to complete this project quickly is to use a microcontroller and run an FFT (fast fourier transform) algorithm to isolate the frequencies and their amplitudes. This would be a more cost effective solution that would allow for more creative freedom in the actual display because I would't have to spend as much time designing the electronics and fitering piece. I am still torn at this time because this idea is appealing but I don't know exactly how long it would take to complete this idea vs actually trying to complete the project using more hardware components.

https://en.wikipedia.org/wiki/Fast_Fourier_transform


1/26/22

https://create.arduino.cc/projecthub/janux/rgb-32-band-audio-spectrum-visualizer-0f26e0

1/27/22

Taking a look at existing schematics for other existing designs on EAGLE and Altium. Arduino has an existing library that runs FFT very quickly, there is also existing code that I can base my project's code on.

https://www.ebay.com/itm/164778279689

This premade setup makes use of an Arduino DUE, a more powerful arduino designed to perfom complex tasks more quickly than something like an UNO or a MINI. It also uses 3 MSGEQ7 seven band graphic equalizer chips, to split the input through 21 bandpass filters.

https://www.sparkfun.com/datasheets/Components/General/MSGEQ7.pdf

Using these components requires the ability to read the multiplexed output of each chip and to use multiple chips in order to achieve more specific frequency analysis. This is really complicated and while it is cool and conceptually more interesting to me, I feel like it makes much more sense to try and accomplish the same thing using FFT.


1/28/22

Today I did some work researching acrylic pricing to try and determine whether the acrylic design is feasible given my financial constraints. I also spent some time researching WS2821 LED strips and comparing sizing of acrylic to the spacing in between LEDs on typical LED strips. I am attempting to decompose the work done by PLATINUM in his video, however many of the components he used are not listed in his project descriptions and all of his measurements are in millimeters, making it challenging to apply this project to the supplies I have readily available in the United States.

1/30/22

Today I started by looking into past music and technology research to find similar projects. A few are linked below:

https://quod.lib.umich.edu/i/icmc/bbp2372.1985.018/3/--emulator-ii-computer-music-environment?page=root;rgn=full+text;size=150;view=image;q1=spectrum+analysis

Given that this is more of a design project, this paper is not as applicable. Despite this, the ultimate goal of this project is to visualize music with aid from computers, which is similar to the goal of the research above.

https://www.ijareeie.com/upload/june/25D_A%20Study.pdf

The study above is more of a general study into the workings of a spectrum analyzer. This is helpful information for me given that I don't have a lot of experience with actual spectrum analyzer tools that would be used for actual resonant or otherwise technical applications.

https://www.researchgate.net/publication/4344229_Real-time_RF_spectrum_analyzer_Components_and_system_development

This third paper is more useful in showing some of the components that are using in spectrum analysis and signal processing in industry.


Week of 1/31:

This week I really started to plan out the physical design of the project. I referenced project designs from PLATINUM and put them into the correct measurements for what materials are available to me in the United States. I also successfully began to order materials.

Referenced design from PLATINUM on YouTube

This is the handwritten drafting I did before developing a CAD model to determine how much of each material was necessary to complete the design.

This is the first draft of the AutoCAD model generated from the example by PLATINUM and my own calculations based on available resources.

I also cut out a test piece of acrylic to size, which is seen in the picture to the left.

The LED strip to the left is the chosen one for this project. At a density of 100 LEDs/M, the space between each LED is 5mm. Given that the width of the LED itself is 5mm and the width of the acrylic is 6.35mm, approximately 3mm of space are left between the LEDs. As seen in the CAD drawing, this spacing is aesthetically pleasing, which is why it was chosen over denser of less dense LED strips.

The power cord and supply to the left were purchased in accordance with the expected power draw of the 600 LEDs, which is approximately 20-30 amps at 5V. The acrylic glue below will be used to secure acrylic pieces to one another.

2/5/22

I began to finalize the electronics needed to run the FFT. I wanted to make sure the audio signal was being read properly so I set up this quick experiment using a headphone splitter and the serial plotter in arduino. The waveform is shown to match the music in the video to the left.

After determining that the signal was being read properly, I ran the FFT code found in the Arduino Project Hub. I plotted band 2 on the arduino plotter, which should cover mid-bassy frequencies. As demonstrated in the video, this seemed to be working.

2/11/22

Now that I have an LED strip, I was able to test the FFT algorithm. For this test I set up the code to be a 10x10 matrix, filling the 100 LEDs in the strip. It is a little bit difficult to see what is actually happening in each frequency band but the overall sense of the music is grasped here. At this time it seems like the code is going to need a little bit of work, as it is not representing the music the way I would like. Fortunately, I have nothing but time to mess with and change the code once the hardware is complete.

The RPI Forge is a student maker space that I am a member of. They have a laser cutter which I will be using extensively for this project to cut each piece of acrylic.

Cutting using the first method created a bunch of scrap pieces along the outer edge which were inconsistent in size. The supplier of acrylic had a large margin of error for the consistency in width and height of the piece, which would be incredibly visible in the final product. Because of this, each cut was losing around 46 pieces to scrap, which was too many for me to be able to complete all 600 pieces. For future parts, I cut out only an 11x11 part of the middle, as shown in the image to the left, ensuring that all pieces would be exactly the same and resulting in 603 total pieces, depicted below.

These pieces still needed to have the protective film removed, which was done by hand using a pair of scissors.

To the right is what all of the pieces look like after the protective film was painstakingly removed one piece at a time over the course of around 8-10 hours. The final product is definitely worth it in my opinion.

2/21/22:

I cut out 2/3 of the back piece that will hold all the 1" by 2" pieces, laser cutting is seen to the left. On the right is a more detailed model that I threw together in Fusion 360 just to finalize the sizing I wanted to do.

I put a few clear pieces into the back piece and ran the LED strip underneath them to test the diffusion at the proper spacing. These clear pieces are not glued in place properly so the spacing is off but with the lights off you can get a good idea of what the final product will look like.

Tuesday, 2/22/22:

I began installing the 1" by 2" pieces into the backpiece that I managed to cut yesterday.

This is an example video at 10x speed of that it looks like to install each column. I find it very theraputic. Each piece is cleaned with a microfiber cloth to get rid of dust and fingerprints before being installed. Then they are fitted into their spots in a specific way and held in place using a cardboard piece I cut out to support them while they dry. The top piece is installed first and supported using a right angle piece, this serves as an anchor for the other pieces while putting the piece of cardboard on and while they are all drying. It takes about 5 minutes for the glue to dry enough to where the pieces dont really move.

2/23/22

Here is the completed first part. I still need to cut out one more back piece but I can't get access to the laser cutter until my quarantine is over. For now, here is 20 columns installed and glued.

2/26/22

While waiting for the abilty to finish laser cutting I began to throw together some tests of the LED strips and code. It still needs to be fine tuned and has yet to be scaled up to the full 30 channels, however it is currently working with 5 columns.

3/3/22

Today I found an unlisted video from PLATINUM's youtube channel that shows him completing a 35 channel spectrum analyzer. It is beautiful and inspires me to create something with this no back panel design in the future. Importantly, it serves as a goal for me to reach, especially in terms of how clean the display is and how consistent the amplitude values are across the board. He also posted a video today showing off the board he is using ( https://youtu.be/PvLpsYzzOZw ), which includes a demo where he runs a frequency sweep. I will be using this video to base my frequency ranges off of, since an effective display uses an exponential progression of frequency bands rather than the linear one which is currently implemented in my code.

Week of 3/14/22:

I designed and cut 31 0.75" x 8" pieces of black acrylic. These pieces align the LED strips on the back of the clear pieces and serve to concentrate the light forwards.

Week of 3/21/22:

I wired up the LED strips behind the clear pieces this week, using the black rails that I glued in last week. I placed the cut LED strips underneath the main body in order to get the spacing of the wires correct. Then I simply connected the ground, power, and signal lines in series by soldering.

The above photos show some of the progress and hot gluing done to hold the strips in place. As each strip is 100 LEDs, they were connected in sets of 5 strips of 20.

The video to the left shows all of the strips turned on and playing a simple script. This was used to test brightness continuity across the LEDs and showed that all LEDs are shining at approximately the same brightness.

The video below shows a simple continuity script I wrote to test that all LEDs were wired in the correct order. As can be seen in column 26, I wired one row incorrectly and the pattern does not complete properly. I will need to remove rows 26-30 and rewire them to be in the correct order.

Above is the simple code I wrote, demonstrated in the video to the right.

Wheel() returns a color based on input integer value of 0-255.

Week of 3/28/22:

I laser cut the back piece for the remaining ten rows and glued everything together. Once the wiring and housing is complete, the physical portion of the project will be over.

First 3 weeks of April:

I laser cut and installed some final pieces for supporting the structure.

I finished installing the LEDs over all 30 columns.

I began testing the code - see the video below for a more detailed update.

Week of 4/17:

As it would turn out, all that was needed to make all 30 column work was a better arduino. Implementing the arduino Mega immediately fixed the issues.

Unfortunately, I managed to fix this not even 12 hours after I presented in class, which is what makes this success bittersweet.

Final Update as part of Music and Technology 2:

I switched the code to a version that uses discrete Hartley Transforms (FHT) instead of Fast Fourier Transforms (FFT). The FHT only calculates the real portion of the fourier transform and can do up to 256 samples instead of the 64 which the FFT is limited to. This will improve processing times and accuracy, however I have yet to successfully implement an exponential distribution of frequencies. The project is in a good place, but I would really like to bring out the lower frequencies in a major way in the next iterations of this project.

My overall thoughts and progress up to this point are recapped in

this document.