Mega Fireworks Sequencer Idea/Please Help

Hello all. I've gotten myself in a bit over my head and sold the idea of making an arduino based fireworks sequencer that can be synced to music. This went over so well that now the plan is for a sequencer that can handle ~100 cues, and can be initiated wirelessly. Electronics aren't exactly my forte, but I'm no stranger to a soldering iron either.

I've done some googling and found several threads with similar ideas but with much fewer cues. From what I've found I believe I either need several Mega 2560's or some way to increase the pwm output's with a breadboard or something.

As I understand it, the Mega can handle 13 pwm outputs at 5v which I believe will be enough to set off the e-matches I intend to use link. But I've also heard that you can run the board at higher voltage (ex 9v), and it will regulate that down to 5v. But I'm not sure if the full voltage makes it to the pwm outputs.

I'm thinking I can daisy chain several Mega's together to make up the total number of cues, using the digital pins as the link between boards.

The display will be on a floating platform about 100 ft from shore, so I'll need a way to start the sequence wirelessly. I'm thinking a bluefruit ez-link module, but that seems a bit overkill for just starting the sequence.

As far as the software, I was just planning on manually programming each board with its own delay/pin to sync to the music, but if there is a better option please let me know.

Cost isn't a major factor, but I dont want to go too crazy.

Any ideas/suggestions/recommendations/telling me I'm an idiot for getting in this far over my head are welcome.

Thanks

savan12986:
As I understand it, the Mega can handle 13 pwm outputs at 5v which I believe will be enough to set off the e-matches I intend to use link. But I've also heard that you can run the board at higher voltage (ex 9v), and it will regulate that down to 5v. But I'm not sure if the full voltage makes it to the pwm outputs.
.

Thanks

The PWM output will reflect the regulated (5V) voltage.

Ok. Upon further research I realize I dont need pwm control, as I can connect the electric matches to the digital outputs. Meaning I will only need 2 mega's instead of the 8 I was thinking I'd need. I've also found this 2.4ghz transmitter and receiver. I'm thinking I can save some money by using an uno as the transmitter source on shore, and have the 2 mega's and the receiver on the platform. That should give me a total of 108 digital pins. 5 will be used as input for the receiver, 2 to daisy chain the boards together, leaving me with 101 possible signal cues.

Does this sound like it will work, or am I getting off track?

Yes, assuming the digital pins are driving mosfets (with a pulldown on the gate) - eMatches involve a significant current pulse (the higher the current, the more predictable the instant of firing - pro's use capacitors to provide a pulse of current to make sure it fires ASAP).

Also, this should go without saying, but when you connect power, you should plan as if any (or all) fireworks could be ignited at any time after the power is connected - and ensure that this would be safe for both spectators and your shooting team.

The NRF24's are kinda flaky IME - make sure they're as reliable as you hope. It'd suck for it to fail halfway through the show. Frankly, I think it's more fun to run through the field of fireworks with torches and safety glasses setting the stuff off, than to sit on your arse pushing buttons

Ok, so I don't know what a mosfet is or what a pulldown on the gate means. I know what a capacitor is, but I dont know how to trigger it to fire.

Indeed. I intend to hook everything up first then plug in the 9v batteries to the boards and flip an arming switch then book it back to shore. (the display will be shot from a floating platform).

From what I've read the NRF24 is ok, as long as you bridge the 3.3v and ground with a capacitor, and I only need it to act as a remote button press. The sequence will be hard coded into the boards.

It's going to be synced to music so electronic ignition is the only reliable option, even though running around with fire is fun.

Well you'd better look up what a MOSFET is - then you'll understand why you need a pulldown on the gate. You need something that can switch a fair amount of current. I do not think you can set those off from an IO pin while staying w/in the specs of the '2560.
Uh, what kind of 9v battery were you planning on using? You know you need a beefy battery, right? Like, if I were doing this, I'd use a car battery (which can supply such monstrous current that you probably don't even need the caps...)

