1
\$\begingroup\$

I am working on an art project using some modified bug zapper circuitry to produce loud and bright sparks. I have the circuit working and the sparks are very impressive, but I'm running into a issue where the EMI created by the spark gap will occasionally crash the microcontroller I'm using to control the project, necessitating a reboot.

In order to get around this issue, my plan is to mount the microcontroller inside a grounded metal chassis (creating a protective faraday cage), and have both circuits be electrically isolated from one another via an opto-isolator circuit using a chip like the OP817:

enter image description here

I am wondering whether it is better in this case to have the opto-isolator live inside the chassis with the microcontroller (which would run wires that have an electrical connection to the zapper circuit inside the protective chassis), or on the board with the zapper circuitry (which would run wires connected to the microcontroller outside the protective chassis, though I could potentially use grounded / shielded wire). I could see advantages and disadvantages for both, and could also see it potentially not mattering.

Which option is better for this application (if either is truly better), and what considerations are at play here?

\$\endgroup\$
1
  • \$\begingroup\$ Having had this same problem before, the culprit was the reset line into the micro. Have you considered beefing up the reset line, perhaps some shunt capacitance to eat the stray voltage and a lower value pullup resistor? The reset line is an easy victim for stray voltage because it's usually high impedance, like 10k-100k pullup resistor. Adding 1uF and a 1k resistor in the appropriate places could do wonders for emi immunity. \$\endgroup\$
    – scorpdaddy
    Aug 19, 2021 at 21:37

3 Answers 3

2
\$\begingroup\$

Put the optoisolator in the HV zapper end. This reduces its loop area and thus its radiated signal.

For further protection, apply a ferrite filter to the leads that go to the microcontroller. Again, place the filter at the HV end.

You have another option to consider that could work even better: use a TOSLink (digital audio) fiber cable and a sender-receiver pair. Then there’s complete isolation between the two boxes. You can get TOSLink modules from the usual suppliers, or you could salvage them from some junked A/V gear. Fiber cables are a common A/V item; Best Buy, Monoprice, etc will have them.

\$\endgroup\$
6
  • \$\begingroup\$ That is a good suggestion, but Toslink receivers meant for digital audio usually don't work at frequencies below 100kHz, although you can find ones that are not meant for digital audio and can work down to DC. So using them for slow things like on/off control or UART comms or anything where DC is important may not work. \$\endgroup\$
    – Justme
    Aug 19, 2021 at 15:46
  • \$\begingroup\$ The standard Toshiba modules work down to DC. \$\endgroup\$ Aug 19, 2021 at 16:08
  • \$\begingroup\$ Specific parts: TORX1355 (receiver): DC to 10Mbit/s; TOTX1350 (transmitter): DC to 10Mbit/s. These are literally bona fide TOSLink devices. Look also for "JIS F05" module. \$\endgroup\$ Aug 19, 2021 at 17:03
  • \$\begingroup\$ Indeed it seems Toshiba web pages say that all receiver devices meant for digital audio do go down to DC these days. The higher performing devices still don't. But back in the day, they did not, such as TORX177, and neither did receivers from other manufacturers. I just mentioned this because it is worth checking if a component does go down to DC or not, if you find some cheap receiver. \$\endgroup\$
    – Justme
    Aug 19, 2021 at 17:28
  • \$\begingroup\$ @hacktastical thanks, I was trying with an EAPLRAA4 and was getting some weird behavior at the lower frequencies. Will check out these parts. \$\endgroup\$ Aug 19, 2021 at 23:23
2
\$\begingroup\$

I like the fiber optics idea that bobflux suggested and the ferrite filter that hacktastical suggested.
If the fiber doesnt work for your use case, try this: Use some small ceramic capacitors (0.1 uF or 0.01uF) at the following places:

  1. At the output of the sender, just inside your faraday cage.
  2. At the power supply in the sending circuit.
  3. As close to the power pins of the uController as possible. (0.01 uF)
\$\endgroup\$
1
\$\begingroup\$

Grounded boxes only protect what's inside if there are no holes allowing cables to get in. Since there are usually cables that go through the shield, the cables have to be shielded, and the shields connected to the enclosure at the point of entry. If you want an example look at the connector panel at the back of a desktop PC, there is a metal plate that grounds all connectors and all cable shields there. This allows any common mode current carried by the cable shields to go through the metal plate, and not through the PCB where they would make a mess.

If your micro is something like an arduino, without a ground plane, then any current going through the internal ground traces will create a voltage across these traces, which means "ground" is no longer "0V" depending on where you look at it, and that can upset your micro quite a bit.

To avoid current flowing in the ground traces of your micro board, the first thing would be to eliminate ground loops. Then, I assume the zapper's ground is connected to the micro's ground so it can be controlled. Make sure this connection is at the micro's power supply, USB adapter, whatever, and not on the micro's board.

Likewise if the micro has other stuff connected to it through wires, all these wires are antennas, so your problem might not go away if you isolate it from the zapper. You'd need to post a picture of the setup.

If you attach the cable to the micro and put the opto in the zapper device, then the wire will act like receiving antenna. If you do it the other way around with the opto near the micro, then the cable to the zapper will act as transmitting antenna, but it should work better.

If you don't want EMI headaches, fiber optics allows complete isolation. It doesn't have to be expensive: get a bit of plastic optical fiber, a transmitter and a receiver. If you don't like paying shipping for those components, just get a phototransistor and a LED of compatible wavelengths, drill a hole in the top of both right in front of the chip, and stick the plastic fiber in there with some transparent glue. Now you have an optocoupler with pretty good isolation and no cables.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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