1
\$\begingroup\$

I have a stun gun (http://www.amazon.com/VIPERTEK-VTS-989-Heavy-Rechargeable-Flashlight/dp/B00FPE6UN2) which I am using to create a large 1/2" electrical arc through the air to remotely ignite a butane-based torch with a 4ft flame.

The stun gun runs on its own isolated battery, and is optocoupled to an Arduino Pro Mini (with Atmel Atmega328 microcontroller) in order to trigger the stun gun ignitor, as well as open the solenoid flow valve.

My 5V power to the Arduino comes from two switching power supplies diode ORed together through some Schottkys. I have a 2200uF cap I added to the power supply output after the "OR" diodes. There is a dedicated battery for the switching power supplies to the Arduino, separate and not connected in any way to the stun gun's battery.

I have added a 1W 5.1V Zener diode reverse-biased from Arduino Vcc to GND to attempt to clip off unwanted positive and negative voltage spikes that come from the stun gun arc.

However, the power supply is very clean until I fire the stun gun to light the torch. During this period, my O-scope shows transients up to 10+ V and down to -5 or less V, even with the Zener diode in place.

Note that the sparks are occurring at a rate of ~30 sparks/sec, and I'd guess (I'd need to verify via more background research to be more sure) that the voltage at the arc electrodes is 40kV~80kV.

Sometimes my microcontroller completely glitches in very unexpected ways. Ex: stun gun ignitor locks "ON" even when my code has no place where it remains on, LED heartbeat stays "ON" even though I have no place where I command the LED to stay solid and not blink, LED hearbeat keeps blinking indicating it is receiving commands properly but solenoid valve will no longer respond, etc etc. Reset fixes these problems. I think they are EMP-pulse related, or something happening inside the chip with bitflips or something, not code related. I am an experienced coder on these chips, but I am not experienced dealing with large electrical arcs and stun guns, and mitigating EMF and EMP noise.

2 questions:

1) How can I remove/reduce unwanted EMF/EMP noise from this large spark gap/stun gun ignitor? +10 to -5V sounds REALLY bad for the microcontroller, to me, unless it's an artifact of measuring with my oscillocope and is not really present like that on the chip, with the Zener in place.

2) will configuring the Watchdog timer fix my problem and consistently force auto reset during lockups, or is it possible for the watchdog to lock up too? I'll try it regardless, but additional info beyond my knowledge bank is helpful.

\$\endgroup\$
6
  • 2
    \$\begingroup\$ Got a schematic? \$\endgroup\$
    – uint128_t
    Apr 8, 2016 at 3:43
  • \$\begingroup\$ Can you try to add ferrites to the wiring? They should be easy to source from random cables and help with high frequency noise \$\endgroup\$
    – Wesley Lee
    Apr 8, 2016 at 4:01
  • 2
    \$\begingroup\$ Your cable is a likely source of pickup. Connect from the Arduino to the opto via twisted, shielded pair, with the shield tied to ground and whatever case you're using for the Arduino. Not using a case? Time to step up. Metal case, please. Do the same for all external connections, including power. \$\endgroup\$ Apr 8, 2016 at 4:53
  • \$\begingroup\$ @Gabriel Staples Did you ever sort out the solution to this? I'm having the same problem. You can see my question here: electronics.stackexchange.com/questions/229601/… In the end I was noticing that if I touched my power rail capacitor (providing some path to Earth), it fixed it. I was debugging more when my little high-voltage generator died. :( Maybe together we can solve this mystery once and for all! \$\endgroup\$ Apr 29, 2016 at 23:33
  • \$\begingroup\$ @while1, I'd still like to solve this stun-gun-as-igniter problem, but meanwhile, I've moved to a resistive-heater-based Silicon Nitride igniter, from Sparkfun, and it works very well (link: sparkfun.com/products/11694). For regular situations with no airflow or active cooling over this 12V igniter, give it 12V, but if you have airflow or incidental (not intentional) active cooling over the igniter, give it 16V. Note that this igniter has a temperature-varying resistance. At 12V it initially pulls like 5+A, but then quickly drops down to ~1.8A after a few seconds. \$\endgroup\$ May 14, 2016 at 15:34

1 Answer 1

2
\$\begingroup\$

You need to add metal shielding to the electronics and use shielded cables grounded to only one grounding point. Also, add 1uf and .o1uf decoupling caps to Arduino Vcc.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.