Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

My mini Christmas tree

I made a Christmas tree, in the only way I knew how.

Mini Christmas Tree

Its not fancy or big, but its certainly nerdy and awesome!

In the tree, are 18 Leds. 17 Green and 1 Red. It’s connected with a strip of ribbon cable to an AVR Atmega168.

I used the Atmega168 because thats all I had lying around, and I couldn’t have been bothered to minimize the number of pins needed by using charlieplexing instead of multiplexing to make it work with an AtTiny.

It has 3 rows of 6 LEDs. The top row is actually 5 Green Leds with the Red Led sticking out the top.

The legs of the LEDs form the structure by bending the Anodes up to solder to the Anode of the next LED.

This leaves you with 6 Cathodes and a single Common Anode.

Do this for the next Layer, but shorten the Anode legs a little so it turns out smaller than the first layer.

Repeat for as many layers as you want. The final layer in mine was 5 Green LEDs and then a Red LED. The Anode of the Red LED was soldered to the Common Anode ring, so it forms part of the same layer.

Then solder them together by putting the layers on top of each other, and soldering the Cathode of each LED to the Cathode of the LED directly below it. You’ll end up with a common Cathode per column.

Repeat until you’re happy. Then solder some wires on to each of the common Anode “rings”. Bring them out at the base of the tree so you have 6 Common Cathodes and as many Common Anodes as you have layers.

You can just see the Anode legs and the wires for Cathodes in this pic.

So 3 layers and 6 columns gives me 9 wires, so I soldered them to a ribbon cable and connected that up to an AVR Atmega168 using 6 digital pins and 3 digital pins with PWM.

I don’t do it yet, but I can use the common anodes on the PWM pins to adjust the brightness.



This post first appeared on Way Back South – Various Musings Of A Travelling, please read the originial post: here

Share the post

My mini Christmas tree

×

Subscribe to Way Back South – Various Musings Of A Travelling

Get updates delivered right to your inbox!

Thank you for your subscription

×