Hi Everyone,
Usagi - congratulations - that looks like a great build. How did you make the cases? Is it laser cut plastic or wood?
So, from someone who has owned and operated a legitimate, licensed and insured fireworks company in Australia (Queensland, home of the nanny state), I have a few small bits of feedback from my efforts of building a firing system. This was around the 2000's period. When I did mine, I elected to not use any microprocessor control - it was all switches and relays etc. I'm not saying microcontrollers are bad - just make sure you have appropriate safety switches (see below).
I think you are certainly on the right track. Electrically firing fireworks is much safer then hand firing. It is orders of magnitude better than the "Hold my beer, I'll go light them" approach..
Although from the looks of the ones you have, they appear to be what we called "boxed sets" - you light the fuse and it does its own "mini-display". These are normally not that "large" in terms of total powder loads etc. The really dangerous items are shells that you need a "tube" or cannon to launch. These WILL and HAVE taken off heads and limbs of unfortunate people placing them over the launch tube while loading or when they accidentally ignited. Also,
if you do have shells - DO NOT USE PVC pipe as launch tubes (even the "high pressure" rated stuff) - it will shatter and send shrapnel in all directions and has caused significant injury here in Australia in the past. We used thick wall HDPE piping designed for water and gas mains reticulation. It is available in the correct bore diameters for most common shell sizes. These also need to be well secured - avoid metal so you don't create shrapnel again if there is a launch failure.
Having said that -
no fireworks should be treated as "safe" - they aren't!
If you do have a misfire DO NOT APPROACH for at least 10 minutes. This allows any heat built up to dissipate. There have been cases where a fuse lit well after the igniter was supposed to go off.
this is why 1) there's a "safe" mode switch, and 2) the mcp23017 has a reliable power-on-reset state.
I'm not sure how you have wired up the boxes, but the default un-powered state of the relays (the "NC" state) should be used to short out the igniters / squibs. This is the recommended practice (here anyway) for all igniters - the leads should come pre-stripped and twisted when you buy them and should remain shorted until fired (there is a brief period when you undo this to insert into the firing contacts). The theory is that this mitigates as best as possible both electrostatic and EMI induced currents and therefore minimises the chance of an accidental initiation. I believe (what I was told during training) that this is the required practice for all blasting activities (eg mining) here. Don't get me wrong, it is (by design) difficult to set these things off accidentally, but it can happen.
This can be done by connecting the relay armature to one leg of the igniter, the NC leg of the relay goes to ground with the other lead from the igniter. The NO lead is then used for sensing continuity and for applying the firing current (for an single throw relay). If you have a double throw relay - recommended - you can totally short the igniter and completely remove it from the circuit.
This means you operate the relay, make you continuity check and then de-energise the relay. When it comes time to fire - you have a separate "power" driver (relay?) that can apply the firing voltage to the NO contacts, then you energise the appropriate relay to fire one igniter at a time. Note that your continuity check circuit should not have a single point failure that can result in sufficient current to fire the igniter, generally this means at least 2 series resistors.. I can't remember what the safe no-fire current was for the igniters we used - you should find that out - I believe it was surprisingly high.
Do not parallel igniters! This can result in situations where one fires and prevents the others from firing. The correct thing is to put them in series, HOWEVER you need to ensure you have sufficient energy to fire them all off (not easy to prove). This non-parallel firing also means that you must only energise one firing relay at a time to avoid a similar issue.
Usually not 'random', usually it's high impedance (ie. INPUT with no pullup).
But ... if that's enough to set off the fireworks then you've already failed and shouldn't be allowed anywhere near anything explosive.
For fireworks you'd have a master relay for the 12V supply and only enable 12V power after all the Arduinos have woken up and reported their state to the master controller. Even then you'd have a second physical key on a string around your neck and only connect the 12V power a few seconds before the display is due to start.
This is another important point - there should be at least 2 distinct mechanical lockouts that remove all power from the circuits. In Queensland at least one of these needed to be a removable key type switch and you need to have this key on you when you leave the firing location.
because i don't know the exact timing of the individual fireworks, this will be manually operator stepped through the firing sequence, so i can adjust the display according to how fast each firework runs. every step requires several distinct button presses, and there is no auto firing.
Sounds like a very sensible approach. Unless you are trying to coordinate a very large display to music, manual sequencing is simplest and best.
Have fun, and stay safe.
Ash.