# This Home‑Built EMI Mapper Exposed Everything! Visualize EMI Hotspots

## Метаданные

- **Канал:** element14 presents
- **YouTube:** https://www.youtube.com/watch?v=Vh7laroqxZ0
- **Дата:** 14.05.2026
- **Длительность:** 30:07
- **Просмотры:** 2,542
- **Источник:** https://ekstraktznaniy.ru/video/51803

## Описание

In this element14 presents episode, Clem builds an automated CNC style EMI heatmapping scanner to remove guesswork from near field probing during pre compliance testing. Using an Arduino Uno with GRBL, professional near field probes, and a low cost RTL SDR, the system scans a PCB in a controlled grid and turns raw measurements into clear EMI heatmaps. Along the way, Clem highlights real engineering challenges, including firmware choices, SDR software limitations, and the critical importance of lowering the noise floor through proper shielding, showing how automation and good measurement practice work together, and you can find the supporting files on the element14 Community: https://bit.ly/4d5TYty

#emidebugging #emctesting #hardwareengineering 

[04:01]-Buy it or build it?
[05:09]-The Theory
[09:59]-The Code
[16:47]-Cut the Noise
[24:53]-Making some measurements

=================================================================================

Engage with the element14 presents team 

## Транскрипт

### <Untitled Chapter 1> []

Welcome back to Element 14 Presents. I'm Clem and this is a picture of an Arduino. You don't recognize it? Maybe this one is clearer. This is a picture of an Arduino, but not like with a camera not in visible light. This is what it radiates. And I did it with this machine here. I used it to scan this Arduino Mega and — in the right spectrum it looks like this and you can actually see the different parts of the device and in which frequency they actually radiate. I made this thing myself and I show you how I did it and why it will be very important to you. Yes, you at home. This is the microcontroller board I designed in my latest KiCad tutorial. If I now would want to sell this, I can't just can't make a few of these and put it on the market. That would be illegal. I have to make sure that this device is safe and that it follows the rules. And the rules for electronic devices, there are a lot of them, but the most important ones that everyone will talk about is electromagnetic compatibility, EMC. So, how do we all know that this will follow the rules? Well, there are laboratory tests. These are expensive and before I want to go to the actual lab for the testing, I would rather know if this device will pass or not. Before I spend any of the big ticket money, I will gladly do a pre-compliance test to be sure that this will already pass. Once I got that, I will get a result where it says, "Oh, in this specific frequency, there is a problem. I need to fix that. " So, how would I know where that frequency originates? What to fix? What is wrong with my product? How would I know that? That's where this thing comes in. During the development of any product, engineers usually use their own lab equipment to test the devices and see if they can locate the error. And one of the methods they use when they have identified frequencies where the product did not pass the standards, they use near field probes. This is one that I took out of a near field probe set by Multicom Pro. Uh there's a cable with it. I connect this to a spectrum analyzer, and then I probe the board by basically going over it and looking at spectrum analyzer and see which frequencies I can see while this is running. And if those match the frequency that I've seen uh where the problem lies, then I can make an educated guess where on the board that frequency originated from. And so then I would know, oh, it's the switch mode power supply, which it quite often is. But which of these chips on the in the switch mode power supply is the issue? Uh and is it truly that one or did I hold the probe wrong? Or This all takes experience, and it's not as easy to do as one might think. If you vary the probe orientation a bit, your results also may vary. — So I want to make this pro process a lot more controllable, repeatable, and less dependent on actual expert usage to find the culprit. More like put this in, run a standardized test, like standardization is a good thing, — and then I know where's the problem on the board, and then I can look into how to fix that specific part. And with me just doing that manually, I can always look at one frequency at a time or focus on that one. But if I could automate that process, I could scan for many frequencies at once and be faster and cheaper and like overall would be a better process, in my

### Buy it or build it? [4:01]

