Difference between revisions of "ChristmasTree2012"
From Francois Louw
m (→Schematic) |
|||
Line 1: | Line 1: | ||
− | + | [[Projects|Back To All Projects Page]] | |
+ | [[Main Page|Back To Main Page]] | ||
+ | |||
+ | __TOC__ | ||
+ | ---- | ||
So for 2012 I didn't want just any boring tree, I wanted to make one myself with a bunch of LEDs and a PIC that I had lying around! | So for 2012 I didn't want just any boring tree, I wanted to make one myself with a bunch of LEDs and a PIC that I had lying around! | ||
Line 7: | Line 11: | ||
{{#ev:youtube|ShFkCYE7gvw}} | {{#ev:youtube|ShFkCYE7gvw}} | ||
− | + | =Schematic= | |
[[File:tree-2012-schematic.jpg|500px]] | [[File:tree-2012-schematic.jpg|500px]] | ||
Line 15: | Line 19: | ||
The MCLR resistor is 4.7K and the LED resistors will depend on your LEDs. Remember that there is a limit on the amount of current that the PIC can supply. I limited my 2V LEDs to 0.8mA by using 3.8K Resistors. The total current usage is 20mA when all the LEDs are on. Assuming the 9V battery has a 400mAh life then this will give me at least 20 hours. Realistically I should get 30+ hours. For timing I used a 10MHz crystal. | The MCLR resistor is 4.7K and the LED resistors will depend on your LEDs. Remember that there is a limit on the amount of current that the PIC can supply. I limited my 2V LEDs to 0.8mA by using 3.8K Resistors. The total current usage is 20mA when all the LEDs are on. Assuming the 9V battery has a 400mAh life then this will give me at least 20 hours. Realistically I should get 30+ hours. For timing I used a 10MHz crystal. | ||
− | + | =Source Code= | |
The code was written in C using MPLAB 8.60 and the HiTech C Compiler. | The code was written in C using MPLAB 8.60 and the HiTech C Compiler. | ||
Line 341: | Line 345: | ||
</source> | </source> | ||
− | + | =Result= | |
Here are pictures of the final result (ignore the quality of the makeshift wire tree) | Here are pictures of the final result (ignore the quality of the makeshift wire tree) | ||
Line 349: | Line 353: | ||
[[File:tree-2012-2.jpg|500px]] | [[File:tree-2012-2.jpg|500px]] | ||
− | + | =Copyright= | |
Everything here is under [[Gplv3|GPL 3.0]]. | Everything here is under [[Gplv3|GPL 3.0]]. |