Introduction: LED Scrolling Christmas Tree Ornament With Built in Video Game!


Hello all and welcome to this Christmas tree decoration instructable.

This ornament is designed to hang on your Christmas tree just like any other decoration, but it's just that little bit more eye catching! When you turn it on it will scroll a "MERRY CHRISTMAS" message across the 8x8 display. Not interesting enough for you? Well just grab the ornament from the tree, turn it off - hold down one of the push buttons - then turn it on and now you will be presented with (possibly) the worlds smallest Christmas tree ornament video game - SANTAS SCRAMBLE!

The game is very simple, you press one of the two push buttons (on the rear of the unit) to move santa either to the left or to the right in order to avoid the oncoming obsticles (preventing him from delivering presents to the children...) the game gets faster the further you get and will tell you what level you made it to if you crash.

To return to the scrolling message, just turn it off then on without holding down a game button.

Here is a youtube video detailing the project:



If you would like to buy a make it yourself kit, feel free to send me a message. Or if you would just like the circuit board on it's own then let me know also.

The kit contents:

- 1 x PIC16f677 microcontroller (SMD)
- 1 x 8x8 bi-colour LED matrix
- 1 x coin cell battery holder
- 1 x PCB
- 2 x coin cell batteries
- 2 x 10k ohm resistors (SMD)
- 2 x mini push buttons
- 1 x mini slide switch (SMD)


The complete kit is $8.95US
PCB on its own is $3.95US

Alternatively you can download the pcb layout from the link below. It is in diptrace format you can download a freeware version of diptrace from www.diptrace.com





Step 1: Getting Everything Together.

First off we need to gather together all the items required to make this kit.

The kit contents:

- 1 x PIC16f677 microcontroller (SMD)
- 1 x 8x8 bi-colour LED matrix
- 1 x coin cell battery holder
- 1 x PCB
- 2 x coin cell batteries
- 2 x 10k ohm resistors (SMD)
- 2 x mini push buttons
- 1 x mini slide switch (SMD)


You will also need:

- pickit 2 (or similar programmer)
- Experience in soldering
- Soldering Iron (with a small tip)
- Solder
- Solder wick (optional)
- Flux (optional)


The solder wick is very handy when soldering surface mount components if you ever solder pads or connections together. Also, flux is unbelievably handy when you want to achieve a nice smooth finish and ease of soldering.

So fire up your soldering iron and lets get started!

Step 2: Soldering in the Pic Microcontroller.


The first component to solder in is the microcontroller. Now this is the trickiest component due to the close spacing of the legs on the chip. This is why I can't emphasise enough the importance of flux. It will make soldering this chip in so much easier.

So with that said, apply some flux to both sides of where the microcontroller will solder onto.

Once done, apply a touch of solder to the top right and bottom left pads.

Then get your microcontroller and line it up with the pads. heat up the two pads that you presoldered. This will hold the microcontroller in place which will make it easy to solder in the remaining legs.

Once all legs are soldered in, it should look a little something like this picture.

Step 3: Ready for Programming!

Now that you have soldered in the microcontroller you are ready to program it with the hex file.

(You can download this file from this page)

The PCB has 5 pads where you can connect your pickit programmer to. To do this you will need a five pin header. Plug this into the programmer and then you just need to 'touch' these pins to the pads on the circuit board.

(please note, I have the programmer around the wrong way in this photo! you need to flip the programmer around the other way!)

I am guessing that If you have your own programmer, that you have the pickit software installed on your computer.

So open up the pickit program and load the Merry_Christmas.HEX file. program it to the board and you're done! You now don't need to connect your programmer again, unless you want to reprogram it with your own code.



Step 4: Solder in the Shorting Links and Slide Switch.

The reason that I am using shorting links instead of SMD resistors is due to the low voltage (3volts) that powers this little project. The LEDs drop most of that 3volts and the rest is then dropped within the microcontroller. Adding any external resistance just makes the display too dim.

