Saturday, December 14, 2013

Tardis Christmas Tree Topper



This year for Christmas, my Wife and I wanted a Doctor Who Tardis Christmas Tree Topper. Unfortunately, there doesn't seem to be one that exists, so what is a guy to do? Make one of Course!

The Tardis is from a Doctor Who ice bucket (No, I'm not kidding) we bought off of Amazon. Its decently sized, and probably bigger than I needed. I then took out the actual Ice bucket, and strategically drilled holes in the bottom for wires and the tree, I also added two partitions on the inside to keep the tree from going straight through the top.

The original windows are conveniently a black plastic that I removed, and replaced with simple white paper to act as a diffuser. I then drilled a small hole through to the lantern, and hot glued an RGB LED. I then coiled a 1M strip of SW2801 LEDS so they would fit appropriately in the window.

I used a spare Arduino Duemilanove I had laying around. And wired it very simply using jumper wires.

After making it all fit, I then used the FAST_SPI Library to create a number of patterns. This was a quick and dirty project, but I am very satisfied with it. The next step is of course to add a speaker to play the Tardis sound effect on command!

For the code, I used a number of tricks I picked up to get the effects I wanted. This includes using a Bezier curve function to generate the fading lights, time based functions to keep consistent programing, and creating core functions such as writing to rows and columns to simplify patterns.

I also wrote most patterns so they could control the Lantern(Top LED) and the windows separately, allowing me to still have the Lantern flashing blue, while the windows did other things.


The patterns I was able to quickly implement with this code and in the video:
  1. Fading White Windows, and a Red/Green Lantern on top!
  2. Random Fading Colors
  3. Fading White Windows with a Blue Lantern
  4. Fading through a rainbow(HSV Shift)
  5. White Sparkling Windows with a blue Lantern
  6. Random Sparkles with a Random Lantern
  7. Scrolling Up Blue
  8. Scrolling up Rainbow
  9. Scrolling Red/Green
  10. Scrolling Dual Rainbow(HSV offset)
  11. Horizontal Scrolling White, with blue Lantern
  12. Horizontal Scrolling Rainbow
  13. Dual Horizontal Scrolling White
  14. Dual Horizontal Scrolling Red & Green
  15. Dual Horizontal Scrolling Dual Rainbow
  16. Full Plasma Rainbow around windows.
 
 




2 comments:

  1. Out of curiosity would you be up for sharing the code you used for the arduino?

    ReplyDelete
  2. I was wondering the same thing. I've been trying to learn more about some of the tricks you used (especially the Bezier curves for fading, and the time-based functions) but I haven't found much yet. Even breadcrumbs or portions of code would be helpful.

    ReplyDelete