opinion. I'm not the first guy that came to this idea, so this is not my original idea. Here is a GitHub repo where that was already implemented many years ago. Culprit is I tried to get this to work. Um it's dependent on some software that since had updates, so it doesn't work as expected anymore, at least not in my setup. Tried to get this to run, I had to start over from scratch, but kudos to the creators. This is an awesome idea. Oh, and they used not a very expensive uh spectrum analyzer for that. They found out that an RTL-SDR, which is basically a hacked DVB-T stick, is good enough to make comparative uh analysis of the of a DUT, a device under test. So, I'm going to try an RTL-SDR as well, and maybe in a later iteration when I need like precision and repeatability a bit more, then maybe uh then switch to the uh more professional spectrum analyzer. But, this seems to be good enough, at least for proof of concept.

### The Theory [5:09]

concept. — Okay, now how we do that consistently? Well, in theory it works like this. Here's a laptop on top that will run the actual analysis software. Here's a safety switch because this is a machine, this has to follow some safety standards. And here's the door where I put your DUT in. All the stuff that makes this thing tick is up here, inside, and basically this was built from project leftovers, an old 3D printer, uh a used laptop, and a lot of Python code. In a full measurement scenario, this would be completely closed off, but of course for you I left it open so you can actually see what's going on inside. — In here, we have a camera up here, but the whole scanning approach is not vision based. This is just to take a photo of the DUT, so you know which one is the thing you scanned and put that in with the files for the scan in the same folder, so you know how everything looked like. We have This is a 3D printer frame and we have our uh sensing probe over here. This will basically only move in uh X and Y directions uh and the Z setting that is manually done because you set that once, run your scans, and you don't have to adapt that continuously like with a 3D printer. X and Y is enough. And over here, uh in the belly of the machine basically, there's the RTL-SDR, which is connected to the probe. This is basically just a DVB-T stick or an RF receiver that will then communicate with the laptop up top. And over there at the back, that's an Arduino Uno, an old one, running Gerbil 1. 1 and the CNC shield plus two motor drivers. I use TMC2209s in this case. Or 2210s. No, these are 2210s because I just had them. As I said, the project is mainly built from leftovers. Why do I use Gerbil and not Marlin or Clipper or whatever you at home would like to see me use because this makes sense because not always the brightest shining uh newest iteration of whatever 3D printer run to the to these in these days is the best for an application. It's the one that actually has the right features for a job. And in this case, what I need is not homing and then executing a job. What I need is total control during the process like a CNC where I can start and stop and resume during the process at any point where I can have workpiece offset coordinates set directly via USB by just — relaying messages. So, what the laptop runs is actually a full-fledged G-code sender that I had to code. And the device does exactly as it's told. And it can do like pretty much it does the same work as a CNC machine but really targeted to this application. And with the fancy features of the 3D printer, 90% of that would be unused and would only make problems because it always expects stuff like homing and the same offsets and specific orders of axis homing. This is a lot freer. And if you would build stuff like this completely from scratch, you would know that. So, build stuff and get that into your head and into your fingers because experience is something that enables you to build cool stuff. And I want you at home to build cool stuff. On the other side of the device, we have a USB port that connects to the laptop. This basically has a hub on the inside and that means we only have one connection to the computer for all the stuff for the camera, for the RTL-SDR, for the Arduino. — And this port below here is the DUT port because some devices that we want to test, we always have to test them in operation. They will basically expect commands or a laptop attached to them or whatever. And if they want an USB connection or maybe they are powered over USB, then we can just plug that in here. There's also another power connection for whatever voltage we going to push through here. But be aware, if you power your devices by these ports, for accurate measurement, you would need a bit more on the outside. A suitable power supply and a listen, a line impedance stabilization network. Otherwise, all the garbage that the power supply picks up out here will just be relayed in and we maybe just measure whatever the power supply spews out and not what the actual device under test is

### The Code [9:59]

