How to stop EMI generated by a 230V switch ?

Thread Starter


Joined Jan 11, 2023
Hi !
I am building a 12V UPS and I have a problem...
On the front panel I have the main power switch (at 230Vac). It is the one from the low-left, with 2 thick blue wires. Those wires are in series with the main SMPS (that module from the middle of the case, with yellow label). But they pass close to the control board, where I have low DC voltages and a Pico microcontroler. The problem is that sometimes when I flip that switch, the control board goes crazy. It resets or turn off the microcontroler. Do you think that these problems can occur because of the parasitic spikes generated by the switched high voltage or something like that ? Can I do someting to stop them ? Should I shield the 230V cables ? If yes, where should I tie the shield, at earth or at circuit gnd ? Would it help if I place some sbubbers on the switch ? I don't even know what the problem is, but I suspect it's from the switch.
And one more thing. Could I simulate the parasitic behavior in LTSpice ? What would be the key elements in the presented context ?
Thanks !



Joined Oct 28, 2019
Yes to all of your questions
Welcome to the world of real electronics
And it can be a whle lot of other things as well
You are on the right track.
Start with your first theory and then rearrange or space wiring or shield it. I'd try one solution at a time.
If that does not fix the problem, try another theory and again try a few tests
Sometimes you get lucky and your design works striaght off. Other times the gremlins come out and unfortunately its a hard slog to figure out a) the cause and b) a solution.
You could try switching it on and off either by plugging it into the mains while unit is turned on or through an external power strip switch. That may help in locating the offending part since you would be using external switching. Any arcing would be away from the box instead of inside it. That "may" help.


Joined Mar 14, 2008
Tightly twist the 220V wires.
That will reduce any radiation from them.
If that's not sufficient, then use shielded twisted-pair wires and connect the shield to chassis gnd.


Joined Sep 17, 2013
Just a hunch, "back in the day" when you looked at any of the old line power assemblies you used to see somewhere on the panel there was some metal tub with 5 or 6 terminals called the "EMI/RFI line filter" which was usually specified in order to make the assembly pass testing for the electronics in the unit not emitting excessive (by law) amounts of electromagnetic radiation; conversely it also tended to do a pretty good job stopping external or "quasi-external" (your switch) sources from interfering with YOUR electronics. They're still required in many commercial applications so they're readily available for a decent price, exactly how they work and what the specifications ought to be for your requirement would require several more paragraphs of exposition and it would really be better if you learned a bit more by doing some of the research yourself, besides you might be required to specify one someday if some electronics you designed has its own emissions problem...

Thread Starter


Joined Jan 11, 2023
If that's not sufficient, then use shielded twisted-pair wires and connect the shield to chassis gnd.
My chassis is connected to the Earth not to the power supply negative rail (GND). What should I do in this case ?

The fact is that I cannot reproduce the problem anymore. I flipped the switch on and off and nothing happens.


Joined Jan 23, 2018
I suggest routing the wires that carry the AC power at least an inch away from the wires that are connected to the control board. So moving the other blue wires away from the AC wires is also a good choice.
A problem is often that signals can radiate between parallel wires, and so more distance is the simple solution. At least that is what has worked for me with industrial equipment. "Separated and not parallel" wire paths are the way to go.