Eliminate mains common mode ripple from external power supply with poor isolation
They have this capacitor to make sure the low voltage and high voltage part are somewhat related to each other, even when no earth is present.

High frequency transients on either side could otherwise (slowly or quickly) induce a voltage across the transformer barrier of many kVs, which would potentially cause breakdowns of said barrier, which would be bad to a scale that's not even close to the scale of the graph on which your problem registers.

So... do not remove it.



What you can (try to) do in the device is just what a good filter would do: Keep everything above a few Herz out and conduct it away.

How you do that, exactly, depends on the application and what is tolerable. Officially you are not supposed to conduct incoming crap to an ungrounded metal case, on account of "tingly feelings". If you could ground the metal case externally, that would be the ideal solution where you don't really need to do very much else.

In either case, externally grounded or not, a filter may help:







simulate this circuit &ndash; Schematic created using CircuitLab

I am assuming your case-to-internal-negative cannot be reversed for whatever reason.