Merry Christmas, 2011

My sister is big into creating Christmas traditions. Last year she decided that we should each make a Christmas ornament for the tree each year. So this year I decided to make an electronic ornament. Here's the PCB:

To start the PCB design, I found a Christmas tree drawing using Google Images, translated it into a BMP file, imported that into Eagle, and used it for the silkscreen and to draw the board outline.

For the electronics, I put the following components on the board:

  • A PIC 18F27J53 microcontroller.
  • Fifteen RGB LEDs.
  • A speaker.
  • A "shaker" motor.
  • An accelerometer.
  • A MicroSD card socket.
  • A 2032 lithium battery.

My intention is to have the LEDs put on a light show while using the speaker to shout out Christmas greetings such as "Eat me, Santa!". I can use the shaker motor to make the ornament move, possibly enough to make it jump off the tree. (I know I can't topple the whole tree, but maybe I can get some other ornaments on the way down.) I might trigger the action by using the accelerometer to detect whenever someone shakes the ornament. It could also determine if the shaker successfully dislodged the ornament from the tree and landed on the floor.

I chose the PIC 18F27J53 microcontroller because it has a 128K of program space that I can use to store audio. (The MicroSD card socket is for additional sound storage in case I run out of program memory.) The PIC also has seven PWM outputs I can use to drive the speaker, shaker motor, and to vary the intensity/color of the RGB LEDs.

I had Itead fabricate the PCB and they seemed to have no problem with the crenulated outline. I selected a thinner 0.031" (0.8 mm) board to cut the weight of the ornament as much as I could. Itead sent me thirteen boards for $25.

Now all I have to do is write the firmware. What day is it? December 14th? Great, that should be easy. Really.

Taxonomy upgrade extras:

Comments

So, did you make it in time? Pictures or it didn't happen :)

Hey, Tommy, thanks for asking.
No, I didn't even come close to finishing. I was rushed and tried to assemble the whole board and then program it. The PIC was just dead and wouldn't program from the PICKit3, which is really the easiest thing to do and hard to get wrong. I spent some time trying to debug it, but then I gave up because there was too much else to do and this was ruining my holidays. So I just hung the bare PCB off my sister's tree. In her eyes, that still met the qualifications.
I'm going to slowly build the circuit over the next few weeks, checking as I go so I can find the problem. Then I can do the firmware and have it ready for next year without going insane.

Aw, I was rooting for you, but there's nothing like a tight deadline to guarantee that everything will foul up.
Oh well, better luck next time.
Tommy
PS: feature creep: add some sort of wireless linkage (lots to pick from) and have the ordaments coordinate.

At least I can get it ready over the coming year, and getting experience with the accelerometer will be useful for other things I'm planning.
I thought a bit about wireless coordination of the ornaments. I bought a couple of $5 wireless transceivers from Itead but (obviously) never got around to integrating them onto the PCB. At least I was smart enough to realize that effort would have blown out my schedule...