Computer Controlled Fireworks Display
by crapflinger in Outside > Rockets
48098 Views, 62 Favorites, 0 Comments
Computer Controlled Fireworks Display
*CAUTION INVOLVES EXPLOSIVES*
I was contracted by some friends to do a fireworks display for their wedding (seems as though my penchant for pyromania is well known in these parts). It took me about 6 months (not from lack of skill..but mostly lack of initiative and cash) to create the "Crapflinger box of doom" V1.0. It used momentary SPST push button switches, a box from a projector that i got from work, schedule 80 PVC, and a lot of luck. It went off with only a few hitches so i decided to rebuild for the fourth of July next year.
The rebuilt version will be known "Crapflinger Box of Doom" V2.0 and as of yet has not been physically completed. It has however been logically completed (even wrote some craptacular software for the thing). Since the thing isn't built yet...I'm very short on photos...but once the contraption is completed i will update this instructable to reflect the difference between planned execution and actual product.
I was contracted by some friends to do a fireworks display for their wedding (seems as though my penchant for pyromania is well known in these parts). It took me about 6 months (not from lack of skill..but mostly lack of initiative and cash) to create the "Crapflinger box of doom" V1.0. It used momentary SPST push button switches, a box from a projector that i got from work, schedule 80 PVC, and a lot of luck. It went off with only a few hitches so i decided to rebuild for the fourth of July next year.
The rebuilt version will be known "Crapflinger Box of Doom" V2.0 and as of yet has not been physically completed. It has however been logically completed (even wrote some craptacular software for the thing). Since the thing isn't built yet...I'm very short on photos...but once the contraption is completed i will update this instructable to reflect the difference between planned execution and actual product.
Materials
1 - Large box (large enough to house the finished contraption I'm using an ammo box i had lying around)
2 - Serial Isolated I/O Module (You can get these pre-assembled or in kit form from Here)
1 - Upgrade kit to join the two I/O modules together (i got mine from the same place as the module)
2 inch Schedule 80 PVC pipe cut into 6 - 8 inch lengths (I'll be using 24 8 inch pieces so that's about 16 feet of pipe total)
2 inch PVC end caps (I'm going to try to use screw type caps so that i can load the thing easier...i used rounded end caps on the first project..but when fired...the PVC pipe actually flies out of the device...which isn't very controllable..i think with the screw caps I'll be able to eliminate this)
Bolts - 2 per firework to be launched (I'm firing a total of 26 devices so I'll need 52)
Wing Nuts - one per bolt used (I'll need 52)
Screws - Lots OF SCREWS...
Wire - preferably 2 different colors for easy setup (i use 22 gauge solid core for my positive and i think somewhere around 18 gauge stranded for the negative...why? because that's what I've got)
Plywood - to make a raised base inside your box
Fireworks - this is up to you..but I'm using 2 "dirty dozen" mortar sets and 2 "Texas rattlesnakes"
Model rocket igniters - one per firework (i used Estes igniters on V1.0 but I'll be using the Aerotech first fire juniors for V2.0 as they are more reliable and easier to insert into the fireworks themselves)
Note: please don't make fun of the overcomplexity that's going to show up in this project...i like over complex...i know i can do things with less steps...but why would i?
2 - Serial Isolated I/O Module (You can get these pre-assembled or in kit form from Here)
1 - Upgrade kit to join the two I/O modules together (i got mine from the same place as the module)
2 inch Schedule 80 PVC pipe cut into 6 - 8 inch lengths (I'll be using 24 8 inch pieces so that's about 16 feet of pipe total)
2 inch PVC end caps (I'm going to try to use screw type caps so that i can load the thing easier...i used rounded end caps on the first project..but when fired...the PVC pipe actually flies out of the device...which isn't very controllable..i think with the screw caps I'll be able to eliminate this)
Bolts - 2 per firework to be launched (I'm firing a total of 26 devices so I'll need 52)
Wing Nuts - one per bolt used (I'll need 52)
Screws - Lots OF SCREWS...
Wire - preferably 2 different colors for easy setup (i use 22 gauge solid core for my positive and i think somewhere around 18 gauge stranded for the negative...why? because that's what I've got)
Plywood - to make a raised base inside your box
Fireworks - this is up to you..but I'm using 2 "dirty dozen" mortar sets and 2 "Texas rattlesnakes"
Model rocket igniters - one per firework (i used Estes igniters on V1.0 but I'll be using the Aerotech first fire juniors for V2.0 as they are more reliable and easier to insert into the fireworks themselves)
Note: please don't make fun of the overcomplexity that's going to show up in this project...i like over complex...i know i can do things with less steps...but why would i?
Set Up the Serial Isolated I/O Modules
I went ahead and spent the extra $20 on the pre-assembled kits because i just didn't feel like putting them together...however you can get them in kit form and assemble them yourself for that "Look mom...i did it all by myself!" kind of feeling that's so important here.
1. Replace the existing firmware in K108 with the two supplied, identical K108dual firmware chips.
2. Remove the front and rear panels of each K108. You will have to unsolder and remove the LED bezels and reset switch. Add the Master panel and Relays 1-8 to one K108, and the Slave panels with Relays 9-16 to the other.
3. Remove IC7, 4N25 from both K108s. Insert two wire links either soldered on the bottom of the PCB underneath the IC7 socket or jumper-ed as shown:
• Pin 1 to 5
• Pin 2 to 4
4. The two K108 kits need to be connected together via a data link. The data link uses Input 4 of each original kit. Use the short length 2-wire cable supplied to connect input 4 of each kit together, with the ‘+’ terminals connected to each other and the ‘-’ terminals connected to each other. Connect using the 2-pole screw terminal plugs supplied with each K108 kit.
Longer wire lengths are possible between the two kits. However the data link uses TTL level pulses which will be affected by long wire lengths. Anything over 1 metre (36 inches) may cause problems. Try it and see!
Only one of the kits connects to the PC via the serial port. This will be the Master unit. It doesn’t matter which kit you connect to the PC. However, for ease of use, the front and rear panels are numbered differently for the master and slave so it makes sense to connect the kit labeled ‘Master” to the PC serial port.
The modules require a 12V Center Positive DC power source with at least 500MA draw...so i just cut the business end off of 2 Center positive DC wall plugs and wire them up to one of the 12V batteries (i got 5MAH batteries just to be sure everything works long enough)
These steps are all outlined in the manual for these things (and the subsequent upgrade module) but...it makes sense to post them here as well
1. Replace the existing firmware in K108 with the two supplied, identical K108dual firmware chips.
2. Remove the front and rear panels of each K108. You will have to unsolder and remove the LED bezels and reset switch. Add the Master panel and Relays 1-8 to one K108, and the Slave panels with Relays 9-16 to the other.
3. Remove IC7, 4N25 from both K108s. Insert two wire links either soldered on the bottom of the PCB underneath the IC7 socket or jumper-ed as shown:
• Pin 1 to 5
• Pin 2 to 4
4. The two K108 kits need to be connected together via a data link. The data link uses Input 4 of each original kit. Use the short length 2-wire cable supplied to connect input 4 of each kit together, with the ‘+’ terminals connected to each other and the ‘-’ terminals connected to each other. Connect using the 2-pole screw terminal plugs supplied with each K108 kit.
Longer wire lengths are possible between the two kits. However the data link uses TTL level pulses which will be affected by long wire lengths. Anything over 1 metre (36 inches) may cause problems. Try it and see!
Only one of the kits connects to the PC via the serial port. This will be the Master unit. It doesn’t matter which kit you connect to the PC. However, for ease of use, the front and rear panels are numbered differently for the master and slave so it makes sense to connect the kit labeled ‘Master” to the PC serial port.
The modules require a 12V Center Positive DC power source with at least 500MA draw...so i just cut the business end off of 2 Center positive DC wall plugs and wire them up to one of the 12V batteries (i got 5MAH batteries just to be sure everything works long enough)
These steps are all outlined in the manual for these things (and the subsequent upgrade module) but...it makes sense to post them here as well
Make Your Box of Choice Work for You
(no pictures of it yet sorry...still building..I'll add them when i have them)
Now is where you modify whatever box you chose for the project do what you want it to do (which is house the whole contraption)
First screw/glue 4 pieces of scrap wood measuring 2" X 1/2" X 3"(ish) into the four corners of the inside of the box along the bottom to make clearance for the two relay modules to hide safely underneath the platform (i may have miscalculated the space needed so this measurement may change)
Next cut a piece of plywood large enough to fit directly into the box and rest it on the supports you just installed...try placing the relay modules underneath the plywood to make sure you've got clearance
Now remove the plywood and lay out the PVC end caps on it in an orderly fashion to see what layout suites your needs. On mine i will have two rows of 12 caps. One row across the front of the box and one row across the back side. Once you get your layout the way you want, drill two hols in the bottom of each end cap (since I'm using screw caps...i would be drilling through the end of just the screw in portion) and attach them to the plywood with wood screws (you don't need too much here you're just trying to stop the cap from spinning or pulling off...so try not to use screws that will go through the plywood).
Next drill two holes (big enough to accommodate the bolts that you've purchased)near each PVC cap (make sure to leave room to turn the wing nuts on top)
Now i know we're setting the box up now but let's do a LITTLE bit of wiring while we're at it.
Designate one out of each pair of bolts as the ground and one as the hot side. Take a length of the wire you'll be using as your ground that's long enough to start on one end of the board and loop around back to that end (like a U shape). Take one of your bolts and wrap a stripped end of the ground wire around it then tighten a nut down on the wire (if you wrap the wire in a clockwise direction..then when you tighten the nut it will wrap the wire tighter instead of loosening it) then insert this bolt up through the bottom of the plywood and tighten another nut down on top to secure the bolt in place then tighten down a wing nut on the bolt. Measure out to the next bolt with the wire and strip a piece of the sheath off of the wire in such a way that will allow you to wrap the bare portion around the next bolt, then tighten the nut down onto the wire and insert the bolt up through the bottom of the board as before and tighten another nut down on top to secure the bolt in place then tighten a wing nut down on to the bolt. Continue doing this until all of your ground terminals are connected to the wire. now on the long end of this ground terminal, crimp on a connector that can be used to connect to one of your 12V batteries. The battery I'm using has spade type terminals so I'll be using the female side of a spade connector set type deal...if your battery has other terminals use whatever will work, like alligator clips or ring terminals.
you'll also want to find a method of getting your serial cable into the bottom of this box..i just cut a notch in the plywood so that i can run the cable up out of the bottom and to my laptop
(this could probably be done with ring terminals or you could skip the process of using the bolts and wire things more directly...i personally prefer to keep things a little orderly and hopefully later on in the steps this process will make sense)
Now is where you modify whatever box you chose for the project do what you want it to do (which is house the whole contraption)
First screw/glue 4 pieces of scrap wood measuring 2" X 1/2" X 3"(ish) into the four corners of the inside of the box along the bottom to make clearance for the two relay modules to hide safely underneath the platform (i may have miscalculated the space needed so this measurement may change)
Next cut a piece of plywood large enough to fit directly into the box and rest it on the supports you just installed...try placing the relay modules underneath the plywood to make sure you've got clearance
Now remove the plywood and lay out the PVC end caps on it in an orderly fashion to see what layout suites your needs. On mine i will have two rows of 12 caps. One row across the front of the box and one row across the back side. Once you get your layout the way you want, drill two hols in the bottom of each end cap (since I'm using screw caps...i would be drilling through the end of just the screw in portion) and attach them to the plywood with wood screws (you don't need too much here you're just trying to stop the cap from spinning or pulling off...so try not to use screws that will go through the plywood).
Next drill two holes (big enough to accommodate the bolts that you've purchased)near each PVC cap (make sure to leave room to turn the wing nuts on top)
Now i know we're setting the box up now but let's do a LITTLE bit of wiring while we're at it.
Designate one out of each pair of bolts as the ground and one as the hot side. Take a length of the wire you'll be using as your ground that's long enough to start on one end of the board and loop around back to that end (like a U shape). Take one of your bolts and wrap a stripped end of the ground wire around it then tighten a nut down on the wire (if you wrap the wire in a clockwise direction..then when you tighten the nut it will wrap the wire tighter instead of loosening it) then insert this bolt up through the bottom of the plywood and tighten another nut down on top to secure the bolt in place then tighten down a wing nut on the bolt. Measure out to the next bolt with the wire and strip a piece of the sheath off of the wire in such a way that will allow you to wrap the bare portion around the next bolt, then tighten the nut down onto the wire and insert the bolt up through the bottom of the board as before and tighten another nut down on top to secure the bolt in place then tighten a wing nut down on to the bolt. Continue doing this until all of your ground terminals are connected to the wire. now on the long end of this ground terminal, crimp on a connector that can be used to connect to one of your 12V batteries. The battery I'm using has spade type terminals so I'll be using the female side of a spade connector set type deal...if your battery has other terminals use whatever will work, like alligator clips or ring terminals.
you'll also want to find a method of getting your serial cable into the bottom of this box..i just cut a notch in the plywood so that i can run the cable up out of the bottom and to my laptop
(this could probably be done with ring terminals or you could skip the process of using the bolts and wire things more directly...i personally prefer to keep things a little orderly and hopefully later on in the steps this process will make sense)
Wiring the Heck Out of the Thing
Now...this is quite possibly the worst Visio drawing I've ever made...but it should get the job done.
Along the bottom side of the diagram you will see what I've got as my relay output's from the relay modules. There are 16 (if you've used the dual upgrade kit) available to play with (incidentally, this kit is capable of switching full AC so you're not limited to DC applications...you could use this to turn lights on and off or blenders or anything you want really).
but I've got 26 devices to fire with it, so some things will be wired to the same terminals (you could in theory wire things to multiple terminals as well in such a way that you would have to turn two relays on at the same time to activate a single device...could add more versatility).
it may be in your best interest to number each launcher so you can keep stuff straight. My numbering scheme starts with #1 in the top left corner and continues over to #12 in the top right then #13 on the bottom left and #24 on the bottom right, #25 and #26 are the two in the middle that aren't in line with everyone else.
For my purposes i will have a setup that will fire:
#1
#12
#2 & #11
#3 & #10
#4 & #5 & #6
#7 & #8 & #9 (end of the top row)
#13 & #24
#14 & #23
#15 & #22
#16
#21
#17
#20
#18
#19 (end of the bottom row)
#25 & #26
if you count those up...that's 16 events to fire 26 devices, so we've got to wire accordingly..which is where the crappyness of the Visio comes in. (it's really hard to layer the connections that close)
You will want to wire each POSITIVE terminal as follows to the relay modules (RXX is for relay LXX is for launcher):
R01 - L1
R02 - L12
R03 - L2 & L11
R04 - L3 & L10
R05 - L4 & L5 & L6
R06 - L7 & L8 & L9
R07 - L13 & L24
R08 - L14 & L23
R09 - L15 & L22
R10 - L16
R11 - L21
R12 - L17
R13 - L20
R14 - L18
R15 - L19
R16 - L25 & L26
Just take a length of wire long enough and wrap one stripped end around a bolt and tighten a nut down on the wire then pass the bolt through the bottom side of the plywood and tighten another nut down on top to secure the bolt in place then tighten a wing nut down on the bold then put the other end of the wire into the corresponding NO (normally open) terminal on the relay module.
Now you'll want to run wire from the C terminals of each relay on the relay module to the positive side of your 12V battery with the appropriate connector on the battery end of the wire.
Now the only reason i chose to do this amount of work is because i wanted to keep the majority of the wiring out of site..which in this case...all of the wiring is out of site as these connections were made underneath the plywood...makes for a lot less clutter and confusion.
Along the bottom side of the diagram you will see what I've got as my relay output's from the relay modules. There are 16 (if you've used the dual upgrade kit) available to play with (incidentally, this kit is capable of switching full AC so you're not limited to DC applications...you could use this to turn lights on and off or blenders or anything you want really).
but I've got 26 devices to fire with it, so some things will be wired to the same terminals (you could in theory wire things to multiple terminals as well in such a way that you would have to turn two relays on at the same time to activate a single device...could add more versatility).
it may be in your best interest to number each launcher so you can keep stuff straight. My numbering scheme starts with #1 in the top left corner and continues over to #12 in the top right then #13 on the bottom left and #24 on the bottom right, #25 and #26 are the two in the middle that aren't in line with everyone else.
For my purposes i will have a setup that will fire:
#1
#12
#2 & #11
#3 & #10
#4 & #5 & #6
#7 & #8 & #9 (end of the top row)
#13 & #24
#14 & #23
#15 & #22
#16
#21
#17
#20
#18
#19 (end of the bottom row)
#25 & #26
if you count those up...that's 16 events to fire 26 devices, so we've got to wire accordingly..which is where the crappyness of the Visio comes in. (it's really hard to layer the connections that close)
You will want to wire each POSITIVE terminal as follows to the relay modules (RXX is for relay LXX is for launcher):
R01 - L1
R02 - L12
R03 - L2 & L11
R04 - L3 & L10
R05 - L4 & L5 & L6
R06 - L7 & L8 & L9
R07 - L13 & L24
R08 - L14 & L23
R09 - L15 & L22
R10 - L16
R11 - L21
R12 - L17
R13 - L20
R14 - L18
R15 - L19
R16 - L25 & L26
Just take a length of wire long enough and wrap one stripped end around a bolt and tighten a nut down on the wire then pass the bolt through the bottom side of the plywood and tighten another nut down on top to secure the bolt in place then tighten a wing nut down on the bold then put the other end of the wire into the corresponding NO (normally open) terminal on the relay module.
Now you'll want to run wire from the C terminals of each relay on the relay module to the positive side of your 12V battery with the appropriate connector on the battery end of the wire.
Now the only reason i chose to do this amount of work is because i wanted to keep the majority of the wiring out of site..which in this case...all of the wiring is out of site as these connections were made underneath the plywood...makes for a lot less clutter and confusion.
Load the Device
This portion CAN BE DANGEROUS, remember fireworks use gunpowder which is designed to explode...don't do anything stupid like...smoke while you set this up.
MAKE SURE THAT THE BATTERY IS NOT ATTACHED!!!
Take the rocket igniters and separate the wires about 3" down from the ends (not the black end...don't touch that if you can avoid it because you don't want to disturb the pyrogen) then strip about 1/2" of the sheathing off the ends of both wires.
Remove one of the mortars from the box they came in and cut the fuse very close to the base, then push the remnants back into the base of the mortar.
Push the black end of the igniter into the hole where the fuse was in the mortar. You shouldn't meet any resistance here, but if you do, pull the igniter out and see if you can see the obstruction. The cavity that we're feeding the igniter into is the launch charge, there is a protrusion in the center of this cavity that facilitates the lighting of the secondary charge which is what causes the nifty mid-air explosions and is probably what you're hitting with the igniter. Don't worry about making contact with anything inside this cavity as it's just a place full of gunpowder, so as long as the igniter is in there, it's touching the powder. now place a piece of electrical tape over the hole so that no gunpowder comes out of it as well as to keep the igniter from pulling out.
Now thread the igniter out through the hole in the end cap. now wrap one stripped end of the igniter wire around one of your terminals and tighten the wing nut down, then do the same with the other igniter wire. It doesn't matter which end goes to which terminal you're just trying to complete a circuit here.
Now screw your PVC pipe/End cap down onto the male portion of the screw cap. (if you're using the normal style end caps just push the pipe in and tape it down with some duct tape)
MAKE SURE THAT THE BATTERY IS NOT ATTACHED!!!
Take the rocket igniters and separate the wires about 3" down from the ends (not the black end...don't touch that if you can avoid it because you don't want to disturb the pyrogen) then strip about 1/2" of the sheathing off the ends of both wires.
Remove one of the mortars from the box they came in and cut the fuse very close to the base, then push the remnants back into the base of the mortar.
Push the black end of the igniter into the hole where the fuse was in the mortar. You shouldn't meet any resistance here, but if you do, pull the igniter out and see if you can see the obstruction. The cavity that we're feeding the igniter into is the launch charge, there is a protrusion in the center of this cavity that facilitates the lighting of the secondary charge which is what causes the nifty mid-air explosions and is probably what you're hitting with the igniter. Don't worry about making contact with anything inside this cavity as it's just a place full of gunpowder, so as long as the igniter is in there, it's touching the powder. now place a piece of electrical tape over the hole so that no gunpowder comes out of it as well as to keep the igniter from pulling out.
Now thread the igniter out through the hole in the end cap. now wrap one stripped end of the igniter wire around one of your terminals and tighten the wing nut down, then do the same with the other igniter wire. It doesn't matter which end goes to which terminal you're just trying to complete a circuit here.
Now screw your PVC pipe/End cap down onto the male portion of the screw cap. (if you're using the normal style end caps just push the pipe in and tape it down with some duct tape)
Programming and Firing the Device
All the programming commands are contained in the setup manual of the modules but...it's pretty simple stuff... you can either use the pre written windows software for the thing ( found here http://www.kitsrus.com/zip/k108dual.zip )or you can write your own software to do it for you (which is what i did)...all the inputs to the device can be given in normal ASCII characters as long as each command is followed by a carriage return, as far as the module is concerned the command wasn't entered until it gets the CR so don't forget that. Now I'm not a programmer so I'm not going to tell you how to do this, but if you've got VB use the help files, cuz that's how i made my program (which is attached) which is basically a flashy doodad that just sends command to the COM port...nothing special.
Downloads
FIring Everything
Once all your wiring is checked, all the fireworks are loaded and connected, and your program is done, simply connect both batteries and the serial cable and start the routine. If all goes well you should hear a lot of Oohs and Ahhs and hopefully all your fingers stay attached at the end.
As i said in the beginning, i actually haven't built this thing yet, but it will be built and as i do I'll take more pictures and update this thing.
As i said in the beginning, i actually haven't built this thing yet, but it will be built and as i do I'll take more pictures and update this thing.