doing. Without code, nothing works. That's why we are in the code void again. Okay, so this was code-wise a quite big project for me. I used Python mainly to do it. The Arduino around standard Gerbil 1. 1, but I had to alter the config file to remove the Z axis. — Otherwise, it would always expect basically Z to home first and whatever. I got rid of homing altogether because jogging to the actual position where you want to start your scan, then the end position, and then it establishes itself where the scan will happen and executing that with a coordinated work offset was a much better approach. This way, I don't have to scan the whole bed every time. I only scan where I want the data from, which means I can scan parts of a board, overall boards, general areas, in it doesn't matter. It is always a rectangle, but I can control that size with every DUT, however I want, and the device does not have to home in between. So, if it ever loses home position, it doesn't matter. I just continue from where I am. So, how does that work? First, uh I have a general script that basically has the workflow. — Under that script, there are multiple other Python files that have specific functions in them. I use them like I use libraries, like modules in Python. I just import them as if they were libraries I installed with pip, but I wrote them myself. Uh I also used quite a bit of assistance by AI assistance to do the tedious part of the coding. Turns out, especially with like RTL-SDR and stuff, it doesn't use the libraries. Like it the AIs are not trained on the current way these work. So, be aware that there might be some issues and you have to do uh quite a lot of changes. I have to say I did this four or five times until I figured out the right process, and I had to do more uh more correction work than uh maybe than I if I would have just coded it completely from scratch. I don't know. But, the modular approach gave me the opportunity to A reuse all these modules in the future, but also that I can make uh changes easier without messing up the rest of the code. So, what we have here are modules to locate the device. We have modules to scan another one for taking a photo. And uh then there's the overall script that uh that does the workflow. So, how it works is we put in we start the script. We put in our DUT. We wire it up. We can power it. Then we jog to the first position. This is the lower left corner of the device or area I want to scan. We enter that. Uh by pressing enter I can show on the screen where my device currently or my probe currently resides. If I press Q, that sets the uh current location. Then I move to the upper right corner, do the same thing. Then it automatically returns to the first position and the area in between has been saved and there has been a rectangle calculated with a zigzag path throughout it and that has been saved as a G-code file. Now it gets interesting. The G-code file then has to be sent to the device, of course, but we are not sending it one by one just like a normal G-code parser. No, we parse it. But we send the device to the first position, then we do the measurements, and then we move to the next position. So, which measurements do we do? The user can enter as many frequencies as they want and we do all these measurements one after the other and then move to the next position. So, instead of going through the whole process over and over again for each frequency, we just move to position, measure all the frequencies, save these all in their own respective tables per frequency, and then we move on and that follows through all the G-code until we have scanned the whole board. So, at this point, I can now optionally move away my near-field probe by jogging again and take a photo of the DUT so you have situation how it was measured with the power supply attached, with any load attached, for example, because for some of these scans, of course, if we have like something like a step-up converter, we have to provide a load, otherwise it wouldn't uh be measuring it in under actual working conditions and this is what we're interested in, how it would perform in a real-world scenario. At this point, I had a lot of trouble like first figuring out how to get the device correctly to the original position and that it would actually scan the exact right part that I jogged it before. That was already complicated, but now I've basically ran into a wall because I wanted to line up my scan image that I would then generate from the data that I gathered with the actual DUT photo. I couldn't figure that out, and that is completely up to my little knowledge about image processing in Python. If you are an image processing guru, this will be absolutely no uh difficult task for you. I couldn't figure it out so far. So, I moved the image processing to also its own module. So, once the scan is done, what you get are text files. These text files contain the coordinates where they were scanned and the DBM value, so the power of radiation that the RTL-SDR received at that point per frequency. So, there's one file per frequency. Then I made a script that allows me to take these uh text files and convert them to images. And with these images, it's a lot easier for a human to analyze them, but we also have the text files, so we're open to machine interpretation of that. So, we could then train an AI on interpreting these data points, but we could also just normally analyze them with math.

### Cut the Noise [16:47]

