Monday, October 6, 2014

Code for Audio Visualizations

I finally got around to cleaning up the code to my audio visualizations a bit and publishing it on BitBucket.

If you're interested, you can find it here:
https://bitbucket.org/htonoyan/audio-visualizer

Saturday, August 23, 2014

Wine Bottle Digital Clock

Circuit board done in Altium Designer. Took me a year to finally decide how to house the giant displays.

Will upload schematics/gerbers/code eventually.





Saturday, April 19, 2014

Light Show Now On Ubuntu

So my previous set up was pretty janky. If you've read my previous post, I had a win32 program using some APIs to get an audio stream, process the data and write "peak" values to stdio. This was then piped into a Python script which calculated the LED string colors and wrote them out serially using PySerial.

I re-wrote the audio capture code in Python using PyAudio. This is much cleaner now as the whole thing can be done in Python, and it works on Ubuntu!

I also had some graphics plotted really badly using win32 APIs. I rewrote that section of code using matplotlib so it looks much nicer now and is more responsive.

Monday, March 3, 2014

Heart is complete!


So I added a couple more visualizations to the LED heart from my last post, and also got a frame for it! A little bit of hacking away at the back to make a hole for the DC power jack and it was good to go! I used a 1/16" white acrylic sheet instead of the glass on the frame.




Saturday, February 15, 2014

A Valentine's Day Surprise

Update: Source code and hardware files can be found on this github page.



Last week I had the idea to create a last-minute valentine's day gift for my girlfriend. I had a bunch of WS2812 LEDs from my previous endeavors and decided to make a big LED heart. These are a great choice because of the very minimal amount of components necessary: no I/O expanders, driving transistors or ICs necessary. Plus you just need one I/O line from your microcontroller to drive them.

Since they run off 5V, I planned to create a board that is powered from a wall-wart power supply. That way the board doesn't even need a voltage regulator on it. I chose to use an ATMega48 because I have several from previous projects.

First was deciding on the placement of the LEDs. Being a bit OCD I wanted them spaced out in some organized fashion. Wolfram Math World has a post with some parametric and polar equations that plot out different heart shapes. I plotted three concentric hearts in excel and played around with some scaling factors and how I wanted them spaced out.


Now I had the coordinates for each LED so it was easy enough to load these into Altium Designer.

After a night of PCB layout I had a decent enough layout:


I used a big copper pour on the top layer for 5V, and a ground place on the bottom. In hindsight I really should have increased the spacing between the 5V pour and the other traces (that was a pain in the butt to clean up!)

But I wasn't finished! There's so much empty board space on the back! Surely it would be cool to have a cool design etched into the bottom copper layer.

Now, I'm no artist, but after messing around with a few inkscape tutorials I was able to whip up a pretty cool looking design with her name that I think looks nice.


Getting this into Altium Designer was a bit of a pain, but eventually I succeeded! I wish I could have made the design a bit bigger, but that would cut the ground connection to some of the LEDs.

Backside

I sent out the order to Advanced Circuit's bare bones service (no silk-screen nor soldermask, 1-day turn) on Sunday evening. It shipped on Tuesday and by Thursday it was in my hands! Pretty sweet!

After a few hours of soldering all the components were on the board. Then after a significantly longer time, plenty of cursing, and slightly burnt fingers later, all the short-circuits were cleared up and the board was ready to go. Note to self - don't wait until you're done soldering to start checking your connections. Boy was it fun to try to figure out what could be shorting on a board with dozens of components on a copper plane...

After the whole rush for trying to make it for Valentine's day, my girlfriend didn't even have time to see this weekend because she's traveling for vacation. Oh well, I will have more time to polish it up with more animations and a frame of some sort.


More to come!