Saturday, April 6, 2019

Tesla Coil Video

First post in a few years! Life got a bit busy. I think I'm going to be primarily focusing on video posts, and this is my very first foray into that.

Sunday, November 15, 2015

Halloween "The Sims" costume with color changing LEDs

This year my girlfriend and I wanted to make a The Sims costume for Halloween. We took a few pics of the build process for anyone else that might be interested in making one.

Wednesday, July 1, 2015

Hardware Files Now on GitHub

I finally started using Git for my hardware files as well as the software files. You can now find all the schematics and PCB project files for my LED Heart and Digital Clock on my Github page. The files are in Altium Designer format, but I have also included a PDF output and Gerber outputs for the PCB.

Saturday, May 16, 2015

Using a PS3 eye toy with OpenCV

I was looking for a USB webcam that I could use for doing some openCV/digital control systems projects. The PS3 Eye seems like a great product for this!
  • $7 on Amazon!!
  • Standard USB interface
  • 640 x 480 resolution. Not great but...
  • 60 fps framerate, up to 120 fps with lower resolution (320x240)
  • Did I mention...$7?!

So I tried this out with a simple program I wrote in OpenCV, and after actually writing a frame-rate counter I realized that I actually wasn't running it at 60fps! Hmmm. Turns out you need to do a little bit of work to get the settings just right.

Sunday, April 26, 2015

Waterfall audio visualization

So it's been a while since I've posted. I didn't realize I had not posted my favorite LED visualization so far, a "waterfall" display.

Currently I am still using an ATmega48 to control the LED strip, and a basic FTDI cable to talk to the ATmega. In the future I would like to use a teensy and the ws2812 library in order to control more LEDs.

More to come...

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:

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.

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.

Saturday, December 28, 2013

Better oscilloscope visualization

Working on better oscilloscope triggering to get a less jittery display. Not sure how this would look on an LED display with limited resolution, but it would look pretty sweet with a laser projector (a project for the future, maybe?).

Next up is an audio spectrum analyzer!

Thursday, December 26, 2013

Oscilloscope Visualization Using C++

I got audio capturing to work using the example code from MSDN. By setting my default input device to the "stereo mix" I'm able to get my program to grab all the audio data being sent to my sound card! Using this will enable me to create visualizations like an oscilloscope, spectrum analyzer, and a beat detector.

Here's a quick program I wrote up in C++ drawing directly to the command prompt for a simple oscope visualization. It does really basic triggering on a rising edge so the scope doesn't "dance" around.

Monday, December 23, 2013

LED Strip Peakmeter using WS2812 aka Adafruit "NeoPixel" LEDs

(Unfortunately, the video doesn't do it much justice and it looks MUCH better in person)

This is a basic peakmeter I made using the Neopixel LED strips obtained by the adafruit store. If you haven't seen these before, they're pretty sweet because the driver circuitry for each LED is built into the LED itself and is controlled through a 1-wire serial protocol which can be daisy-chained through the whole strip. This means you can control the color and brightness of each LED individually using a single wire and you don't need any high current FETs on your board to do all the color switching.

The project currently consists of 3 parts and is a rather dirty way of doing it.

A C++ program gets peak meter data and prints it to stdout. This is piped into a python script which figures out the colors for the strip. This is then sent through serial to an AVR which then finally sends it through to the LED strip using the WS2812 serial protocol.

More details:

  • The C++ program running on windows uses the Peak Meter API included in Windows Vista and newer to get the system peak meter value and print it to stdout as an integer between 0 and 255.
  • The python script reads this number through command line redirection (a simple pipe) and figures out the color and brightness of each LED. It puts all these together in a very basic frame structure and uses pySerial for serial communication to an FTDI module which then speaks UART to an ATMega48 I have on a very basic devboard I made for myself a long while ago.
  • The ATMega48 waits for frames to come in and then pushes out the corresponding string of color using code taken from the Arduino library written by Adafruit to communicate with the WS2812 chips. Because of the strict timing requirements needed for the WS2812, it's rather tricky to get running on an 8MHz processor, and needs to be done in assembly. Luckily the good people at Adafruit had already provided this for free so I was able to use that without dealing with that mess myself. In the future I will probably just use a faster CPU as to not have to deal with that issue.

My future plans for this are to use the Audio capture APIs in windows to get the actual waveforms for audio being played on the system. Then I can do some fancier visualizations with several rows of the LED strips (spectrum analyzer, oscilloscope view, etc). Eventually it will be a continuous dance party in my apartment =p.