With the greatest holiday in the world coming up (that’d be 4th of July), fireworks and fireworks safety are on everyone’s mind. The safest way to handle fireworks is to be far away when the explosion goes off so a remote detonator is the best option.
But existing remote detonators are cheap and use infrared, which requires a line of sight and has a limited range. So when Hologram kicked off their first hack day, the perfect idea came to mind: SMS based remote fireworks detonator.
The basic premise was pretty simple, using our Dash Pro and the Relay Shield, write a simple program to trigger a relay that will ignite a fuse when an SMS is received.
The Relay Shield was the perfect choice for this project as we wouldn’t have to worry about the Dash Pro supplying the large amount of voltage directly to the fuse, just turning on a relay that would deliver power from another source.
Setting up the Relay Shield was a very simple process, the Dash Pro slots perfectly into the Shield. It was just as easy to use the Relay Shield in code as well. Just include the SPI header and then define a few constants for the SPI commands to trigger the relays.
Next was writing the functionality to handle an incoming SMS and parse it for our specified trigger word (as we don’t want any random text setting off fireworks). This is achieved by a while loop that reads from the Hologram Cloud until it finds the string “
SMSRCVD”. We then check the payload to see if it matches the trigger word, and if it does we call our
launchFireworks() function that closes the relay sending power to the fuse. You can check out the full source on GitHub: https://github.com/rosshettel/fireworks-detonator.
For the fuses we used these from another IR based remote detonator. We had a few unsuccessful attempts at making our own fuses with small strands of steel wool, but they turned out to be too unreliable. Since the fuses needed around 5V to work, we wired 3 AA batteries in series.
The final piece was setting up the device on the Hologram Dashboard to have it’s own unique phone number and it was good to go.