littleBits modules quickly create a colorful and animated Christmas scene

Lead Image © torky,


The Christmas season is full of music, lights, and animated scenes of the holiday. What better time to put your open hardware to work at home?

In our house during the winter holidays, we place a colorfully lighted Christmas tree on a platform, and under the tree, an HO model train circles, trailing cars filled with tiny gifts, carolers, and a winter scene. On the stand with the tree, Santa's bell-ringers play holiday melodies. This year, I want to automate the train, lights, and music so that every time someone walks in the door, they are welcomed into the house with a little Christmas spirit.

At first, I thought of using a sound sensor to pick up the sound of people stomping the snow from their boots, but you can never be certain of snowy weather in Kansas. Another option was to set up a motion sensor, but the front door is not well situated to exclude other daily traffic in the household. Finally, I decided to use a sensor that identified an open door event. To set up this project quickly, I chose to use littleBits [1] (see the "About littleBits" box).

About littleBits

littleBits is an open hardware platform of single-purpose modules that snap together in multiple combinations to create a complete electronic solution that accomplishes a particular task. Each littleBits module has power, signal, and ground contacts that are aligned by magnetic couplers when two littleBits are joined (Figure 1).

The littleBits company was founded by Ayah Bdeir, an engineer and graduate of the famed MIT Media Lab [2], a co-founder of the Open Hardware Summit [3], and a 2013 TED Senior Fellow. In her TED talk in February 2012 [4], Bdeir said her idea for littleBits originated with the concrete block, the building block of architects, and Legos, which put the concrete block in the hands of everyone to become "the building block of our imaginations."

In a similar way, Bdeir wanted to take the building block of engineers, the transistor, and put it in the hands of artists and designers and, ultimately, makers everywhere, including children. In seconds, anyone can assemble, in a number of different ways, something that lights, blinks, buzzes, moves, and communicates. In so doing, the makers begin to understand the electronic world around them a little bit better.

You can use littleBits to create a complete project, or you can use the modules to prototype a project that becomes your own printed circuit board, or even a littleBits module. The schematics for each module are free to download from the littleBits website (Figure 2). littleBits uses the CERN OHL v1.2 open source license [5].

Figure 1: littleBits coupling device.
Figure 2: An example of a freely available schematic; this one is for the rollover switch module used in the project in this article. (CC BY-SA 3.0 [6], OSHW Definition 1.0 [7])


The plan is to sense a door opening, send a signal to the Christmas display, and turn on the lights, music, and model train. To indicate when the door opens, I use the roller switch [8], and to communicate between the door assembly and the power assembly, I decided to use the wireless transmitter and receiver. Each circuit – at the door and at the power strip – needs a power source. The "Parts List" box shows the littleBits I use for each part of the project.

Parts List

Transmitter (Figure 3)

  • Power
  • Wire extender x2
  • Roller switch – set to Close
  • Wireless transmitter
  • Breadboard

Receiver (Figure 4)

  • Power
  • Wireless receiver
  • Slide dimmer
  • Servomotor – set to Turn


  • Power strip
  • Velcro
  • Cable tie
  • Shims
Figure 3: The littleBits modules used in the transmitting unit.
Figure 4: The littleBits modules used in the receiving unit.

The transmitting circuit is assembled as follows:

power::wire extender::roller switch::wire extender::wireless transmitter

The roller switch has two settings: Open and Close. In Close mode, when the roller switch is pressed, it "closes" the circuit and allows the signal to continue to the next module. In Open mode, the module is always "on," and pressing the switch stops the signal from reaching the next module. In this project, the switch is set to Close mode.

The receiving circuit is set up as follows:

power::wireless receiver::slide  dimmer::servomotor

The servomotor will switch on the power switch; it also has two settings: Turn and Swing. In Turn mode, input from other modules determine the position of the servomotor arm. In Swing mode, the arm swings freely. On its own in Turn mode, the servomotor arm moved too far to operate the switch on the power strip, so I added a slide dimmer module to adjust the distance the servo arm turned.

The servo is attached to the power strip with Velcro for ease of positioning, and a cable tie keeps the servo arm securely in place against the switch (Figure 5).

Figure 5: Experimenting with the slide dimmer, I was able to rotate the servomotor arm just enough to flip the switch.


Although I assembled the system in an inner room away from everyday foot traffic, I ultimately will want to set it up at the main entryway of the house. That means my design should keep all the littleBits indoors, away from the weather, which helped define the design of the roller switch assembly.

littleBits tend to separate rather easily, so to keep the project together, I used a breadboard, Velcro, and a cable tie. For the roller switch to maintain contact with the top of the door throughout its range of motion, I mounted the module on stacked shims.

The transmitting assembly is installed above the door (Figure 6). The top of the door, when opened, pushes the roller switch up to close the circuit (Figure 7).

Figure 6: littleBits above the door. A breadboard, Velcro, and shims help position the elements securely.
Figure 7: The roller switch in the closed position with an open door.

The wireless transmitter then sends a signal to the wireless receiver. As you can see in Figure 6, the transmitter has three outputs, which means it can control three devices. Because I connected the wire to output 2 in the middle of the unit, I have to connect to input  2 on the wireless receiver.

The receiving assembly is set up near the power strip, into which all the electronic elements of the display are plugged (Figure 8). When the wireless receiver gets the message from the transmitter, it activates the servomotor, which rotates just enough (thanks to the slide dimmer) to flip the switch. Once the power is on, the Christmas lights light up, Santa's bell-ringers play a medley of Christmas music, and the train begins to circle the track at a speed pre-set on the transformer (Figure 9). All I need now is for someone to open the door!

Figure 8: Everything is plugged in and waiting for the signal to go.
Figure 9: The train heads for the tunnel, the bell-ringers play, and lights illuminate. Sorry, but October is too early to buy a Christmas tree.

Buy this article as PDF

Express-Checkout as PDF

Pages: 6

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content