Search My Blog

Monday, December 5, 2011

Embedded Projects by Zach: Star Wars Christmas Tree

Sunday, December 4, 2011

Star Wars Christmas Tree

In addition to all of the Christmas trees, ornaments, stockings, garlands, and other decorations that fill our house for the Christmas season, my wife lets me have one small tree of Star Wars Ornaments.  For the past few years it has been unlit, and she decided that it needed some lights this year.  She found a battery operated strand of 30 white LEDs on sale at Target last week, but I figured we could do better than just plain lights.....we needed Star Wars lights.  I built a small controller for the light strand that makes it flash in the pattern of the Star Wars theme song.  The basic concept is that the note durations are how long the lights are on, and the pitch translates to light intensity.  The lowest note in the song corresponds to the dimmest light setting, and the highest note to the brightest. 

I first cut the strand and measure that it draws ~70 mA with a new set of 4xAA batteries, which is way more than a mcu gpio can output, so I started with a 2n3904 transistor to turn the strand on and off.  I really only needed 1 pin from an mcu, so I went to my parts box and dug around for small micro controllers.  The two options I had on hand were an AVR ATTINY85 and a handful of MSP430 micro controllers.  I had a couple of ez430 thumb-sticks that TI was giving away a while ago, along with a pack of the extra target boards, and this project was well suited to the small form factor and ease of use that those provide.  I ended up using one of the MSP430F2012 target boards.  It has a built in LED, which I did my initially firmware testing with to get  the note lengths and song pace working right, and then I used PWM output from the Timer A module to control the intensity of the LEDs on the actual strand.  


Hmmmm... I don't know much at all about Circuit Boards, but I'm very interested in learning. I read allot about Development Boards and Hacking them and Embedded Software. I even got a Free TI MSP-EXP430FR5739 through Element14 for writing a Review on the Board!:) I want to learn enough to use it in a project. I haven't Put up any Christmas Lights in years. But, now I'm kind of wanting to;)


Star Wars Christmas Tree
The force is strong with this Christmas tree light show - Hack a Day
Embedded Projects: Star Wars Christmas Tree
Star Wars Theme Song Christmas Tree Lights - YouTube

No comments: