Halloween has always been one of my favorite holidays, so much so that I founded a business that makes professional-grade props and controllers for Haunted Houses. This naturally led to Element14 asking me to create a couple of projects that were easy enough for the community to follow along and replicate the project at home. For my second project, I am going to be creating a automated Fog Machine controller that utilizes a Raspberry Pi, and the new Sense Hat.
The Concept
The basis of this project is to utilize the all new Sense Hat from the Raspberry Pi Foundation to work in conjunction with the Raspberry Pi and a Relay to activate a fog machine when guest trigger a motion sensor. For those of you who might not follow new Raspberry Pi products as myself, the Sense Hat features an array of environment sensors that relay data back to the Raspberry Pi. To be honest, I struggled to figure out how I would tie the Sense Hat back into this project, and after a few conversations with friends I think I have come up with an idea.
I am going to utilize the Sense HatSense Hat to log data about the environmental conditions on Halloween Night and use the fog machine triggers to log what I will call a “Trick or Treat” event. When the night is over, I will compile the data and try to determine if swings in temperature, humidity, or air pressure correlates to a rise or fall in trick or treat events.
I will also utilize a few more of the Raspberry Pi’s GPIO pins to trigger some special effects lighting (NeoPixels), and will play an array of spooky ambient sounds, halloween-themed music, and (if time allows) audio events when the fog machine is triggered. One final bonus feature will be to integrate some form of remote notification when a trick or treat event occurs.
This project will progress a little faster than my Trick or Trivia Candy Dispenser project, mostly because I am building both at the same time. I purposely kept this project a little more simple for this reason. You will also note that I have chosen to use an off-the-shelf relay module this time instead of building my own as I will be doing in my other project. This is both in the spirit of saving some time, but as well to illustrate that there is alternative solutions that are ok to use as well.
The Hardware
Newark Part No. | Notes | Qty | Manufacturer / Description |
38Y646738Y6467 | RPi | 1 | RASPBERRY PI 2, MODEL B |
38Y647038Y6470 | SD Card | 1 | RASPBERRY PI 8GB NOOBS MICRO SD CARD |
44W493244W4932 | PSU | 1 | USB PORT POWER SUPPLY 5V, 1A |
06W104906W1049 | USB Cable | 1 | USB A PLUG TO MICRO USB B PLUG |
53W628553W6285 | WiFi Dongle | 1 | USB WIFI MODULE |
18J555818J5558 | Home Pir Sensor | 1 | PIR MOTION SENSOR |
40P118440P1184 | Speaker | 1 | SPEAKER, 20 kHz, 8OHM, 4W |
26Y845826Y8458 | Fog Coloring Rings | 1 | NEOPIXEL RING - 16 X WS2812 |
26Y851226Y8512 | Ambient LEDs | 1 | NEOPIXEL 8MM THROUGH HOLE LED |
26Y852826Y8528 | AMbient LEDs | 1 | NEOPIXEL 5MM THROUGH HOLE LED |
26Y846026Y8460 | Mood LEDs | 1 | NEOPIXEL DIGITAL RGB 1M 144LED BLACK |
34C109234C1092 | PSU Vreg | 1 | LM7805 LINEAR VOLTAGE REGULATOR, 5V, TO-220-3 |
58K379658K3796 | PSU LED Resistor | 1 | METAL FILM RESISTOR, 1KOHM, 250mW, 1% |
17F216517F2165 | PSU Filter Cap | 1 | CERAMIC CAPACITOR 0.1UF, 50V, X7R, 20% |
69K794969K7949 | PSU Filter Cap | 1 | ELECTROLYTIC CAPACITOR 47UF, 50V, 20% |
69K790769K7907 | PSU Filter Cap | 1 | ELECTROLYTIC CAPACITOR 100UF, 50V, 20% |
14N941814N9418 | PSU LED | 1 | LED, RED, T-1 3/4 (5MM), 2.8MCD, 650NM |
49Y756949Y7569 | RPi Sense Hat | 1 | Raspberry Pi Sense HAT |
MCM Part No. | Notes | Qty | Manufacturer / Description |
Relay Module | 1 | TinkerKit Relay Module | |
Fog Machine | 1 | Fog Machine Hurricane 901 | |
Audio Amp | 1 | Audio Amplifier Kit 2 X 5W RMS | |
Logic Level Converter | 1 | 8 Channel Logic Level Converter | |
Project Enclosure | 1 | ABS Case Gray - 5-5/8" x 3-1/8" x 1-3/16" |
As you can see, in this project I am using a fairly high-end fog-machine. Any fog machine will work as long as it has a wired remote. You can use a $19.99 200W fog machine from a party store, or a $699 fog machine from a professional event supply shop as long as it has a wired remote with a push button. Additionally, you will need to purchase some form of water-based fog juice. There are hundreds of brands out there, and all will work just fine, but some of the more professional brands like Froggy’s Fog will have better results. You could even make your own fog juice and I will include a recipe for that in a later blog post.
The ADJ 1300w Fog Machine In Action. Video courtesy ADJ Lighting.
In addition to the parts listed above, you will need a few yards of 3-conductor wire (4-wire phone cable works well), or 100 feet or more of single conductor wire that will need to be paired up for the NeoPixel and Audio components. Finally, you will need a 3.5mm audio extension cable, an ethernet patch cable, or a wifi router. A soldering iron will also be needed to assemble parts of the kit. Having some heat shrink tubing, electrical tape, zip ties, and a hot glue gun on hand would be advised as well.
If you have any questions, suggestions, or comments in general, please feel free to leave them below, or by sending me a private message here at Element14. If anyone chooses to follow along at home and build their own Trick or Trivia Candy Dispenser, please post photos, and even blog post if you can as I am very excited to see your work!
I will be posting an update every Friday with the project wrapping up on October 16th. I have taken the liberty of laying out each of the weekly milestones below.
- Project Introduction
- Fog Controller Hardware and Test
- Environment Sensing Coding & Testing
- Ambient Audio Hardware and Coding
- Lighting Coding and Testing
- October 16th - Final Assembly and Testing
- October 23th - Project Wrap-up