Hi all,
I'm a happy builder with basic electronics knowledge but limited experience. I recently (just before new year, naturally) tried building an Arduino-based fireworks control system. Unfortunately, something happened that seem to have fried the NodeMCU board I was using. The only lucky part of the story was me being somewhat paranoid and expecting the digital electronics to fail, so I built manual firing switches into the solution also. The fireworks went off as planned, but I would really like to know what fried my NodeMCU and next time I want to do it digitally! (had installed a tiny web server on the NodeMCU and even written some Javascript for the fire control...)
I've attached a schematic of the whole thing.
I use a single 12V lead-acid battery to power it all. The 12V goes through four relay modules and then out to resistance-based igniters (resistance in each is 1.5-2 ohm including wire resistance of <0.5 ohm, which means a fire event causes 12V @~6A to go through the relay that is firing). In parallell with the relays are manual push buttons that can be used to fire things manually in case the electronics fail (which they did
The relay modules have VCC, GND and signal inputs, where "signal" comes from an output pin on the NodeMCU. Setting the pins LOW results in the relay solenoid "pulling" (drawing current) which lets through the 12V to the igniters. I use a 10k pull-up resistor between each NodeMCU pin and 3.3V to keep the relays in "off" until the NodeMCU sets the pins LOW.
The VCC on the relays and the 3.3V pin on the NodeMCU receives 3.3V from a 12->3.3V regulator that is supposed to be good for 1A output. The relays actually want 5V but experimenting I found that they seemed to work fine when powered by this regulator and when getting 3.3V on their signal pin. At least two of them did when I was breadboarding things... When everything was hooked up according to the schematic the relays actually behaved erratically, but I figure this is maybe not related to the NodeMCU getting fried and is more likely to just be an effect of not providing proper 5V for the relays?
Anyways, what I'd like to know is if someone has any good theories about what killed the NodeMCU, and what can be done to fix the issue. My wild guess has been on some kind of back-current from the 12V part of the circuit when a firing event happens. I used crimping connectors in most places of the 12V high-current parts of the circuit and there may be resistance there due to so-so connections. If this is the case maybe it can be fixed with a couple of well-placed diodes?
Any help is greatly appreciated!
And yes, I could use a second battery just to power the low-voltage part of the circuit. Isolate the two circuits from eachother. But that complicates things and I would like a simple, one-battery setup if possible. How hard can it be???