Category: Hardware

Building a Fire Effects Control Panel

Control Panel

I had a need to control 16 fire poofers. I wanted the control to be done through a Arduino microcontroller so that the effects like Fire, Stage Left, Thumping and Fire Line can be done. So, a new fire control panel had to be built.

Before I get too deep into the details of building the panel, please read Fire Effects – Safety before even considering doing something like this at home or where you like to play.

The panel started out life as a stainless steel box (A24H2412SS6LP) that was received as part of a donation a while ago. It measures 24″ x 24″ x 12″. It was a bit deeper than needed but that’s ok. The extra space could always be used for something.

The first work was to modify the front door to allow for the switches to manually control everything. There’s a number of different types of switches that are needed to allow the control panel to work with this project as well as future ones.

  1. An emergency stop switch is needed to shut everything down in the event of things going sideways.
  2. Toggle switches for things like solenoids on propane tank feeds.
  3. Toggle switches to control solenoids and igniters.
  4. Push button momentary contact switches to control solenoids on propane lines feeding fire effects.
  5. Push button momentary contact switches connected to an Arduino.
  6. Toggle switch to turn power off to the Arduino and any supporting electronics in case it needs to be reset.

The panel was laid out with 4 logical sections:

  • Top most is for the Arduino power switch.
  • Next is for the push button momentary contact switches for the Arduino.
  • Next is a field of toggle switch / push button momentary contact switch pairs. This allows an individual effect to have a toggle for the igniter and a push button for the solenoid.
  • The bottom most is the emergency power switch and the capped toggle switches for the propane feeds.

Just How Many Drills Are Needed?

Once the basic layout was decided, the front door was removed and layout work done to position the switches.

A whole lot of time was spent on a milling machine with a step drill to drill out the holes needed for the switches.

At one point, I had to stop so I cleaned off the panel and remounted it to see what it was going to look like when done. There were only 2 more holes needed, the power switch for the Arduino and the emergency stop switch.

What Does This Wire Do?

With the holes all drilled, the switches were inserted and secured into the panel. It was a bit unfortunate but I used cheaper switches that I purchased through Jameco. The problem with these switches is that the nuts couldn’t be tightened too much or they would slip. Rather annoying but I had already invested in getting them installed and there was a show coming up where I wanted to use the panel.

With all the switches installed, the task of running and soldering all the wires was next. Blue wire was used to connect one side of all the toggle switches with power. White wire was used for the push buttons and yellow for the toggle switches.

Ethernet, It’s Not Just For Networks!

Next up was creating a way to allow the various switches to be connected to the things that they’re controlling.

Since there would only be low current / low voltage signals being sent out from the control panel, I decided to use ethernet cat 5 cable. It’s readily available and reasonably easy to work with. With 4 paired conductors in each cable, I settled on 1 pair for power, 1 pair for ground and 2 pairs for control. That allows each cable to control up to 4 devices. 4 ethernet covers were use with 4 jacks per cover giving a total of 64 control channels.

In an effort allow for changing configurations, all the switches were wired to terminals on one set of euro-style terminal blocks and the ethernet control lines were wired to terminals on another set of euro-style terminal blocks.

The switches are on the left side blocks and the ethernet on the right. With this in place, it’s fairly easy to move the jumpers from one location to another to allow for difference switches on the front panel to control different devices in the field.

Control Packs

In order to allow this control panel to do anything, I created octa-control packs that are deployed in the field and provide switch 120v Edison sockets.

Each octa-control pack has 2 connections for ethernet signal lines, an 8-way relay board, 4 duplex Edison sockets and power plugs to provide power to the Edison sockets.

Originally I also designed quad-control packs that used a single ethernet, 4-way relay board and provided 4 switched Edison sockets. So far I haven’t built any since the octa-control packs have worked well for the types deployments the system has been on.

You can see the 8-way relay board here. It’s a tight fit but works well. The relay board is a Hivitronix “Eight Way Channel Relay Board” that can be found on ebay for around $32 plus shipping. The board requires 12v power which is provided from the control panel via 2 pairs of the ethernet lines, blue / blue stripe are +12v and green / green strip are ground. The remaining ethernet lines are connected to the 8 control pins that trip the relays. Each relay is in turn wired to 120V coming in from the power cords and to the individual hot side of the Edison sockets. The neutral side of the sockets is connected to the common side of the 120V power cord.


So far, everything has been done to allow for manual control. This makes for easier test of the system when it’s deployed as well as if automation isn’t needed. But computer control of the system is a major reason for building this control system and the heart will be an Arduino Mega board.

On a side note, I’d like to give a big shout out to Lady Ada and her amazing crew over at Adafruit. They’re helpful, friendly and provide outstanding customer service. Get your Arduino’s from them!

Now this part is a bit of a mess. Not being an electrical engineer caused a few missteps here. To start with, the switches were setup to provide +12V along the ethernet control lines to the relay boards. That means that the Arduino has to supply +12v for all the circuits which is something that it didn’t want to always do. It let me know this by resetting regularly. So I got a bunch of UDN2981 Darlington IC chips that allows for 8 switched channels each. Connecting the I/O pins of the Arduino to the control pins on the UDN2981 chips and the output pins of the UDN2981 chips to the corresponding ethernet control lines allowed the Arduino to switch the needed +12V and control the relays in the octa-control packs.

All was fine until one of the manual switches was thrown and the Arduino stopped working. This turned out to be a problem where applying +12v to the output pins on the UDN2981 chips caused the chips to burn out. So I added a diode to each of the output pins of the UDN2981 chips to keep the +12V from the manual switches from causing any more grief.


The first generation code for doing fire effect sequences can be found at

Final Thoughts

As you can see from the image above, there was quite a bit of a hack that was put in place at the last minute before the first show. I’ll get to pulling it out some day and cleaning everything up. In the mean time, the system has been used successfully on The Crucible’s Fire Circus in July 2011, The Crucible’s Fireside Lounge August 2011, the mini-Maker Faire in the east bay October 2011 and The Crucible’s Machine: A Fire Opera in January 2012.

Having run the system several times now, I have quite a few ideas on changes that should be made. Things like:

  • Designing a circuit board for the UDN2981 chips and diodes.
  • Replacing the euro-style terminal blocks with a set of patch panels and use banana plugs to configure the switches to relays.
  • Reorient the switches so that the push buttons are either in the center with the toggles surrounding them or the push buttons on one side and the toggles on the other.
  • Adding visual indicators on what’s happening like status lights on the Edison plugs and expose the leds on the relay boards.
  • Possibly set up some sort of feedback that can be displayed on the control panel to let the operator know the status of the control packs.
  • Add temperature, voltage and current monitoring displays.
  • Design an Arduino control pack that has an embedded Arduino controller that can be controlled via the control panel.

With a little luck I’ll actually make the time to do some of these…

Tags : ,

Arduino vs Servos

The eyes on Exuro are basically 2 axis gimbals with a servo driving each axis. Never having built anything like this before, it was a bit of a learning experience. One of them was more of a re-learning experience in that I knew this but didn’t remember. On a small microcontroller board like an Arduino, there is a limited amount of power that can be drawn by anything connected to it.

In first working with the Arduino, I connected a single servo so that I could work through the initial hardware setup and some basic programming of the Arduino to make the servo arm move. Ground and power lines were connected to ground and +5v on the Arduino. The control line was connected to pin 9. It went pretty much as expected and was it was fun to see changes in software cause actions in the physical world.

Building on the initial success, I added a 2nd servo so I could start to see to the interactions and hardware layout needed to by the gimbals. Again, the ground and power lines were connected to the Arduino ground and +5v. Control was connected to pin 11. Mostly everything went smoothly but every once in a while, the Arduino would reset. It didn’t happen often so I didn’t spend much time tracing the problem. Until I added the 3rd servo. Ground and power lines were again connected to ground and +5v on the Arduino and the control line to pin 12.

With the 3rd connected and all 3 servos trying to move, the Arduino would reset. It would reset almost immediately after the servos started moving. I changed the code to only move 2 of the servos and things went back to working as expected. Every once in a while the Arduino would reset. But adding the 3rd would cause a reset every time. About this time it dawned on me that I might be trying to draw too much power through the Arduino.

So I dug through my collection of scrap wall warts till I found one that put out 5v at 2 amps. Since each servo wants around 0.5 amps, this should work. So I disconnected the power and ground lines for the 3 servos and connected them to the +5v and ground wires of the wall wart. I added a wire connecting the Arduino ground with the wall wart ground and powered up the Arduino. All three servos started moved their control arms back and forth without any more resets of the Arduino. Yippie!

Tags :

Arduino Switches

Part of the Exuro project includes the setup for a momentary contact switch that can be used to trigger the poofer. This way the system can either be run as a donation machine with the bill reader being used to trip the poofer or it can be manually controlled via a momentary contact switch.

My first attempt at connecting a switch was done by just connecting one switch terminal to ground and the other to the Arduino pin 2. The code was pretty straight forward:

int relay_state = LOW;
void toggle_relay()
  relay_state = !relay_state;
void setup() {
    attachInterrupt(0, toggle_relay, CHANGE); 

This had an number of unfortunate problems. The biggest one was that every once in a while the interrupt would be triggered all by itself . Without doing anything, the poofer relay would trigger. That wasn’t good. (The code for the poofer relay isn’t shown here.) It turns out that the problem was the electrical circuit. Since the switch was just connected between ground and pin 2, the wire running to the switch would act as an antenna and cause the hardware to think that the interrupt should be triggered. To resolve this problem, a 1k resistor was placed between pin 2 and ground. This ensured that the electrical signal traveling over the switch wire was stable.

The second annoying problem was that every once in a while an interrupt would be missed and the relay_state would be wrong. The toggle_relay code merely sets the relay_state to the inverse of what it was. That is if it’s a 1 then it becomes a 0 and if it’s a 0 then it becomes a 1. So if an interrupt is missed then the relay_state would be wrong and the poofer relay would be be the inverse of what it was supposed to be.

To resolve that, the toggle_relay code was changed to:

void toggle_relay()
  int val = digitalRead(2);
  if (val == LOW) {
    relay_state = LOW;
  } else {
    relay_state = HIGH;

This way the relay_state is always set to the state of the switch as read off pin 2. With these two changes, adding a 1k resistor and directly reading the pin, the system is much more stable and works as needed. Yea!

Many thanks to CTP for the pointer to using a resister to stabilize the switch.

Tags : ,

The Eyes, They be Moving!

Here’s a short video that shows the eyes on Exuro moving. You can see Mac moving around in the screen on the lower right of the video and the eyes moving to track the closest part of him. I’ll post more details soon but right now I’m just psyched that they’re moving and tracking pretty well!

Tags : , ,

Kinect, Python and Pushing Through

There’s tangent project that I’m working on that involves robotics, arduinos, kinect and fire. It’s a small robot called Exuro that has a pair of stainless steel eyes that are meant to track a person coming up to a donation box and when they make a donation, set off a small poofer. The idea is to track people using a kinect and have the eyes move as if they’re watching the closest person to the donation box. Working with an arduino to control external systems is pretty straight forward for me, it’s something that I’ve done before. But pulling sensor data from something like a kinect and interpreting the data is something I’ve never done. It’s rather intimidating. Processing video data at something like 30 frames per second, not something I’m used to do. But it sounds like fun!

There’s an open source driver to access the kinect called libfreenect that’s available from Included are wrappers for using the library from Python which most definitely my preferred programming language. That works.

Getting libfreenect to build on a Ubuntu 10.10 system was pretty straight forward. Just follow the instructions in the README.asciidoc file. Getting the Python wrappers to work took a bit more effort. cython is used to create the bindings between libfreenect and Python. Unfortunately, the version that’s currently included with Ubuntu 10.10 isn’t up to the task. Once I removed the Ubuntu and installed from the latest source, the Python bindings built and worked as just fine. I’m sure the fine folks maintaining Ubuntu will make a newer version available at some point, I’m just not willing to put this project on hold till they do 😉

There’s a few demo files that are included with the wrapper so you can start to play with the interface, library and the kinect data. Two of them, and, make for demo. The first opens two windows and shows a live video feed of the rgb camera in one and the depth camera in the other. The other demo shows a video of the depth camera but sweeps through the data showing what’s seen at different depths. These are really interesting demos to help wrap your head around what’s available from the kinect.

I got to wondering about the depth data and if there wasn’t a way to combine the two demos to be able to slide through the depth manually to see what’s there. The result is It allows you to slide along at any depth to see what’s there and then to contract or expand to see what’s around that depth. Here’s a sample video showing my hand pushing through a virtual wall:

The depth slider sets the focal point for what data to display and the threshold provides a +/- tolerance for how much data to display. A depth of 535 and a threshold of 0 would show just the data at 535 while a depth of 535 and a threshold of 6 would show the data from 529 thru 541.

It’s an interesting application to play with the gain a basic understanding of the data being returned and possible ways to use it. I’ve submitted a pull request on github to the maintainers of libfreenect to see if they’re willing to include it in the next release. Here’s hoping that they will.

There’s a lot more work I need to do for this project. The next steps will be to find the closest person in the data stream and calculate their location in the real world in reference to the location of the kinect. And I have almost no idea how to go about doing that. Time to read up on numpy and opencv

Tags : , , ,