Ok, so I think I at least have an idea of what to do with the MOSFET. Correct me if I'm wrong. For each digital output I'll need an N Channel Logic Level MOSFET. The digital output will connect to the gate through a pull down resistor which will keep the resistance high on the drain side and prevent stray voltage from igniting the ematch. When the digital signal is applied it will remove the resistance on the drain allowing power to flow from the source to the drain and into the ematch.

If I'm wrong please correct me.

If I'm right, I have further questions. From what I've read the gate voltage has to be higher than the source voltage for the current to pass to the drain side. If the digital output is 5v how can I use a car battery as the power source?

And at the same time, why couldn't I just use a pulldown resistor directly in line from the digital pins to the ematch? It would "theoretically" prevent accidental ignition from residual voltage in the digital lines prior to switching to their high state? IE, the digital pin is already acting as a switch, why do I need another?

Some suggestions:

When you want to fire (almost) in sequence, you can use digital decoder chips (74138, 74154...) to reduce the number of digital pins significantly. As soon as one igniter has fired, you can trigger the next one, maybe many within one second. For this approach you need a power source capable of supplying the current for a single igniter only.

Since I'm not very familiar with FETs, I'd use pnp transistors for each output, activated by a low level from a digital (Arduino or decoder) pin. The igniters connect between emitter and positive fire supply, collector to common Gnd (negative supply).

Another transistor or (safer) a relay may be used to enable ignition at all, after the program has initialized everything and received the start signal.

I'd consider to pack one decoder (or Arduino) with related circuitry and screw terminals for the igniters into boxes. Paint big sequence numbers onto the boxes, to prevent confusion while connecting to the firework.

I'm not particularly experienced with electrical engineering, so to keep this as simple as possible for rapid fire sequences I'm just using cake style fireworks with internal sequencing already built in.

If I'm using 12v as the firing source, will 5v from the arduino be enough base voltage to switch the transistor on? And will I have to worry about voltage leaking to the emitter side prematurely?

Yeah, I was going to pack all the electronics in boxes with terminals for all the wiring for ease of setup / to prevent damage to the electronics. I'll also have arming switches on the boxes to prevent ignition while hooking the boxes up to their power sources.

STOP for a second. you have jumped WAY past the gate.

what do you have, what do you know about the whole arduino world ?

if you want to set off an e-match, you only need a simple output that controls a transistor or some such.

you can use a chip called a shift register and control 8 outputs from one arduino.
but you can daisy chain lots of shift registers and control 100 outputs almost as easily.

but, you really should break down the whole project.

you have music, you 'listen' to it and then based on some logarithm, you choose when to light the fuse
of course, you have to light that a few seconds before the fireworks is launched which has to be a few seconds before it goes off, which needs to be timed to when the music will be heard by humans. time shifting is not my speciality.

ASSUMING, you have all the music and switch timing worked out, and are down to the pulse generation, getting the fuses lit is the easy part.

but, based on YOUR experience and the probably 2 week window, you need to get some actual help.

if this is correct, there are a few on here that already have hardware (boards) and knowledge to do this part.

http://www.crossroadsfencing.com/BobuinoRev17/

this guy has the boards he can ship
if you have the music part worked out, this may help wrap this project up.

I will offer that an hour spent with the overall plan, and what has to be done at each step, is of paramount [adjective
more important than anything else; supreme.] importance for fast completion of this project.

savan12986:
/telling me I'm an idiot for getting in this far over my head are welcome.

Thanks

you are in idiot for getting in this far over your head.
you're welcome.

from what I see,
you have to have the music sequence in the can.

you have to start a fuse lighting sequence a few seconds before the music starts to allow the fuse to light, the firework to go up and then explode in coordination of the beat.

assuming you have the pulse sequence all mapped out, then all you need to do is take that data set and coordinate the start point.

the timing needs to be sent for each song ? what do you do if the CD skips ?

but for the song, all you need to do is fire off each point based on the time from the start. not really that hard.

I would offer that you should get 3 sets of fuses and regular firecrackers. then do a full test run.
the reason is for 3, is in the event that one test fails and you have to try again.