Now we have a bunch of colorful images per frequency. This allows us to look deep into the devices and find out where exactly specific frequencies come from, but we have to first address the elephant or the missing elephant in the room. The panels are missing because we wanted to look inside. These have a purpose. They are meant for shielding. Um but just putting uh metal panels on the outside is not enough to actually have a good effect on this. We have to reduce the noise floor. What is the noise floor? Let me explain. Whenever you are measuring something, doesn't matter what it is, there's always a noise to signal ratio. The higher the noise, the less reliable interpretational is the signal. And there is a certain point — where the noise doesn't get any lower. There's the noise floor. That's the noise that's always present. — And in uh EMI, that's electromagnetic waves that are all around us. The lights are electro- electromagnetic waves. — Pretty much any sort of temperature increase can be an electromagnetic wave. Heat is an electromagnetic wave. — Uh RF signals, your cell phone, radio stations, they are all the noise that we don't want to measure. We only want to measure what is emitted by the actual device under test. So, that noise floor covers up a lot of things you may be able to get a glimpse if you look very closely on what's going on, but you don't get the real picture. You have to lower that noise floor to make sure that you can actually see what's going on. And if you can't do that, then you basically will always measure just a guess. But we want to have more accurate results. So, what we have to do is lower that noise floor by attenuation. Shielding is a part of that, but there's a difference. I'm pretty sure in school you heard about the Faraday cage, and somehow all the people get the idea that if you build a Faraday cage, nothing gets in, nothing gets out in terms of electromagnetic waves, and all the charges always only on the outside. That's not how it works, actually. If it would work like that, I would just build a metal box and then nothing could get out of or in. But the reality is a bit more complicated. High frequency waveforms, they can move through stuff even though it's a shielded box. Uh low frequency uh signals that have uh enough power would also permeate that. What we actually have to do is attenuate the signal, so we dampen it. And we can do that with a metal box, but only if we make sure that it is actual full connected and not just like this with paint on a on a conductive sheet and anodization on these aluminum pieces. If I just mount that here, there will no be no correct uh connection between these parts. And to make this box work and actually lower the noise floor, we have to make sure that A, there are no gaps, and that all these pieces are fully conductive connected with a very low impedance path. That's what we want. Impedance is complicated, but just think of it as resistance, but for high frequencies and for uh changing frequ- changing voltages, not for DC, for AC. And all the RF signals are basically AC in waves in the air. Of course, the mounting is the most important that actually there's a contact between the conductive bits to each other. Uh also something uh very obvious is we can put cables from one part to another and screw them uh tightly in, so there is a good contact and a direct uh low impedance path between them. So, that's the way you do grounding as well. But also all the gaps and seams. These can be covered with conductive tape. This is copper tape, by the way. The floor underneath my feet is an ESD floor and there are squares made out of copper tape, out of this very copper tape, to be exact, under it. So, there is always a low impedance path from dissipating electrostatic uh charges down directly to ground, to the earth connection, uh the same as the electrical system in here. There's also aluminum tape. This also works great for shielding purposes, but for all the special bits in here, there are specialty EMI gaskets. So, these are specific parts made to close the gaps. Let me show you how these work. I got them from TE Connectivity. Got a whole set because I don't know which ones I will need for this in the end. So, I've got enough stuff here to show you. To demonstrate, this is a project box by Multicomp. I used the very same one for my calculator project, and they fit perfectly together, but there will always be a little seam here. So, they are not perfectly watertight and they are also not perfectly EMI-tight. What's missing here is a seal. The box comes with this rubber seal. You just put it into uh this little notch on the lid, and then it perfectly seals for water. But for EMI, this rubber doesn't do anything. So, TE Connectivity makes this here, which looks exactly the same, but it isn't. This is conductive rubber, basically. I've got the same size on as the original box. I move that also in the same groove, and if I close that up, it will be watertight, but it will also be EMI-tight. That's great. So, this is pretty much acting like a perfect Faraday cage, uh if Faraday cages would work perfectly, and they don't. Uh but, a completely sealed box is of no use to me. If this was completely sealed, I would get nothing in and out, but I need uh wires to pass through. So, how do you do that? To perfectly tie in these connectors or these pass-throughs into my Faraday cage attenuation setup, I need to perfectly connect them uh or their shielding components to the case. And you do that with EMI gaskets, because just uh screwing them in tightly might not be enough. There is still a gap somewhere. Depending on how they are built, that gap can be quite substantial. So, — there are purpose-built EMI gaskets. Also, I got these from TE Connectivity, and they're made in thousands of shapes and sizes. And by coincidence, where is it? — It's over here. This, for example, is an example. It's a sub-D connector, and it's perfectly fitting EMI gasket. This would now get screwed in, and this little squishy bit here is conductive, and that will perfectly tie the casing of my connector to the overall case. And in return, also seal it completely off to the outside world. Fun fact, I just searched for this on the floor for 15 minutes or so. Thought I lost it, and I only had one that fit, because the other ones were for bigger connectors that I don't have. I should order more than one to demonstrate that to you to — keep my sanity. But yeah, these are the professional way to tie in your connectors into your case.

