Saturday, 18 April 2026

Using AI to combat RFI in a power supply

Followers of my rantings will have seen this post where I talk about the issues I am having with a cheap switch mode power supply unit (SMPSU) and its interference with my radio reception.

Just for grins I thought I'd try asking Claude.AI for advice on mitigating this RFI. What it told me went against everything I had been taught about combating RFI in the radio shack.

Let's start with some pictures. The first picture is of my Afedri SDRNet Software Defined Radio tuned to the low end of the Medium Wave (AM) broadcast band. I am using GQRX as the front end. You can see quite a number of very aggressive signals that are not desired.

If you look at the waterfall above (the blue/yellow bit) one can clearly see very strong individual single carriers that in some cases are louder than my local radio stations at over -35dB.

How do I know that this particular SMPSU is responsible for this RFI? When I unplug it this happens ...

What a difference!!! No change in my noise floor was observed. It normally sits around -95dB. I live in a significantly urban area and so my neighborhood is filled with other peoples electronics devices which add to the noise floor. 

So how do I fix this? Conventional wisdom dictates that I build a filter and apply it to the output of the supply before it connects to my radio equipment. In this case however, my SDR is not powered by the switch mode power supply. So where is the noise coming from? Again, conventional wisdom tells us that the interference is radiating along the wires connected to the output side of the SMPSU and then being picked up by the antenna on the SDR. This appears to be correct as disconnecting the antenna from the radio produces no RFI issues. Adding an AM band stop filter significantly reduces the RFI and its related harmonics (iterations of the interfering signals that flood the radio all the way up to its maximum range).

Note how the noise floor has dropped 25dB and so have the FRI signals too. Clearly they are being received by the radio over its antenna. Lets remove the filter and perform one final test. Lets disconnect the wires from the output side of the SMPSU.

Yes, removing the wires from the output side of the SMPSU also removed the RFI. Removing the filter also increased the noise floor by 25dB. So we can surmise that conventional wisdom is correct in that the RFI is indeed leaking out of the SMPSU via its output wires.

So to recap our findings; 

  • The Switch Mode Power Supply Unit (SMPSU) is creating RFI
  • RFI is being radiated on the wires connected to the SMPSU output
  • The band stop filter is not sufficient to combat this RFI

So lets ask Claude. I asked the question "How might I mitigate the RFI being emitted from an cheap switch mode PSU?". After a second or so of thought Claude responded

Great practical question! Here are the main mitigation strategies, roughly in order of effectiveness and ease of implementation:

1. Input EMI Filter (Most Important)

As discussed, this is your first line of defense. You can:

  • Buy a pre-made IEC inlet filter module — these are cheap (a few dollars) and combine X/Y capacitors and a common-mode choke in one package. Simply wire it between the mains and the PSU input.
  • Look for ones rated at the PSU's current draw with attenuation specs in dB across the frequency range you care about.

2. Common-Mode Choke on the Input

If you want to go further, add a toroidal common-mode choke wound on a high-permeability ferrite core (Fair-Rite, Wurth, TDK all make suitable cores). Wind both the live and neutral together through the same core — this attenuates common-mode noise without affecting the 50/60Hz supply current.

3. Ferrite Clamp-On Cores

The quick and dirty approach — snap ferrite clamp-on chokes onto the input cable as close to the PSU as possible. Multiple cores stacked together increase attenuation. These are the things you see as lumps on laptop power cables. They won't fix a really bad PSU but can take the edge off.

4. Shielding the PSU

  • House the PSU in a grounded metal enclosure if it isn't already — this addresses radiated RFI rather than conducted.
  • Ensure the shield has a solid, low-impedance connection to earth ground.
  • Any gaps or apertures in the enclosure should be smaller than λ/20 of the highest frequency you're concerned about.

5. Output Side Filtering

While less effective for RFI back into the mains, adding filtering on the DC output helps protect sensitive downstream circuits:

  • A pi filter (capacitor → inductor → capacitor) on the DC output rail
  • Keep the inductor value modest (a few µH) to avoid instability with the PSU's feedback loop
  • Use low-ESR capacitors

6. Proper Grounding and Cable Routing

  • Keep input and output cables physically separated — they can couple noise back if run together
  • Use shielded cable on the output if running to sensitive equipment
  • Ensure a solid single-point earth ground

7. Replace the PSU

Honestly, with very cheap PSUs, the economics sometimes favor just buying a better unit. PSUs from reputable manufacturers (Mean Well, for example) are already designed with proper EMI filtering built in and have passed regulatory testing. A Mean Well unit costs only slightly more than a no-name unit plus the remediation parts.


Practical Approach

If this is a specific interference problem you're troubleshooting, a good workflow is:

  1. Start with a clamp-on ferrite on the input cable — costs almost nothing and takes 30 seconds
  2. If insufficient, add a pre-made IEC EMI filter module
  3. If still problematic, add a metal enclosure with proper grounding
  4. If you're still fighting it, the PSU is probably beyond economical remediation — replace it
It appears Claude thinks the issues are on the INPUT side of the SMPSU. This goes against conventional thinking. The mitigation was broken down into 4 manageable steps. Lets try them.

1) "Start with a clamp-on ferrite on the input cable". You've seen these a everywhere. You probably have some knocking about in your junk box. I have a large stash of these collected over the years from other projects or junk sales. I'll install 1 on the input side power cable and if it works we should see some drop in the level of the interference which is currently over -35dB.


As seen on the left I added a single clamp-on ferrite. It did actually do something. We've gone down from -35dB to about -53dB (see above). Lets round it up and call it -55dB. That's actually a significant improvement. 20dB is around a quarter of the original signal. However, its still too much by a long way. I tried adding more clamp-on ferrite's but it seemed to make no difference.

While doing this I also noted that when the output cables are connected but yet the powered devices are not yet turned on there is no RFI. Only when the powered devices draw current does the RFI appear. This sent me down a short rabbit hole to see if it was in fact one of the many devices (mostly Raspberry Pi's based SDR's) powered by this SMPSU.

So on to step 2, "Add a pre-made IEC EMI filter module". I found this device on Amazon which was promptly ordered. As the SMPSU does not have an IEC plug I bought one with pigtails. Lets get it installed.


No discernible difference. Arguably things got worse by 10dB. One of the important things to note with the EMI filter is that while it has 3 incoming conductors it has only 2 outgoing conductors. The ground is not presented for connection to the SMPSU. Lets try "yoking" the ground and connecting it back onto the SMPSU.


Maybe one or two dB's of improvement with the earth attached but its hard to tell. Certainly not the improvement I was looking for. 

Step 3 says to mount it inside a metal enclosure. The SMPSU already has a metal enclosure. I opened it up to check it was grounded and it is. 

So that leaves Step 4: "the PSU is probably beyond economical remediation - replace it". Hmm. Does Claude have shares in a PSU factory? This is not a possibility for me due to financial constraints.

So has Claude failed to mitigate my RFI issue? Why did it not offer me some output/DC side solutions? For now I'll chalk this up as an AI fail.