Inspiration can come from anywhere; several years ago while watching an episode of Sons of Guns I was hit with the idea to create a device to electronically ignite fireworks. I used to work for Fireworks West Internationale building launching equipment and setting up shows; so this was not an area entirely new to me. During my time at Fireworks West I had created a little device that could be used to test the continuity of an entire board of fireworks without setting off the electric matches (those things could be ignited with as little voltage and amperage as an AA battery puts out) which proved to be a significant time saver. So in theory all I need to do was make a device with a switch on it that would put some current out to ignite one of those electric matches.
Problem: you have to have a pyrotechnic license to get electric matches.
Hang in there, this entry might get a little long…this is a subject I am passionate about! I set out to do a bit of research to determine if I could make some electric matches of my own. I also thought back to my Boy Scout and 4H days when I built and launched model rockets; the ignitors used for those are very similar to electric matches. It turns out that rocket ignitors are made out of nichrome wire and they have a black powder compound on the tip that makes them flash; I learned that nichrome is what toaster filaments are made out of. Therefore I ordered a roll of nichrome wire and began experimenting with ways to make it heat up. After a bit of trial and error, I came up with a little coil attached to alligator clips that glowed bright red after a second or so 12V applied to it. Step 1 of my HellBox was complete.
Now, I have a vivid imagination. I wasn’t going to just settle for a simple little switch that set off my fireworks. This thing had to be as “military” as possible. A little bit of online shopping found some “missile switch” covers and some key lock switches and a large ultra-bright red LED. Once complete, the HellBox required two keys to “arm,” which was indicated by the the LED lighting up. Three switches each connected to a pair of twenty-foot wires which ran out to a nichrome coil which slid over the firework fuse.
Technically it worked…in practice it wasn’t very practical. After running through twenty feet of wire, the current took almost a minute to heat the coil up enough to ignite the fuse. There was also only enough current to ignite one at a time. So while it was a success in name, it just didn’t work very well.
Let us move ahead two years to a just over a month ago. My dear wife surprised me and gave me a Raspberry Pi as a birthday present; one of the greatest presents a geek can possibly get! I was incredibly thrilled, but then I faced the inevitable dilemma of what the heck I was going to build with it….the possibilities with the Pi are virtually limitless! Eventually it occurred to me that I needed to revisit my HellBox, and instead of merely making it work better, I had no choice but to integrate the Raspberry Pi.
I have been doing a lot of work with Node.js recently, so I opted to write the GPIO controller code on Pi in Node.js. Fortunately there were a number of modules available to choose from which had already done much of the heavy lifting. I just had to come up with the specific interface method and adapt the module for my specific version of the Pi. I opted to use http protocol so that I could access it with other devices….as I am an Android developer it was only natural that I would lean towards making an app for actually firing the HellBox.
Once I had the basic program written, the next step was to create circuitry that the Pi would switch on. v1.0 had a very simple switching transistor circuit; the same basic concept was to be applied here. The only difference was that instead of a single power source running the entire thing and powering the switches to “flip” the transistors, the switch signal was coming from an external power source. This required a different type of transistor (PNP vs NPN) and a somewhat different switching configuration; as such the prototyping took a few test tries to get right. Initially I used LEDs in place of the ignitor coils to indicate switching success. Because the Raspberry has a total of 8 GPIO pins, rather than worrying about voltage combinations to set up various logic gates, I opted to simply make 8 separate lead circuits running on a single power supply (it turns out this was my mistake.)
I challenged my friend Darrin to come up with a better ignitor. The problem we had was the lack of resistance. The nichrome wire I ordered was a very small gauge, so short lengths didn’t give enough resistance to produce any heat, which is why it was necessary to coil it. (Next year I intend to order a much larger gauge.) After much experimentation, he came up with a broad coil and found that heating it up and dropping it in water to temper the coil caused it to keep its shape proved to be the most effective.
The last piece of the whole puzzle is the human interface. I had a lot of ideas for this, I still do in fact. Ultimately I want to create a number of creative ways to launch fireworks; one of my key motivators for this is the ability to involve children in the lighting of fireworks in a safe way. When you watch a home firework display, typically you will see the father out there lighting the fireworks while the kids sit back and watch (granted, that’s one of the best parts of being dad…) I am always looking for ways to involve my kids in things that they will enjoy, and of course their safety is a top priority. If they can push a button and half a second later a 30 foot stream of fire shoots in the air and explodes as a direct result….well, what kid wouldn’t get a thrill out of that?
Enter the Android app, the first of my planned interface methods. I don’t yet have a bluetooth adapter for Raspberry, so I just used a wifi adapter. This app uses a very simple http API class to hit the node listener when a button is pressed; the listener takes two parameters, “lead” and “time.” Lead is the number of the lead that should fire, and time is how long it should stay on (in seconds) before turning off. It is necessary to first arm the app; at this point it only allows the buttons on the app to be pressed….there is nothing in this version of the HellBox that physically disarms it yet.
Eventually the app will have voice command ability so that you can say “fire 1” and it shoot off the firework connected to lead 1. It will also feature the ability to set up a sequence in advance, then run it so you can just sit back and watch the show. Finally I intend to add bluetooth support so it won’t be necessary to be on a wifi network.
Now, the real question here: the 4th of July has come and gone, which means that I surely have finished the construction and programming of this monstrosity, and have most likely given it a trial run, right? Well how did it go?
Allow me to answer that with an emoticon: 🙁
I got the new ignitor coils the day before, so didn’t have a lot of time for testing or revisions. It wasn’t until late the morning of the 4th that I was able to finally finish wiring everything up and test it all. Initially I hooked up the GPIO leads to the adapter circuit with the LED indicators in place and tested the API. Once I ensured that all 8 were turning on and off properly, I replaced the LED on lead 1 with an ignitor coil. That’s where it all went wrong. Before actually connecting it, it measured almost 7 volts across the connectors (I don’t know how many amps because my multimeter maxes out at 200mA and the power supply I used output 1.25A.) As soon as I connected the coil, it dropped to a flat 0 volts; at the same time all of the other LEDs that were on at the time went off entirely. The only conclusion was that the ignitor coil shorted out the entire circuit.
I have a fairly decent idea at this point of where it went wrong, and think I know how to fix it. But I have a better idea. Instead of simply using a basic switching transistor circuit, I have found a schematic for controlling switching relays with an Arduino. I intend to adapt that for use here and control the HellBox 2.1 with relays instead of transistors. This will have the benefit of allowing me to run higher current through it without damaging sensitive components (don’t worry Raspberry Pi people, I’ve got zener diodes in place in front of the Pi to protect the sensitive GPIO pins.)
For those of you not in Utah, we have another holiday coming up soon which we celebrate with fireworks. The 24th of July is Pioneer Day, and it is basically celebrated like another 4th around here. As such, I basically have until then to get this working for another try. Otherwise, it’ll be a whole year until we try again….and who knows what I will have done with my Raspberry by then?
Oh, and once it was obvious HellBox 2.0 wasn’t going to work last night, I pulled out all of the new circuitry and put in the original board and switches and tried it with the new coils and a higher amperage power supply. It worked far better than the first time, so we did light much of our firework show with it last night!
Here are some other pictures I took of the project along the way.