loading

This instructable is meant for anyone who wants to learn how to make a proper time or smartphone controlled detonator. I personally used this to fire my pyro on new years at exactly midnight. I will go through all the steps of making this work with different kinds of pyro. You will be albe to fire 1 to 595 ques (firework shots) from anywhere ( a tall mountain, floating raft, maybe your roof?) with this circuit. But the circuit could just as easily be used to activate any electric application at a specific time. So if you want your nightlight to switch on at exactly 10pm, that will work too.I will elaborate on this too. It features an "ARMED/DISARMED" switch and warning sounds and lights for added safety. Code is included.

Above is a demo vid of what the end result could look like. I built mine in a cashbox because it is fireproof and lockable and because it is what I had. I made 10 ques but if you know how to make one, 10 is exactly the same. Everything is built on a breadboard and held to place with hot glue and dc jacks with screws. In hindsight I would recommend soldering but my detonator still works just fine!


The great thing: this project will only set you back about €7. Even less if you allready own batteries and an arduino. Far cheaper than any professional fireworks solutions and far easier to program through arduino with just a minnie bit of knowledge found in this instructable.

DISCLAIMER: Pyro, fireworks and explosives are not safe by definition. I am not responsible. You are to judge yourself if this circuit is both safe and legal for you to build. Professional circuits use advanced systems to ensure safety and avoid msifire confusion.

That being said, if you are gonna be shooting fireworks yourself at a party, it is a much better idea to have them fired electricly and time controlled from a long distance using this circuit. That way you can just place/install all the fireworks when you are focussed and sober far away from you and other humans, and look like a total badass when they fire automatically at exactly the right time later in the night!

Step 1: What You Will Need

1 x DS3231 RTC (real time clock module ) €0.70
1 x LIR2032 3.6V rechargeable lithium cell button battery €0.60
1 x TIP120 mosfet or other 5v compatible €0.70

1x Lithium 3.7V battery and step up module €3.00

or

2 x lithium battery (if you want to use reusable detonators) or optional 4 x aa battery €5.00

1 x battery holder €0.50
1 x switch € 0.50
1 x LED
1 X buzzer unit
1 x Arduino. Any arduino with sda and slc 5v ports will do. The uno works, the nano is more compact.
1x Nichrome wire or cheapo chinese Classic electric matches / igniters(see pic)
A bunch of jumper wires

Optional but recommended:

1 X DC Jack male with screw on connector
1 X DC jack Female
1 X DC Male to crocodile clip.




TOTAL COST: ABOUT €6,00

Step 2: Assembling the Circuit for Pyro

1) First let's talk about the RTC unit. The arduino can keep track of time and date but not precise and it needs constant power or it gets reset. The DS3231 is a very precise module that allows your arduino to know what the current time and date is at all times. The cell button battery clips in and recharges everytime the arduino receives power. It can remember the time and date for years with just it's own battery. I highly recommend this unit, especially since it's only €0.70. The DS3231 recharges the battery when the arduino is powered so only clip in a rechargeable lithium battery.

Hook the RTC up by connecting the arduino's VCC to 5V, GND to GND and SDA and SCL to SDA and SCL on your board. Ignore the other 2 pins (the RTC is not in the pics but obviously needs to be connected - For pics and more help: https://www.instructables.com/id/Real-time-clock-using-DS3231-EASY/)


This is where to find the SDA and SCL on common boards:

Arduino Uno: SDA pin -> Arduino Analog 4 or the dedicated SDA pin, SCL pin -> Arduino Analog 5 or the dedicated SCL pin

Arduino Leonardo: SDA pin -> Arduino Digital 2 or the dedicated SDA pin, SCL pin -> Arduino Digital 3 or the dedicated SCL pin

Arduino Mega: SDA pin -> Arduino Digital 20 (SDA) or the dedicated SDA pin , SCL pin -> Arduino Digital 21 (SCL) or the dedicated SCL pin .

Arduino Due: SDA pin -> Arduino Digital 20 (SDA) or the dedicated SDA1 (Digital 70) pin, SCL pin -> Arduino Digital 21 (SCL) or the dedicated SCL1 (Digital 71).