### Making some measurements [24:53]

Now that the noise floor is low enough, we can actually make some measurements. — So, the results of a step-up converter and a LiPo charger I used. These are just some boards that I got online uh because they have a reputation of bad EMI performance. So, they are perfect for our use case to show uh where that EMI is coming from. So, they are both of course uh run under load. So, I use a resistor uh to load them and also I just connect the device to charge. And by running the scan at various frequencies, I basically just guessed frequencies. And let's see how they perform. And by flipping through the different images, we can see where the EMI is actually coming from and at which frequencies. And it's quite obvious that we can identify the specific components where they're coming from. So, if we compare the actual uh device and the EMI scan, we can see whoop, it's the inductor in the case of the uh the step-up converter. And the step-up, I see where the EMI originates in a frequency. And if we then — move on to higher frequencies, we can see how these radiation patterns distribute to the diode and more towards the output. So, you can see at different frequencies, they actually have different origins. And if we now uh compare the results from the pre-compliance test, we can then locate where the problematic bit is coming from. And if we change something about that board, rescan, then we can see if it did something in that frequency. So, this device now helps us to decide on hardware changes before we would waste a lot of money on retesting and retesting. We can do the changes, verify that they actually did something in the desired frequency, and only after we have confirmed that, then we get to the expensive test lab. Turns out, as expected, the step-up converter is very noisy. — Um I can't tell if it's above limit lines because this is not a pre-compliance setup. This is just a local a localizing frequencies. Um so, I can't make a verdict on that yet. Um but on the charging IC that had not the best reputation, um but this is actually a lot more quiet in relay in regards to uh EMI than I expected. Uh one interesting bit is if you uh compare uh for example, the uh step-up board in a scenario where it is fed 5 V and it should step up to 5 V, so there's not much load on it. Then, it behaves electromagnetically differently than compared to when I just feed it 3. 1 V at the depleted battery, for example. And there is an obvious change in the EMI pattern. So, you can see how a device reacts with a different load, and you can get more insights on its actual performance under different scenarios. So, if you then — measure it across its whole usage range, you get a much better idea on where the problematic bits are. And why does that matter to you? Because you are also a consumer. You may construct pieces, and you may want to sell things one day, and you have to apply these regulations, and be sure that uh — the things work as expected. But also, you as the consumer have to be able to rely on that all the things that you buy are safe, and that they don't disturb other devices. You don't want that cheap, uh, cheap board you bought somewhere messing up your phone. You don't want that to kill your computer. You want all the stuff that you buy and paid good money for to work. This project was a little excursion into the world of EMC, but it's also a practical demonstration on radiation does exist and you can actually locate it on the board. And maybe this device will help get a lot of products on the market in a more reliable and safe way. But also, this should benefit you at home. And if you want to give a go and experiment around with that, all the files are on the element 14 community. This is published under the OCL community license, which means you can just build one yourself if you want to explore that. Um, it's a rather complicated project. I wouldn't recommend that to beginners, but it might be really interesting for you if you plan to go more into professional engineering. Connect with me and all the other hosts on the element 14 community, and I got to go. There's another project waiting for me.
