headLamp: computer controlled LED lamp
 
 
Premise:

headLamp is about 300 leds soldered into a metal colander (like you use for straining noodles), which happens to be the perfect size and shape for a lamp. The leds form 7 seperate segments of red, green, and blue. These segments are wired to a circuit and controlled by the parallel port. A manual lamp interface as well as an iTunes plugin were written. See the headLamp in action on Google Video

 

The Circuit:
Design was cut down considerably once I realized I could use the parallel port instead of the serial port. The parallel port has 8 lines for data, and since my lamp has 7 segments, i could do all the work on the computer instead of building a state machine as I originally planned. A logic high on the parallel port triggers a logic low on NOR gates, which act like inverters. A constant voltage is applied to the top of the lamp and wired to all LED anodes. When a logic high is sent, the output goes low and current is allowed to flow through the specified LED segments. I didn't add any resistors because I figured the natural resistance of the lamp caused by shoddy workmanship would pick up the slack.
 
The Plugin Algorithm:
The iTunes plugin is written to accept sample data from iTunes when a song is playing, which takes the form of an integer between 0 and 128. The plugin operates under the assumption that a rhythmic beat is likely to send a higher value, around 120. If a sample value over 120 is sent, the plugin changes the lamp's state based on preprogramed patterns like rotations, buildups, etc, as seen in the video. However, a large amount of samples above 120 are sent during each rhythmic beat causing the lamp to cycle much faster than one can perceive. To compensate, after updating its state, the lamp is unable to change again until atleast 10000 samples less that 120 are received, assuming that the next value over 120 corresponds to the start of a new beat. The plugin can adjust this threshold value to accomdate quiter songs.
 
Questions or comments, email me at zdicklin@purdue.edu
 
Video:
See the headLamp in action on Google Video
 
 
Photos: