Comments: Interactive LED Music Visualizer

Pages

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • sysspud / about 3 years ago / 1

    I built a 3D printed jukebox that uses Michael's code for the Sound Detector. Posted on hackster: https://www.hackster.io/thisoldgeek/modern-jukebox-bd1

  • Member #1591568 / about 4 years ago / 1

    Is there a limit on how many leds i can use? Because at about 250+ nothing happens.

  • Member #1556803 / about 4 years ago / 1

    Anyone know if there has been a PCB created for this?

    • Member #1576836 / about 4 years ago / 2

      You can buy a PCB that is bused exactly like the breadboard if you're looking to transfer this project to a permanent fixture and solder everything.

    • santaimpersonator / about 4 years ago / 1

      Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you.

      All the parts should be listed in the hookup guide. There is not single PCB/part for this project.

  • Member #1422487 / about 5 years ago / 1

    if I want to build this without the sound module and buttons, what would I need to build it?

    • santaimpersonator / about 5 years ago / 1

      Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you.

      However, the short answer is you can't; the sound module is needed for this project to work.

  • Member #1455418 / about 6 years ago / 1

    Hi Michael! Thanks so much for this great sketch and circuit, I'm using it for a speaker project, and of course I'll link to this tutorial when I post it on Thingiverse! I'm having a couple issues, main issue is that certain visualizations won't run the entire length of my strip, even though others will. I'm using LED_TOTAL value of 176 and when Snake or Traffic is running it stops around led #130. The Pulse and Palette Pulse are working fine for the entire strip, so I'm confident there is no hardware issue and I'm using a separate 5v supply for the leds. That's the main issue I would like to solve. I also enabled the "debug cycle" and added it to the switch case for a default, non music responsive mode, and I would like to know if there is a command or argument that would exclude a specific case from the shuffle mode and also is there a command or argument that would set the trimpot value to maximum only for the Debug Cycle loop? Thanks again for this sketch and circuit and here's hoping you might have some ideas I can try. Thanks! Steve J.

  • Member #1381922 / about 6 years ago / 1

    This project seems really interesting to me. I'm looking to set this up inside my car and have the LED's be under the dash of the driver and passenger seats to light up the floorboards. Just a few questions, would it be possible to add a Bluetooth feature to control the different settings of the lights such as solid red, solid blue, or the sound reactant lights? And if so, what would I need to actually do this? Also since I'm in a car, would the sound detector work as well, I know I can tweak the resistance levels but would there be an easier way to just connect it to my sound system? The other question is that if I wanted to power this with a cigarette lighter in my car, 12V, would that be too much voltage? And if so how would I limit that? Thank you

  • Member #980845 / about 7 years ago / 1

    So I'm kind of new to all of this, so bear with me, but the LED strip only lights up for a fraction of a second if I repeatedly touch the 5V connection from the LED to the power strip, but the strip does not light up otherwise. I have it hooked up correctly, but I was wondering if anybody could point me towards the issue/suggest next steps so I can identify the source. This is my first project like this and there might be a process that I'm missing. Thanks!

    • Member #776987 / about 7 years ago / 2

      What type of power supply are you using? To me it seems like if everything is correct, which it may not be, then the next issue I would look into is having enough power to drive the amount of LEDs you want. The amount of current/power your 5V supply is proportional to the amount of LEDs you are trying to drive, as well as how bright you are driving them.

      Each LED on the strip (WS2812) will have a maximum current draw of 60 mA (fully white). You should derate these value as the voltage will drop with current, especially cheap power supplies. so lets allocate 80 mA for each LED.

      If I assume you are using an Arduino Uno, it will need about 50 mA (source: https://www.gadgetmakersblog.com/arduino-power-consumption/); but that source is old and we should always derate our power requirements. Lets assume 100 mA for the microcontroller.

      80 * #LEDs + 100 = power supply current rating [mA] or multiply by 5V for your power (if your post you state you are using a 5V supply) 400 * # LEDs + 500 = power supply power rating [mW]

      If you are using the 1m cable discussed in this article the you are using 60 LEDs, so:

      80 * (60) + 100 = 4900 mA or 4.9A, which is also 24.5W on a 5V supply.

      A power supply of this size I am sure would work, however if I were to do the calculations without the derating you will find you may be able to get away with a 3.65A power supply. I recommend you get a power supply closer to 4.9 A (or greater, more power capability is always fine). This is also assuming that your power supply is only powering this circuit,and nothing else, otherwise add the power requirements of that circuit to the 4.9A.

      Another Tip: I would not pull the 5V power through the microcontroller, I would follow the schematic in the tutorial and have the power supply directly feeding the microcontroller and the strip

  • Member #1025036 / about 7 years ago / 1

    Hello, Thanks for a wonderful tutorial! This really sparked my interest into doing some DIY electronics as i was looking to do this very thing with some LED strips i aquired. I couldn't fine any premade products that would do this for DotStar LEDS, so i dove in to your tutorial and making something from scratch.

    The more i dove in to it, the more tweaks i wanted to make. I ended up duplicating your entire setup, and porting the program over from using NeoPixels over to DotStars (which wasn't too difficult). However i wanted to use a direct music feed instead of a mic, so i ended up crawling the internet until i found another tutorial ( https://www.instructables.com/id/Arduino-Audio-Input/ ) on how to do this. I duplicated this, however i didnt want to use batteries, nor use two power supplies so i ended up digging around and finding a tutorial and diagram on how to create a dual rail power supply from a single source. But of coarse it needed to have a higher voltage than the rest of the LED circuit, so i had to figure out how to make a DC-DC boost converter.

    I had breadboards set up all over the place. It was starting to become a fire hazard. After i verified that things were mostly working i decided that i needed to probably solder everything together on a board. Naturally that meant that i had to learn how to use Eagle to design everything up. Thankfully i have access to a PCB milling machine, so after 1 failed board i made necessary adjustments and milled a second, which still had some things quirky about it but it worked... WAY better than it did with the bread boards. I hop on here and get ready to thank you for your wonderful tutorial and low and behold i discovered that sparkfun already has nearly everything that i built from scratch over the coarse of a month from components our Electrical Engineering department was throwing away.

    That being said, I do have 1 problem that i am running into. It seems like the number of LEDs i address directly affects the performance of the Arduino. I start noticing a decent amount of slowdown at higher numbers, almost like the frame rate is too slow. Also at some point between 200 and 250 LEDs the program just doesn't even try to compute. Im planning on using 5M strips under tables at an event im hosting, but they are 300 LEDs. Is there something in your code that needs to be changed to allow for that high of a number? Otherwise i'll have to cut my strips in half and just duplicate the signals again, which isn't a huge deal, i just dont want to have to run that much extra cable. Any suggestions you have for speeding it up at higher LED Counts and how to get it to compute at 200+ LED numbers would be greatly appreciated.

    • M-Short / about 7 years ago / 1

      A large part of the problem is probably just the amount of time it takes to send commands to that many LEDs (plus all the other things the board is trying to do). You might try an Arduino board with a much faster processing speed that can handle that many instructions. But grabbing a second Arduino and splitting things up might be just as easy/cheap.

  • Member #944799 / about 7 years ago / 1

    Hi, I have a small question, is it possible to get the same results using the MAX9814 microphone module. Since you are using the Envelope output, i was wondering if it is going to change the output result or not?

  • Member #915451 / about 7 years ago / 1

    I try to compile it for a wemos D1 board (ESP2866) but get the following error :

    In file included from /Users/BenEngelen/Library/Arduino15/packages/esp8266/hardware/esp8266/2.0.0/cores/esp8266/Arduino.h:38:0, from sketch/Music_WEMOS_D1.ino.cpp:1: /Users/BenEngelen/Library/Arduino15/packages/esp8266/hardware/esp8266/2.0.0/cores/esp8266/esp8266_peri.h:26:30: error: expected unqualified-id before 'volatile'

    define ESP8266_REG(addr) *((volatile uint32_t *)(0x60000000+(addr)))

    ^ What could be wrong?

    PS. The strand test works fine

    Thx,

    Ben

  • Member #908295 / about 7 years ago / 1

    Hello, i´m relative new to the arduino community. I really liked your project!!!
    I have build a music visualizer based on the msgeq7, and i don´t understand how you split up the audiosignal in the different frequency bands using your program. I just can not find the part of the code, witch does what you are showing in the first part of the demo-video, with the hardware provided (just the Sound Detector and the arduino). Also i´m quiet amazed how clean the signal from the mic is. (i allways had problems with using a mic on my projects.)

  • -------------------- Tech Support Tips/Troubleshooting/Common Issues --------------------

    LED's Not Lighting Up?

    If you are using more than 32 LEDs, try checking line 11 and adjusting the amount of LEDs to match the number that you have in your setup. If you have LEDs that are not lighting up after 32, this might be the reason.

    Sensitivity

    If you are in room flooded with noise, you may want to adjust the sensitivity of the sound detector [ https://learn.sparkfun.com/tutorials/sound-detector-hookup-guide#configuration ].

    Resistor Closeup

    However, the default example was able to pick up beats distinctly when testing it in a dance studio. The addressable LEDs would clearly react.

  • Member #838031 / about 8 years ago / 1

    Hello,

    I am really interested in this project, but I do have some questions before I begin.

    Is it possible to use an audio jack (3mm) input instead of microphone like on the sound detector board?

    Also, how do I power the redboard, is the power cord included or do I have to buy it separately?

    • Michael Bartlett / about 8 years ago / 2

      Hello,

      It is possible to use a direct audio feed. I'm not experienced with using a raw audio feed, but if you didn't happen to catch the video for my spectrum-analyzer visualizer near the end, it is done using a direct audio feed into the spectrum shield. It has on-board 6mm jacks that you can plug standard auxiliary cords into. It splits the incoming audio into several volume-levels of various frequency ranges within the audio, arguably making it a little easier to work with. Some code for how to program the spectrum shield and use it with NeoPixels can be found in this repository.

      As for powering the RedBoard, you can do so through a Mini-B USB, through the on-board barrel jack, or any current between 7 to 15VDC to the "VIN" header. No cables or power supplies are included with the RedBoard itself, but they are available separately on the store page. For example, here are 6-inch and 6-foot versions of a Mini-B USB cable.

      Hope this was helpful; let me know if you have any other questions!

  • REDACTED-GDPR / about 8 years ago * / 1

    Hello,

    I would just like to say what an amazing job on the tutorial and how the RGB lights work! Some questions though. Instead of using one meter of the lights, would one be able to connect a set length of lights such as 5 meters and still achieve the same output? Simply by changing the code or will there have to be additional hardware associated with the project? Also, I plan on using SMD 5050 RGB light strip, will this product be compatible with the code and hardware?

    • Michael Bartlett / about 8 years ago / 2

      Hello, and thank you for the kind words!

      The project as it is shown is approaching the reasonable maximum amount of LEDs if powering them with an Arduino (at least if you'd want to ever show full white on all LEDs at once). It's more dependent on the number of LEDs, so if your 5 meter strip has more than 60 LEDs, then you'll likely need to introduce a separate power supply that is dedicated to just powering the LEDs. The neopixel power recommendations suggest using a lithium-polymer battery, but you could feed in power from an outlet so long as it doesn't exceed 5-6V. For current, their rule of thumb is to multiply the number of LEDs by 60mA and divide by 1000, so for 60 LEDs you'd get 60*60/1000 = 3.6 Amps minimum.

      But of course you said you plan on using different LEDs. First off, it's unlikely that anything which isn't explicitly a "NeoPixel" product will work with the code that is provided on this tutorial, so I'd advise being prepared to rewrite a large portion of the code in that case. The main reason being that the NeoPixel library used in the code is catered to NeoPixels specifically, so you'd need to use a more generic library, such as FastLED. Secondly, if you're wanting to control the color of each individual LED on your strip, make sure it explicitly states that the strip is "addressable" on the product page, otherwise it will likely only be able to display the same color across the entire strand. Otherwise, 5050 RGB is what you're looking for (to be exact, any RGB LED will be 5050; more can be read about that here).

      In short, if you're prepared to rewrite code using a different library then a different addressable RGB strip shouldn't be an issue, just be sure to read up on its specific power requirements to prevent burning it out! Regardless, it's likely you'll need to introduce a dedicated power supply for the LEDs separate from the Arduino for 5 meters.

      Hope this helps, and feel free to ask any other questions you might have!


If you've found an issue with this tutorial content, please send us your feedback!