Front Yard Relays (aka Bomb Box)

When we first began automating our lights in 2015, the entire control operation lived inside of a large Rubbermaid tote box that sat on our front porch. If you were to peek inside of it, you would be met with a jumble of wires, electrical components, flashing LEDs, and a sound of clicking as mechanical relays turned on an off. We lovingly call this setup our “Bomb Box”. It has morphed over the years as our show has moved more and more to pixel lighting but still has a place in our yard and in our hearts.

Currently, we use the bomb box to control the traditional strands of Christmas lights that wrap our big front yard tree, the two dwarf pine trees, and light up our info sign. It is also now the home of an FM Receiver and an audio amplifier for driving the speakers in our front yard as well as a power supply and ESPixelStick controller for the light bulb rails and snowmen on the left side of the driveway.


The contents of the “bomb box”. Note the sign on the lid to the left warning people to not touch the stuff inside. The most dangerous part where we are switching 120V AC power is in the bottom of the box.

The Relay Boards

Controlling standard strings of Christmas lights is a whole different game than controlling pixels. We use mechanical relays controlled from an Arduino to accomplish this. The electronics are from our first year of automating our lights in 2015 and it is about as DIY as you can get. Check out the 2015 Light Display to see the original setup and the learning process involved, but be warned, the electronics inside are hokey at best and possibly even dangerous if not treated with respect.

Before we go further, we have to emphasize that WE DO NOT RECOMMEND ANYONE USE THIS DESIGN AS IS. There are some serious safety deficiencies that we hope to remedy at some point. We are documenting what we have here for our own records and so that we can highlight some of what not to do, even if it technically works.

We use an Arduino Pro Mini ($10 from SparkFun) to drive 5 Schrack 5V relays. The relays were already mounted on custom PCBs from a failed DMX receiver project Philip attempted many years ago, and with some trial-and-error, we were able to get them functioning. N-channel MOSFET transistors are used to take the control signals from the Arduino and amplify them to have enough current to drive the relays. The hot 120V AC line runs into each relay, which acts like a switch. The output line of each relay runs to an outlet and that is where we plug in our strings of lights.

An ESP8266 wi-fi module (these things are legitimately awesome and super cheap!) is used to receive the E1.31 DMX over wi-fi control instructions from Falcon Player and communicates the DMX stream to the Arduino using a standard serial UART connection.

#TODO schematic for relay boards

What’s Wrong with the Relay Design?

So, let’s talk about why this design isn’t ideal. Admittedly, it works and we haven’t had any issues with it. However, it is inherently unsafe due to the lack of isolation between the 5V logic side of the circuit and the 120V AC power side of the circuit. It is good practice to use optical isolators whenever working with AC power to minimize the number of places where you get electrocuted.

An optical isolator is a simple device that contains an LED and a light detector in a single package. You put the device on a logic line, which in our case would be the control lines for each relay. When the input voltage goes high, the LED turns on and the light detector senses that and generates a high voltage on its output. When the input voltage is low, the LED turns off and the output voltage is subsequently low. It is the air gap between the LED and light detector that gives the isolator its name. The benefit of using such a device is that you have true separation between the copper that is working at 5V and the copper that is working at 120V. There is no possible way for the 120V power to short circuit and energize the low voltage section, even if a component were to fail.

Our current design does not use any isolation and thus we have 5V control signals and 120V power both meeting inside of the mechanical relays. While it is unlikely that anything would happen, it is possible that a failure in the relay could cause the higher AC voltage to gain electrical connectivity with the control side, thus creating a safety hazard. At some point, we will improve the design of this component (or possibly just do away with traditional strings all together and replace them with LED pixels!) and will definitely add optical isolation at that point.

Other Deficiencies

The other downside of using just simple mechanical relays for controlling our traditional strings of lights is that they can only be on or off. There is no ability to dim these lights with our current setup. In 2016, we attempted to update our setup to use TRIACs so that we could actually dim the strings of lights but we never got it working. We had some limited success early on but then things seemed to regress quickly. Ultimately, we gave up on it as the standard lights are such a small portion of our display and we would rather spend our time playing with pixels instead.


The Code for the Arduino

# TODO the code for the arduino

The Code for the ESP8266

# TODO separate page for the ESP8266 code to reference from here and from the RGB wash lights page