Switching gears from 3D-printing to a little more electronics, I've been wanting to play with LEDs and music for quite a while. Primarily have LEDs pulse and/or change color based on sound intensity. There are a plethora of different ways to go about this, and some of them that I had thought of were:
I initially thought about putting a piezo electric sensor on or near a subwoofer and gathering sound data that way. Quickly, I realized that the bass would really have to have dropped in order to pick anything useful up with that. While cool, this method wasn't exactly practical in my case.
Tap Into the Audio Signal
This approach seems simple enough. Splice into the wire or utilize a Y-adapter in order to branch the audio signal out to a microcontroller. Admittedly, I didn't pursue this option because I didn't want to cut up an audio cable and I wasn't entirely sure how to handle the signals at the Microcontroller level. Of course, shortly after working on this little project, the fine folks over at Adafruit released this nice, bread-board friendly audio jack.
Processing Utilizing A Microphone
While digging around audio processing, fast fourier transforms and all sorts of other interesting things, I stumbled across Processing, which is a very cool IDE capable of all sorts of things. Of most interest for this project, capture audio through a microphone and send it out over serial.
While I say NeoPixels, I really used an RGB led strip from RGB-123. They are in essence the exact same thing, I simply funded the guy's Kickstarter and received a 1x8 strip from him (Adafruit version pictured).
The actual circuit is quite simple, only requiring a few passive components for peace-of-mind as most of the circuitry is included on the LED strip itself.
A small, 300-600 ohm resistor and a 47uF (largest I had) capacitor were used.
Code can be found on my Github page (also linked to in the site's menu). As of this posting, it is still a work in progress and tweaks are being made, but if it's in the repository, then it should work.
Subscribe to Cognipository
Get the latest posts delivered right to your inbox