2) Next connect your battery holder's GND cable to your dc step up on the ports marked "in - " Put the plus cable in the switch and from the switch, connect a jumper cable to the the step ups "in +". (Skip the step up and only use the switch if your batteries in series provide more than 5V together- more info on step ups and their use here: https://www.instructables.com/id/THE-2016-SUPER-NOO... ) connec ta jumper cable to the step up's " out +" and one to the step ups "out -" See pic! Set your step up to 7V or whatever your arduino's manuel recommends (but more than 5V !).

3) Connect one of your step up's "out +" to your arduino's Vin and the other to a positive lane on your breadboard or whatever you will be using to connect other cables to. Connect one of your step up's "out -" to your arduino's GND and the other to a negative lane on your breadboard or whatever you will be using to connect other cables to.

4) Connect your led to your arduino's 3.3V and GND. Connect your buzzer to your arduino's Digital pin 13 and gnd (not in pic). The led will show you that the device is powered on (ARMED). The buzzer will warn you just before shots are fired to alert potential bystanders that are to close.

5) Connect your DC female jack's + to the plus lane from step 3. Connect the minus of the DC jack to your tip120's (or other mosfet) middle pin.

6) Connect the tip 120's (or other mosfet) right pin (when looking at the black plastic side) to the GND lane from step 3 and the left pin to a digital pin on your arduino (pin 9 is used in the code example).

7) Screw your electric match into your dc male jack. polarity is not important.

Step 3: The Code

1) First install the rtc library. Download here: http://www.rinkydinkelectronics.com/library.php?id... extract, and copy in your arduino's library folder (usually C:\Program Files (x86)\Arduino\library).

2)To set the time on your RTC. Upload the timesetter sketch found in this instructable sketch to your arduino with time and date changed to the current time and date. Check if it is correct by opening the serial monitor (crtl shift m in arduino ide). Warning, it will reset back to the date and time you set in the time setter sketch every time you open serial monitor while this sketch is loaded on the arduino.

3)Upload the detonator sketch found in this instructable to your arduino.

4) Check the serial monitor to make sure the time and date on the RTC are still correct (after uploading the rtc sketch this will no longer reset the time and date)

How it works:

in the long variables "one", "two", "three", "four" etc. you fill in exactly at what time and date you want your first, second, third, fourth etc. to be fired. You do this by replacing the existing value with the unix code of your desired time and date. You find the unix code through this sweet converter: http://www.onlineconversion.com/unix_time.htm. Unix code is a numerical way of formulating time and date. Nothing complicated. It is basicly the amount of seconds that have past since 1/1/1970.

In the variable "buzzertime", the number defines the amount of seconds before the detonation time the buzzer should start making warning sounds. Put 0 if you wish to switch this off. I recommend at least 5 in practice but hey! It 's your project!

The sketch is made for firing one que but you can easily adjust it to fire as many ques as you like simply by uncommenting the variables "two" to "ten" and maybe even adding more. At the bottom part, just copy the "else if" statement for each additional que and change the digital pin to the pin u used ("?" in the code)

YOU ARE NOW DONE !!!!

Step 4: What Will Happen?

When you switch the switch, your circuit will get power and be "ARMED" The "buzzertime" amount of seconds before the programmed time, the buzzer will warn you a shot is about to be fired. When the time and date you put in variable "one" in unix code is reached, the arduino will send a 5V signal to the tip 120. This will open the tip120 and allow current from the step up to flow towards female dc jack and back. From here it will flow into the electric match that is connected to the male dc jack. The match will ignite your pyro and "BOOOM". MAGIC! ;)

Step 5: Other Applications Than Pyro

This circuit can be used to time control low current dc power applications with the tip120 mosfet.

Or for high power apllications, simply use the same code and circuit but with a relay instead of the mosfet!

The possibilites are endless: lights, heating, a sprinkler, a waterballoon, a nuclear missile, release a large helium balloon etc. Use your imagination and go create!

Step 6: Firing From a Smartphone

