Christmas Tree Ornament 2012

christmas tree ornament2012

This is the Christmas Tree Ornament I made. It's a custom PCB that I designed in the shape of a Christmas Tree. The little 8 pin black chip you see on the front of the board is an Atmel ATTiny45 Microcontroller. It has 5 IO pins, and there are 20 LEDs on this board. Each LED is individually addressable through a clever trick known as Charlieplexing

I wanted to keep this design as simple as possible. It's got no decoupling capacitors, as it runs just fine without them. It's using the ATTiny's internal oscillator to run the chip at 8MHz. It could run at 1MHz, but the lights flicker too much at the lower speed. There's no voltage regulator onboard, so it needs about 4-5v, anything past 5.5v will damage the Microcontroller. Below 4v and the blue LED's stop working.

I also didn't include a power jack. I figured power could just come in the ICSP (that's the 6 pin connector in the trunk of the tree) header. The ICSP header is used for programming the ATTiny. I did include resistors for the LED's, I went with 50ohm resistors, which are always run in pairs, so the LED's see 100ohms of resistance. The resistors aren't actually needed to protect the LED's, due to the fact that they are cycled on and off at such a high rate of speed, they're more to allow programming of the microcontroller chip. I found that without the resistors, I couldn't program the chip, the LED's were messing with the signals coming in from the programmer.

Another item I left out of the board design was a ground plane. I wanted this to be a very geeky item, so I felt that being able to clearly see the PCB traces would fit that goal much better. It's cool to see the traces running around the board. It also allows the light from the back side to glow through a little better. Besides, this board doesn't need a ground plane any more than it needed decoupling capacitors.

I programmed the ATTiny with the Tiny extensions added to the standard Arduino IDE. And I used the USBTinyISP to program the chips via the ICSP header.

Here's a video of me soldering the boards together, it's a bit long winded, but I managed to keep it down to 10 minutes.

Here's a shorter and more fun video with my son and I showing the board in action:

As you have probably noticed a couple times now, this board has an open source hardware logo on it. I put it on there both because it looks cool, and because I really support the idea of sharing and possibly improving each other's hardware designs.  

Open Source File Download HERE. - Includes the Eagle .brd and .sch files used to create this board. As well as a Bill Of Materials with part numbers from Mouser to populate the board. Also includes the Arduino sketch that's running on the boards as of the time that I put that zip file together. The great part of this design is, if you only use the Schematic file, you can use this design for all sorts of things. I made a  Snowman, a CandyCane, and a few others using this same schematic. 

On the chance that you'd just like to see the schematic without having to download Eagle, here it is:

Screen Shot 2012-12-16 at 3.43.38 PM

That schematic may be a bit hard to follow, I found it was easiest to follow (when I built the circuit in a breadboard) if I printed it out, and then used 5 different color markers, one color for the trace off each CPU pin. Then it's a lot easier to follow.

And finally, here's the sketch that's running on this Christmas Tree Ornament. I still need to go back and add more comments. Hopefully it's easy enough to follow. Be sure to read the Wikipedia Page on Charlieplexing that I linked to earlier, it'll help you better understand what's going on in my code.

© Una 2011