3D Spectrum Analyzer uses 1280 LEDs

One of [Dooievriend]’s friends recently pressed him into service to write software for a 3d spectrum analyzer/VU that he made. The VU is a fairly complex build: it’s made up of 1280 LEDs in a 16x16x5 matrix controlled by a PIC32 clocked at 80MHz. [Dooievriend] wrote some firmware for the PIC that uses a variation on a discrete Fourier transform to create a 3D VU effect.

j6v2i When [Dooievriend] set out to design the audio analyzing portion of the firmware, his mind jumped to the discrete Fourier transform. This transform calculates the amplitude in a series of frequency bins in the audio—seemingly perfect for a VU. However, after some more research, [Dooievriend] decided to implement a constant Q transform. This transform is very similar to a Fourier transform, but it takes into account the logarithmic way that the human ear interprets sound.

[Dooievriend] started implementing the constant Q transform using an interrupt-based sampler, but he quickly ran into issues with slow floating-point math on his PIC32 (which doesn’t have a hardware floating-point unit). Thankfully he rewrote his code using fixed-point math, and the transform runs nearly real-time. Check out the video after the break to see the VU in action, and a second video that gives some details on the hardware build.

46 thoughts on “3D Spectrum Analyzer uses 1280 LEDs

  1. “.. constant Q transform. This transform is very similar to a Fourier transform, but it takes into account the logarithmic way that the human ear interprets sound.”

    One thing to note here is that the BIN SPACING in the constant Q transform corresponds to musical notes. So 2 adjacent bins are also 2 adjacent musical notes (twelve-tone equal temperament).

    The AMPLITUDE output id often already logarithmic, just like our hearing.

    So while this might be a nice visualization for musicians, it servers no purpose as a spectrum analyzer for non-music related science.

    1. don’t get me wrong here, i’m not dissing anything, I just thought that was unclear from the write-up.
      It’s a very nice project, and technically it -is- a spectrum analyzer, but you can’t use it to test some filters for instance.

    2. Nicely spotted; I agree! Also, the article is a bit wring on what the Fourier transform does:

      > This transform calculates the amplitude in a series of frequency bins in the audio

      No, it doesn’t. It calculates the complex coefficients that you’d have to multiply the n.th complex sine

      e^(j * 2 * pi * n / l )

      with j being the imaginary unit, and l the length of the transform. Based on these coefficients you *can* calculate the amplitude. Also notice that a digitized audio signal would usually be a real signal, leading to a symmetrical spectrum.

    1. I’m like the exact opposite. The programming is no problem but building all that stuff as accurately as he did would end up giving me a migraine. There’s so much that went into this build. And an at-home photoresist-based PCB setup is ingenious.

  2. I want to see a long exposure photo of this, set to the mode visible in the animated GIF, and mounted on a linear actuator (with the axis aligned along the VU meter’s thinnest dimension) to create a long, volumetric plot of the sound.

  3. Great Making off, great build, read his youtube description, he had to REDO the soldering of over 1000 leds !
    Just for fun, the word PCB was used 47 times in the video.

  4. The project is simply amazing. The “making of video…” EPIC!

    Thank you for taking the time to not only building this great project, but to also document your build so thoroughly! Bravo!

  5. I’m completely in awe here. And I can’t give the builder enough credit for the making of video. So much great information, so many great tips, and such a professional build.
    Hat’s off!

  6. Gorgeous build and a very nice video to boot :) I doubt I will ever build anything this cool but it is what I always wanted after my first viewing thru a wav editor many years ago. Great job and hope you guys enjoy your beautiful device :)

  7. I’m impressed, but a little surprised that audio input is located near the top, it would be a relatively small thing to put it lower so the cable isn’t dangling so visibly. It’s odd after all that meticulous precision you see in the making-of video..
    But it can be altered later though.

  8. Hi guys,

    A friend of mine told me that my 3d spectrum analyser was on hackaday. After reading all these comment I’m just humbled and overwhelmed! Thank you all! I hope you learnt a lot from the making of video.

    Here are the answers to some of your questions:
    – I’m from Belgium. I’m not sure which accent you hear in the video but in Belgium we study Dutch, French, German and English. So pick the one you want ;-)
    – I put the audio input near the top because most of the space in the box was taken by the PCB’s. There was not enough space for the audio jack to be put lower. A slight miscalculation but it’s not disturbing at all.
    – Most of the ideas for the “making of video” came when I was biking from home to work and back. A lot of things in the video were added through acting for more clearness after the box was built.
    – Unfortunately I cannot make more of this device because after soldering 10.000’s of leds my hands would fall off :-). But I will be uploading videos with this device hooked up to my piano.

    Cheers!
    Ratmir

  9. hie pianistos,
    I love your video presentation , and your work inspired me to make one of my own , though i have never worked on any pcb designs before. from getting a copper plate to get the print on the plate is one of the toughest part for me , so can i request a complete step by step process on how you started and concluded , with the circuit board diagrams and also the procedure for making the pcb design . Its nowhere available on the internet .

    Thanks for sharing your work
    Will be waiting for your reply ..
    Regards

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.