Pyrotechnics and Pi: Upgrade Your Fireworks! George Ross, August 25, 2018
Always remember SAFETY first when dealing with fireworks. For a more detailed look at fireworks safety see here. Also setting off fireworks may be illegal in your neck of the woods. Check local listings.
This may not come as a surprise, but I love fireworks. I also love computers and electrical controls. So naturally they all came together when I was looking for a way to have a better fireworks display. Granted there are some fine solutions in the world to do just what I wanted to achieve, but all the fireworks firing systems that I have seen are manually controlled. I wanted something I could program and I also enjoy building my own things. Since I have been using Raspberry Pi's around the house for Christmas lights and fan control I figured it would be a good solution for this endeavor as well.
I wanted my fireworks firing system to be programmable, rechargeable, have eight channels, and be able to be used stand alone anywhere. Through much consideration the following is the hardware that I used to make this project happen.
The eight small red buttons are for manual control of outputs. The big red button cuts power off to the 8 manual buttons and the 8-channel relay for safety. One toggle switch controls the Raspberry Pi, LCD screen, and 5V coil voltage to 8-channel relay. The other toggle switch turns the voltmeter on or off. The USB port and 3.5mm audio jack are covered.
Baby got back!
Just think I wanted to use a 10in. x 10in. box in the beginning.
Pay no attention to the cut. :(
The Connection Boxes
I’m really digging this setup over the alligator clips I used when I first started this project.
One output of this system ready to roll
A closeup of 1 of the 8 total e-match connection boxes
Lighting the Fuse
There are two choices that I know of on how you actually ignite the fuses of any fireworks you attach to this firework firing system. Choice number one. Use short pieces of nichrome wire with alligator clamps. Think of this solution like a light bulb filament being used outside of it's vacuum. This is a cost effective solution however there are a couple of major drawbacks to this approach. The first is you have to be real sure the alligator clips are biting both the nichrome wire and fuse with sufficient pressure. If not the circuit will not be complete and the wire will fail to burn. The second drawback is once you use a chrome plated alligator clip to set off a few fireworks the chrome plating comes off and the exposed steel rusts. Once this happens you are left to scrub off the rust and pray it works if you don't test it first, but this only makes the first drawback all the more worse. I have used this method and have had shots not go off. Don't get me wrong it does work, but it is prone to misfires. The best advice I can give if you use this method is go with copper alligator clips with real good springs in them. Just be ready to get out your wallet to get them.
Choice number two. Electric matches or e-matches as some folks call them. These come ready to go with leads already attached. The boxes I ended up using for these are based off of simple household speaker wiring. You can still use alligator clips to set them off, but the flames never hit the clips thus eliminating the problem of having the chrome plating coming off and causing rust. It also reduces the risk of an incomplete circuit because of less parts involved (i.e. making sure the nichrome wire is tight against the fuse while maintaining secure contact between the afore mentioned wire and alligator clips). I prefer option number two. Plus they are not all that expensive considering the cost of dealing with the maintenance that is involved with the first option. While also being safer as you can separate the leads without them having a moment to short circuit as they fall off a burning fuse. Food for thought.
See the comparison video below. You'll see the wire once power is applied to it.
Here are a few pictures I took of the demonstration's setup.
All hooked up and ready to fire
What a mess
Just a spot of masking tape to keep the fuse in place
Below is a video of the fireworks firing system in action. It's not the most grandiose. Think of it as more of a function test.
The python script used for the demonstration can be found below. Copy it and paste into a blank text document. Then save it as a *.py file. I use Thonny with the latest Raspbian Stretch to run the script. It's easiest to save the script I want to run on the desktop. This makes it easy to use touch controls of the LCD to run a script.
I'll also throw in my test script to verify it all works. I used this to verify voltage as well thats why there are five seconds between each state change. Notice the difference in how a single GPIO output is used as opposed to the "chan_list" was used in the above example.
I can't wait to get this thing attached to a whole mess of fireworks. Next Fourth of July is gonna be awesome! I'm starting to wonder if 8 outputs are enough? It wouldn't take much other than another 8-channel relay, a couple more terminal barrier strips, larger enclosure, some wire, and some man hours to have 16 programmable outputs. I guess this firing system will work for now.
I'm gonna conclude this article with some words on SAFETY. If you are considering building one of these your self. Keep in mind you can never be to safe. Think about it. Say if you set your fireworks firing system to go off at a particular time (I.e. run a python script with a cron job) and left it unattended. Curious children, people, or animals would be exposed to certain danger. I did add the big red button for safety, but it can easily be reset to operating condition. The best way to stay safe when using a fireworks firing system such as this is to monitor the area you have your fireworks and firing system setup and keep people at a distance. Red danger tape wouldn't be the worst idea when using a rig such as this.
This site is best viewed with a screen resolution of 1024 x 768 and up.