There are certain design guidelines for PCBs that don’t make a lot of sense, and practices that seem excessive and unnecessary. Often these are motivated by the black magic that is RF transmission. This is either an unfortunate and unintended consequence of electronic circuits, or a magical and useful feature of them, and a lot of design time goes into reducing or removing these effects or tuning them.
You’re wondering how important this is for your projects and whether you should worry about unintentional radiated emissions. On the Baddeley scale of importance:
- Pffffft – You’re building a one-off project that uses battery power and a single microcontroller with a few GPIO. Basically all your Arduino projects and around-the-house fun.
- Meh – You’re building a one-off that plugs into a wall or has an intentional radio on board — a run-of-the-mill IoT thingamajig. Or you’re selling a product that is battery powered but doesn’t intentionally transmit anything.
- Yeeeaaaaahhhhhhh – You’re selling a product that is wall powered.
- YES – You’re selling a product that is an intentional transmitter, or has a lot of fast signals, or is manufactured in large volumes.
- SMH – You’re the manufacturer of a neon sign that is taking out all wireless signals within a few blocks.
When a signal moves down a wire, there is an electric field created in the space around it. If it’s a DC signal, then the field doesn’t change, so nothing exciting happens in the world of RF, it’s just all constant. Pure DC is very rare. Batteries can do it, unless you’re doing any switching voltage regulation, but anything plugged into wall power is going to have 50 or 60 Hertz sine waves, which then get rectified and transformed and smoothed and poked and prodded into something like a DC voltage. In reality (and depending on the quality of the power supply), this supply will ripple and create small changes in the DC voltage, effectively creating a small changing electric field. Other things, like crystal oscillators, signal lines between chips, and memory buses all have changing voltage signals traveling along a wire from one place to another. Thus, electronics are awash in signals and changing electric fields. It is these changing electric fields, through a lot of math, mostly figured out by Maxwell, Faraday, and Gauss, that results in the electric field becoming electromagnetic radiation.
The frequency of the radiation is the frequency with which the electric fields change, and there are lots of factors that impact that. One is the shape of the wire down which the electric field travels. If you have something called a differential pair, the electric fields going down the wire cancel each other out, resulting in almost no transmission. If you have a wire that doesn’t connect at the other end, then the signal can go down the length and reflect back. If the length of the wire is tuned so that when it reflects it amplifies the wave rather than cancelling, then you have a good antenna. Going back to the frequency, it’s never a perfect sine wave; it’s a combination of waves of different frequencies. An antenna receiver has electronics that will deconstruct those frequencies within a range to extract a signal. Modern stuff is mostly FM, so there’s a main carrier frequency, and it gets modified slightly with the data signal.
A trace antenna is an antenna made out of a small strip of copper wire on the PCB which just happens to resonate at certain frequencies. This could be intentional, like an F antenna design for 2.4 GHz transceivers, or it could be accidental, like a ground pour that results in a long thin strip. To avoid this, examine your ground pours carefully for any traces that don’t go anywhere. Either eliminate them, or put a via in so that the trace can’t resonate. Keep your ground as blobby as possible. The more fingers you have, and the more you slice and stretch and separate it, the more unintentional radiation you’ll have. As a general rule, don’t have any wires that aren’t connected at both ends unless you are intentionally creating an antenna. This can apply to board IO that isn’t connected. After all, if nothing is plugged in to that IO connector, it’s just a trace that leads to nowhere. If your microcontroller is smart enough to detect when a cable is unplugged, don’t send any signals down that wire. Tie all your unused IOs down to ground.
A trace that is near the edge of the board and farther from a ground plane layer will radiate more electromagnetic interference. Via stitching refers to putting a ring of vias attached to the ground plane all the way around the edge of the PCB (or as much as possible). You can also line the sides of a signal trace with vias to reduce EMI from the trace. In addition, a healthy dose of vias should connect the ground pour to the ground plane (if you have a separate ground layer on a 4-layer board, or your 2-layer board is mostly ground on the bottom). This prevents accidental antennas, and also ensures that the whole ground stays at the same potential all the time.
Use Decoupling Capacitors and Ferrite Beads
The datasheets for microcontrollers and power regulators have decoupling, or bypass, capacitors connected to the power pins. These chips don’t use the same amount of power constantly; they vary slightly as the chip does its thing, sometimes needing a surge of power briefly. This would look like a rapidly changing signal at the power pins. The purpose of the decoupling cap is to have a small reservoir of power right next to those power pins so that when the chip fluctuates wildly and quickly, the capacitor can smooth out those power demands without propagating that rapid change all across the power traces. The ferrite bead is usually used when connecting a switching power supply to the power plane, as it isolates the noise from the supply, so it is placed (along with a decoupling capacitor) next to the power supply output.
Keep Traces Short
Why would you make a wire any longer than it needs to be? You sometimes need to force a trace to take a pretty circuitous route (heehee) to get from one contact to another. This rule is more about prioritizing which routes get shorter and which can be longer. In general, the faster the signal traveling on the wire, the higher the priority and the shorter the ideal trace length. The crystal should be as close as possible to the microcontroller, with the wires going directly between the two. Every extra millimeter is more changing electric field and more emissions. A UART can have much longer wires because the signal doesn’t change as fast, and the positive voltage rails can meander all over. This is good practice also because faster signals means you want less distance between components to minimize latency, but RF prevention is important, too.
Add IO Filtering
Because your PCB is going to have some cable connections, or board to board connections, or chip to chip connections, each possibly with long traces, you can add some filtering to the traces to reduce their noise by putting resistors in series and a bypass capacitor to ground as close to the noise source (usually the microcontroller) as possible.
Don’t Skimp on the Power Supply
These are super noisy, and the cheaper they are, the more shortcuts are taken. Not only will they blast out RF radiation at harmonics of 50/60 Hz, but the switching power supply, which usually operates at frequencies in the hundreds of KHz is also responsible for a good chunk of noise. Then the output may not be very stable, so that’s a lot of noise traveling down the wire and radiating out, until it gets to your project, which will then be working with noisy power. Not to mention the safety concerns of cheap power supplies.
One thing that doesn’t make a difference is angles in traces. It turns out that even beyond 1 GHz speeds, 90-degree angles in traces have no measurable differences over other angles in radiated EMI.
If you want a more thorough application note on PCB layout for reduced emissions, check out TI’s white paper on the topic. Also, see our guide on preparing your product for the FCC.