I think you can do it with LED's but there is nothing like a real test of the power for each fuse.

First of all, let me thank you for being the first one to tell me I'm an idiot. Now I have to do it to prove you wrong, so I no longer have an excuse to give up.

My arduino experience so far has been limited to updating/tweaking the firmware on my 3d printer.

I have no hardware for the actual build yet, but I have prime so once the plan is set I can start assembly in 2 days.

The 32 channel N Mosfet board you linked to looks very promising. From what I've read on shift registers, I think I'd be able to drive many off a single uno. I'd connect clk, ce, sh/ld in parallel to multiple mosfet boards, then use any of the remaining digital pins to ser_in one per board.

Then each of those boards has its own mosfet acting as switches with pull down resistors on the gates, and a 12v rail that I can hook to the battery.

That would complicate the code side a little, but it would greatly simplify the hardware side. (I'm better at code than hardware, so that is preferable to the alternative)

I have taken into account the need for offsetting the cues relative to the music, and the music will be in mp3 format, so no need to worry about skipping.

I have the same plan - the firecrackers. I've already ordered 300 ematches so I can debug while building and do a full test run with plenty of spares left over.

savan12986:
First of all, let me thank you for being the first one to tell me I'm an idiot. Now I have to do it to prove you wrong, so I no longer have an excuse to give up.

I have the same plan - the firecrackers. I've already ordered 300 ematches so I can debug while building and do a full test run with plenty of spares left over.

to be fair, I posted what you asked. :slight_smile:
now about that test..... youtube.
I am REALLY glad you have some experience in code. if you were going to say, you just bought an Arduno and are having problems getting an LED to blink.....
Crossroads seems to take his time to make boards before he puts them on his site. and, from what I have seen, he tests the concept, the circuit and software to make sure it holds no surprises.
on a personal note.... I have watched many firework displays and found that I want to see a waterfall.... and watch it fall, then a starburst, and let it burst.... all too often there are overlapping fireworks that drown out the last one. as if the whole basis of the event was to see how many one can light off in an hour.
to me, the emphasis is on seeing one waterfall, until it dies out and not have a second or third or fourth go off over top so that the Waterfall is washed out under a Willow, under a horsetail..... because the Willow is also washed out by the remnants of the Waterfall and a Palm......

savan12986:
If I'm using 12v as the firing source, will 5v from the arduino be enough base voltage to switch the transistor on? And will I have to worry about voltage leaking to the emitter side prematurely?

If you mean that 12V is required, you need appropriate driver circuits. Do you have an idea of how much current flows then, or can you measure the (typical) resistance of one igniter?

Shift registers can be used as well, but then you must cut off all outputs while shifting, or you risk to fire too early.

the question of safety comes into play.

if you feed all the ignighters with power, and then only bring one to ground as you want, that is great. however, any short will bring some to ground.

DrDiettrich:
I dont necessarily mean 12v is required, but I plan on using a car battery as the source for the ignition. The mosfet boards have 12v connections on the end of each row, which I assume to be intended as the source voltage for the mosfet, then the gate voltage is supplied from the arduino board and routed via the shift registers. The ematches themselves reportedly can be ignited by something as small as a watch battery, but 12v should fire them more reliably and I wont have to worry about killing the battery half way through the show.

Dave:
I believe that that is how the mosfet board is designed. Being N type the source would be common ground, then when the gate is triggered by the digital pin entering high state the current will flow from common + through the ematch through the mosfet and down to common ground. So the only short that would actually cause ignition would either be a bridge between the drain wire and ground, or any short that would cause the gate to switch, but I cant think of what would cause that.

Also, I've never done a wiring diagram before, but I'll attempt to put one together for review

Ok, so here's the schematic of how I think this will work

Will each MOSFET have its own I/O pin?

Isaac96:
Will each MOSFET have its own I/O pin?

eACH mosfet BOARD WILL HAVE A SERIAL CONNECTION.

THE CAPS LOCK..... darn

the board will have one FET per fuse
this is representative of 32....