If you were planning on using some other power supply (such as 5volts) then you would definately want to use resistors here. (100 - 150 ohm would be perfect)

The easiest way to do this is to solder little blobs on all of the pads and then get little offcuts of wire to solder the pads together (as shown in the pic)

Next, you will need to grab the SMD slide switch. Since the slide switch has two plastic tabs underneath it, you will need to cut these off with a blade - otherwise the switch will stick up a fair way off the circuit board. (see picture)

Then solder in the switch to the position shown. Make sure you are a little more generous in the amount of solder that you use on the two sides of the switch (this is what holds it to the board)


Step 5: Solder in the Two 10k Resistors.

Flip the board over and grab your two surface mount 10k ohm resistors (they are small so dont lose them!)

This photo shows where they need to be soldered to. Pretty much the middle of the board.

Step 6: Bend, Cut and Solder the Buttons.

If you want to play Santas Scramble - you will need to solder in the two push buttons. But first they need to be modified slightly.

The first picture shows the buttons as they are originally.

The second image shows one button that has the leads bent out flat. It also shows the second button with it's leads bent flat and also cut to size.

Once you have both buttons bent and cut, solder them into position on the circuit board as shown in the last pic.

Step 7: Solder in the Battery Holder.

The battery holder fits in nicely between the two push buttons. The first image shows you the placement of the battery holder. The sceond image shows the opposite side of the board where you can see how the battery holder is soldered in.

We only have one more step - Soldering in the LED matrix.

Step 8: Solder in the 8x8 LED Matrix.

We're nearly there now!

This LED matrix is actually bi-colour which means that each LED has both a red and a green component (two colours)

You can either have a green display or red depending on how you install the matrix.

If you want your display to be green then you just solder it in without any modification. Having said that the green display is not as bright as the red.

That is why I highly recommend that you modify the display slightly in order for it to display as red. (it looks much better this way.)

The first and second photo's show you how to install the matrix to have it display green. You don't need to bend any of the legs at all. The display has some text written in black on one of the sides. line your PCB and display up just as in the first photo, then pick up the LED display and place it ontop of the PCB. push the legs through and solder on the reverse side. And thats it, it's all ready to go!

This next step is all about configuring it for a red display.

Turn your display over and bend the 8 legs as shown in the third picture. (These 8 legs are the green cathode connections - which we don't want to use since we want red.) - Also notice the black text on the top side of the display. Make sure you bed the correct pins or it probably wont work!

Now that you have them bent - it is just a matter of lining the pins up (see pic 4) just as you would for the green version. Push the display into the holes and then solder on the reverse side.

Once soldered in, bend the eight connections over to the vacant pads next to them as shown in pics 5 and 6. They all bend in the same direction as shown in the pics.

Once done, solder them in, cut off the other legs and you are done!

The last picture shows what the completed project looks like (with battery installed)



Step 9: Testing It Out.

With your battery installed, flick the slide switch and after about a 1 second delay, you will be presented with a nice scrolling message that says "Merry Christmas" It will keep doing this untill the battery runs out.

After doing a rough test, one battery should last at least a week, if you had it running for about 3 hours a night.

If you want to play the inbuilt game "Santa's Scramble" turn the device off, then holder down one of the game buttons (or both) then turn the device on. You can let go of the push buttons now. After about a 1 second delay you will be presented with the game screen.

You are 'santa' which is represented by the bottom led. You need to move to the left and to the right in order to avoid the oncoming obsticles. The further you get through the game, the faster it gets. If you crash, you will be presented with a number on the screen which corresponds to the level that you made it up to. If you complete the game, you will be presented with a smiley face = )

To go back to the message, just turn it off then on again. (without holding down any buttons)

If you haven't already - go back to the intro to this instructable to view the 2 minute youtube video.


Well thankyou for checking out this instructable. I have many other projects I have worked on and will have to upload them to this site. It's been fun!

God bless,


-brad

Homemade Holidays Contest

Participated in the
Homemade Holidays Contest