This circuit can be fired from a smartphone just aswell with very few changes to the code.
Just build the circuit without the RTC and follow my other instructable to get it hooked up to your smartphone in just 5 minutes!

https://www.instructables.com/id/THE-2016-SUPER-NOO...

Please note that firing heavy pyro from a smartphone is dangerous and not recommened (and possibly illegal). In my own circuit I used the smartphone blynk app as an extra safeguard to remotely arm/disarm the circuit, NOT to actually send the fire signal. But you could.

Reserve this for the mini firecrackers unless you are knowledgable and experienced. At your own risk and responsability of course!

You could easily connect a wemosD1 or other ESP8622 to this circuit by connecting a few digital pins to your arduino's pins and transferring "high/low" signals that way. You can also build the whole platform on the esp8622 or wemosD1 but keep in mind the RTC is 5V and so are most mosfets like the tip120.

Step 7: Extra Info on Use, Safety and Tips:

1) Electric matches are best bought on ebay from china. They should be €0.50 a piece or less.

2) If you cannot get your hands on an ematch, get a piece of nichrome wire and put it between the clamps of a crocodile style clamp. See pic. Nichrome is what is in car cigarette igniters and toasters. It glows red hot when heated when current flows through. The great thing about this is that it is reusable infinite times unlike electric matches!

Note that you need a strong (can send a lot of current safely) pcb protected battery for this, also note that in the code you will need to change the "delay (300)" to a higher amount as this takes longer to heat. Nichrome is legal everywhere and easily available from www.aliexpress.com or found in car cigarette igniters.

3) Test your circuit first with an LED in your male dc jack (see pic).

4) To add more ques/ shots. Simply add more mosfets and hook them up like the first. There is no limit!

5) Add a cool case to protect from rain, the elements, and drunk idiots. I installed my circuit with 10 ques into an old cash box for my new years fireworks show (pic coming soon). I used a big breadboard to mount it all and hot glue to keep it in place. Having something you can lock is a good idea.

6) IMPORTANT! Many arduinos send high signals to their digital pins on reset, especially pin thirteen. This is not always the case and is easily bypassed by either adding a second switch to the positive lane that goes to your dc jacks, or by only inserting the male dc jacks after powering the arduino. Keep this in mind when designing!

7)BE CAREFUL AND DONT HURT ANYONE!


Any comments, remarks and questions are welcome. I am entering this instructables in some contests so if you liked it, please help me win by voting on all my super noob friendly instructables. Every vote means a lot! Links below ;)

https://www.instructables.com/contest/fsl2016/

https://www.instructables.com/contest/arduinoallthe...


HAPPY HACKING!

<p>Can you Upload a Video of this?</p>
<p><iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/u6GwKNRF7Js " width="500"></iframe><br><br>here is a demo vid. Hope this helps, give me your specific questions if you v got some and I ll answer :)</p>
I also added the vid to step one. please note that I used 4 aa batteries and one 9 v battery instead of a step up. this works too but as you can see makes the end result more bulky, more expensive and the operating time will be smaller than on a single imr18650 bat. I used an arduino mega because it has lots of pins and was easy to glue on. it s overkill though and I recommend soldering on a smaller and cheaper board of you have the skills ( I didnt at the time). Finally I wanna note that the multi breadboard setup works real fine for 9 of the 10 ques but one is buggy. solder to a perf board, dont be lazy like me! I will a diagram pic too soon.
<p>Man, as someone in the homeland defense industry, this makes me nervous. Bad guys will get it somewhere is if not here, so not a big deal. Great write-up!!!</p>
<p>Hey there, </p><p><br>Thank you for the compliment and emphasising that people will find this info anyways. I wondered myself if it was responsible to write this but quicly realised that anyone with bad intention would allready have this knowledge just from brwosing the web an afternoon. My guide is intended for guys 'n girls like me who like firework and beer, but need a fast and easy way not to combine them. For the geeky kid who is just curious how to go about this. For the smooth guy who wants to impress his girlfried with fireworks firing at the perfect time. Technology thrives on responsability, mututal trust and fun. ;)</p>