It's been well known in my area that I really get into the holiday spirit come the holiday season. Outside, I've been slowly working my way up to being the Griswold on the block. As part of every holiday season, my family and I get together to build a gingerbread house. Recently I've been tinkering with an Arduino which is a single-board micro-controller that can be used to prototype circuits or build small projects and I started thinking, why should I build a gingerbread house just like anyone else. Why not instead trick it out a little with some lights and automation. At the very minumum, I wanted at least 12 LED's for lighting, an automated door and an automated figure that would come out after the door is opened. I've started prototyping an automated gingerbread house in a combination of cardboard and wood and an Arduino Duemillenove. The first challenge was to build a light harness containing 12 leds that can be individually controlled with very I/O lines. This is achieved through a technique known as Charlieplexing. Charlieplexing allows for n pins to drive n2-n segments or LED's. A great tutorial for creating Charliepexed circuits can be found on UsiMonkey's blog. I created and LED harness with 12 LED's on one end an a 4 pin header connector on the other end. I individually labeled every line on both ends and each of the four header connector lines with a Brother p-touch labeler. I did this in case I to assist in diagnosing any connection problems in the future. I neatly wrapped the lies with black electrical tape to form a trunk. At the end with the LED's, I left about eight inches unwrapped so I have some flexibility in the placement of the LED's.
For the automated figure and door, I choose to go with the HS-322HD because it was relatively inexpensive and provided enough torque to suit my needs. I initially connected a small nylon control horn I got from an on-line hobby shop to a cardboard door with hot glue to test the door mechanism and found that when the door stuck a little, the torque from the servo ripped the control horn right off of the cardboard door. Well, that wasn't going to do. If the torque was too much for the cardboard, it would certainly bee too much for a door made of gingerbread. The solution I came up with was to build a small wooden sub-frame from luan. I attached several small nylon hinges onto the wood frame and the small wooden door. This proved to be strong enough to handle the torque from the servo. The idea here is to hot glue this sub-frame to the front inside wall and to hot glue the gingerbread door onto the wooden door so that the wooden door serves as a durable backing to the gingerbread.
The following is a video of the mock gingerbread house I set up:
Ok so we finally got around to assembling and wiring the gingerbread house yesterday. We decided to go with a castle. The reason for this is because the wood sub-frame I built for the door was too large for a "normal" sized gingerbread house. The photo you see below is the wiring in the main house on the second level of the castle. I used hot glue to glue each led in place. The cable wrapped in black electrical tape is the wire trunk for the 12 LEDs. Eight of the LEDs are in the main house and the remaining four were placed in the tower next to the house. The blue cable is the wiring for the LCD display on front of the main house. Both wiring trunks go down to the first level where they connect to the Arduino.
The following is a photo of the first level. Here you can see the two servos, one on the left and one on the right. In the center lies the Arduino.
The following are some photos of the finished house:
Below is a video of the gingerbread house in action:
Although it is a little hard to see, the LCD panel in the front says Merry Christmas in English, Spanish and French.