Third party cookies may be stored when visiting this site. Please see the cookie information.

PenguinTutor YouTube Channel

Christmas House Project

This project is a Christmas house based around a 3D printed building and a Raspberry Pi with additional electronics to light up LEDs, change the colour of a snowman using a NeoPixel LED and to control a smoke generator to have smoke appear out of the chimney.

Creating the 3D printed building

The building is designed in TinkerCAD and printed on a 3D printer. It is based on a weigh bridge building for a model railway, but makes a nice size for a Christmas themed house.

See the following page for details about 3D printed G-Scale model railway building

Designing the electronics - Breadboard and Schematic Diagram

This is the design of the breadboard and schematic diagram showing a step-by-step tutorial of how to create these using Fritzing. Using the schematic diagram for the initial circuit design and then using a breadboard to prototype the circuit.

Creating the Raspberry Pi HAT / Printed Circuit Board (PCB)

This next video goes step-by-step through creating a printed circuit board (PCB) in Fritzing. The end PCB is like a Raspberry Pi HAT (although it is simplified so does not meet all the requirements of a HAT).

View my electronics pages for more information on designing electronic circuits and creating PCBs.

Adding the code for the NeoPixel, LEDs and smoke generator

There are a few steps involved as the NeoPixel LED needs software libraries to be installed. This is explained below.

Setting up the NeoPixels

First you will need to disable sound on the Raspberry Pi. This is due to the sound and NeoPixel drivers conflicting with each other.

Create a new blacklist file using

sudo nano /etc/modprobe.d/snd-blacklist.conf

Add the following entry

blacklist snd_bcm2835

Then save and exit (Ctrl-O Ctrl-X).

The next stage is to install the library code that will control the NeoPixels. This is installed by running the following command:

sudo pip install rpi_ws281x

You can then download the code which will control the house. This includes a simple script that activates the lights and a graphical program (using Pygame Zero) that will allow you to control the house with a mouse.

christmas-house.tgz

After downloading the file you can extract the files using:
tar -xvzf christmas-house.tgz

The graphical application is creating using pygame zero and also needs to be run as root. First change to the directory with the files then run:
sudo pgzrun house.py

Future projects

For the latest updates please:
Subscribe to the PenguinTutor YouTube Channel
and
Follow @penguintutor on Twitter

Previous Points controller
Points controller
Next Model House with WiFi
Model House with WiFi