Page 1 of 1

Wearable ws2812b LEDs for music visualisation

Posted: Tue Sep 12, 2017 11:21 am
by Durrrrg
Hi
I'm trying to plan out my first real project using the raspberry pi, some ws2812b LEDs and a microphone.
The goal is to have a 'costume' (therefore powered by batteries) consisting of lights reacting to the music picked up over a mic.
I don't really have any previous experience in this domain and I'm on a tight time schedule and I am therefore trying to figure out what parts I have to order to make this work on the first try.
I have picked out some parts that I think should work, while being 'relatively cheap', compact, and reusable. If anyone with more experience than me could approve my plans or explain to me what could potentially go wrong, that would be very much appreciated.

I'm planning on doing the visualisation using this github project:
https://github.com/scottlawsonbc/audio- ... -led-strip
I'm ordering a PI 3 for that purpose.

For the audio input I plan on ordering one of these usb soundcards: https://www.amazon.de/gp/product/B01N90 ... FPIF&psc=1
and use the modmic i already own: https://www.digitec.ch/en/s1/product/an ... on-3511087

I plan on creating a LED strip using the flora neopixels: https://www.amazon.de/gp/product/B00SK8 ... HMZR&psc=1
and some conductive thread for wiring it all:
https://www.amazon.de/gp/product/B00AQN ... P1H8&psc=1

Now the important part: Powering the entire thing.
Is it actually possible powering the LED's and the raspberry pi using just the two usb slots on the following power bank:
https://www.digitec.ch/en/s1/product/ra ... ks-5846632
using this adapter for powering the lights:
https://www.amazon.de/gp/product/B073QN ... HLKZ&psc=1
and some capacitors for security:
https://www.amazon.de/gp/product/B00CWQ ... 5EN8&psc=1

Any feedback & recommendations on how to do this would be very much appreciated :)
Thanks in advance!

Edit: Or as the usb adapter is for charging batteries, would it make more sense to use a usb to DC 2.1mm adapter (https://www.amazon.de/gp/product/B00M55 ... B7XF&psc=1) and then a DC power adapter? https://www.adafruit.com/product/368

Re: Wearable ws2812b LEDs for music visualisation

Posted: Sat Oct 27, 2018 11:13 pm
by pinkman
Hi Durrrrg,

that's an awesome idea and I found your post as I am currently looking into this as well.
How is your project's status? Did you manage to build that costume?

Cheerio!

Re: Wearable ws2812b LEDs for music visualisation

Posted: Sun Oct 28, 2018 9:25 am
by B.Goode
[ Post overtaken by events. Deleted as no longer relevant. ]

Re: Wearable ws2812b LEDs for music visualisation

Posted: Sun Oct 28, 2018 10:32 am
by Durrrrg
pinkman wrote:
Sat Oct 27, 2018 11:13 pm
Hi Durrrrg,

that's an awesome idea and I found your post as I am currently looking into this as well.
How is your project's status? Did you manage to build that costume?

Cheerio!
Hey Pinkman

I did actually build the costume. In the end I had to solder the LED's with regular cables, as I ordered the wrong conductive thread (not thick enough) and used a consumer grade power bank, usually used to power phones etc. and it worked as expected.

What I did not think of though, is that at a party there is people that talk (usually), so there is a lot of white noise that ruins the audio input.
If you have some way of filtering that it might work great. I did not and the lights were just on on constantly. It did work more or less perfectly if the audio input was close to the mic or if there was no noise.
Just as a FYI :D

Still a fun project regardless.

Cheers

Re: Wearable ws2812b LEDs for music visualisation

Posted: Sun Oct 28, 2018 10:38 pm
by pinkman
Hey Durrrrg,

nice that you managed to build your costume!
I think the noise problem can be remedied with a software filter. Either the mic sensitivity could be reduced or you really apply an audio filter. I speculate, a low-pass filter might be helpful although crowd noise is not at high frequencies. This might help that the LED react to the music's bass and can be done with pyaudio probably.
There is a tutorial on noise reduction but I am not sure if this can be done on-the-fly: https://healthyalgorithms.com/2013/08/2 ... h-pyaudio/

Would you be willing to share some pictures or even a little guide on what parts you used and how you put it all together? I would like to learn from your experience! ;)

Cheers

Re: Wearable ws2812b LEDs for music visualisation

Posted: Wed Oct 31, 2018 10:02 am
by Durrrrg
Hi Pinkman

Here's a quick video I made of just the soldered LED's when it first worked:
https://drive.google.com/file/d/1pom1qD ... sp=sharing

I won't have the time to write an entire guide (and I don't think it's necessary), but I can give some tips of what I would differently:

I soldered every single LED with 3 quite flimsy cables connecting it to the next one. Ignoring the fact it's super tedious to do it's also not very stable. So connections broke after a while. I would recommend buying an LED strip or using the conductive thread (Order the thick enough kind so you can connect longer chains if you're going with thread). The strips would be a lot cheaper though and a lot less work.

As you already said, filter the audio input in some manner. The lowpass filter should probably give you the best results possible with this setup. (Sadly no differentiation of LED"s depending on frequency)

Other than that it's actually quite straight forward. Just check that you get the right voltage on your data connection.

I mainly worked with this guide:
https://learn.adafruit.com/adafruit-neo ... -neopixels

Have fun with your project!
Maybe post your results here when you're done ;)

Cheers!