So basically my problem is that
when I attach 2m of wire to the input of my SMPS then I can see heavy ringing at the output.
My SMPS is a half bride + non-isolated buck converter powered by Power Integrations' LNK3205 chip. I've
raised the problem on PI's forum but to be fair I doubt the problem is with their chip but rather with my design. I've built the PSU again according to their reference design
RDR-506 which is 12V output instead of mine 5V but I can still see the problem. Here's schematics and PCB layout

Attachment "
IS, RDR-506.png" shows scope measurement at the time when I engage the switch on the wire. You can see that the supposed 12V output rings with 4V min and c.a. 20V max. Just because I've attached 2m of wire to the input with a mechanical switch

So I decided to decompose further...
I started at the very beginning and I've checked what happens when I turn the switch just on the input wires without SMPS involved. See the "
IS.png" for schematic and scope printout. Surprisingly it caused the low freq ringing on the input which I could see with full SMPS too. I've consulted my friend who has much more exp with analog electronics (i.e. has any experience) and he has suggested that this 2m of wire has some capacitance and my Isolation Transformer has a lot of inductance so attaching a capacitance may cause a current spike which in turn causes voltage spike on the IT. Indeed measuring the same with direct mains input shows no low-freq ringing. Adding a 22nF cap at the transformer's output eliminated that particular problem. See "
MAINS.png" and "
IS+22nF-direct.png" attachments. Please not that even though the low-freq ringing is eliminated there's still c.a. 70MHz ringing left...
In next step I decided to measure the input bridge and input filter of the SMPS. So I've de-soldered the LNK3205 chip leaving the input capacitors floating. See schematics and measurements in "
IS+22nF, RCLC.png" attachment. I've also built another PCB with the input filter based on MLCC instead of aluminium caps but the result was pretty much the same (see "
IS+22nF, RCLC(3x150nF).png"). Note that in both cases you can still see c.a. 70MHz ringing at the output if input caps...
And now I'm stuck. How do I solve it? What else I can try? Any ideas? Any clues?PI's support on their forum suggested I add RC snubber across the flywheel diode. I tried but it didn't at all. Just made the SMPS to run much hotter. See measurement, schematics and PCB in "
IS, RDR-506+snubber.png" attachment.
A bit of context...
I'm a hobbyist and I'm designing a home automation device. It consists of a non-isolated SMPS, a microcontroller, a 2.4GHz radio, two 230V relays and energy measurement module. All this on 31x27.3mm PCB. A really nice design I was thinking but the problem is it doesn't work

Here's my story...
So it turned out that in c.a. every third case when I switch the relay on the microcontroller resets. Moreover it resets only if I had anything attached to the relay. So if the relay was left with no load connected there was no resets. It was enough to attach c.a. 2m of wire (pair) with nothing connected on the other end, essentially a 2 metters of copper and it was enough to cause resets. No load on the relay required. Crazy stuff I was thinking. The relay was actually connecting this 2m wire to the mains "live" wire... So I started to decompose my design and found that:
- powering the microcontroller with a wall cube PSU instead of built in SMPS eliminates the problem
- measurements show that when relay contacts engage the 5V output of the SMPS rings heavily and the same 3.3V output of LDO that is fed by the SMPS 5V.
That indicated that my SMPS design is a problem. I managed to isolate the problem to the point where I have a separate PCB with just the SMPS on it and the 2m wire attached to the input of this PCB with the in-line switch on the wire and no load at its end. When I turn the switch on I can see lots of noise on the output.