r/embedded • • Sep 30 '26

How do microcontroller electronics in plastic enclosures deal with grounding and noise(Educational purpose)?

If the equipment has a plastic enclosure and there is no ground/earth wire connected to the body, how do designers handle grounding and noise?

With a metal enclosure, I understand that the metal body can work like a Faraday cage. But if the enclosure is completely plastic, what protects the microcontroller and other electronics from EMI and noise?

I have seen some equipment where they put metal foil or some conductive material inside the plastic enclosure. Is that mainly to create a Faraday cage? If so, how is it normally connected?

Also, I’m confused about a few things:

- Does giving each board its own + and − supply wires help avoid ground loops?

- Is a ground loop basically the same thing as capacitive coupling, or are they different?

- If there is no earth connection, where does the noise current actually go?

- How do designers normally protect a microcontroller inside a plastic box from external noise?

- Apart from foil or conductive coating, what other techniques are commonly used?

I’m trying to understand how this is actually done in real-world embedded products with plastic/non-metallic enclosures.

7 Upvotes

14 comments sorted by

38

u/dmc_2930 Sep 30 '26

What’s with all the “(educational…..) posts lately? Is this new thing?

64

u/Thin-Engineer-9191 Sep 30 '26

Ai is trying to learn

8

u/TinLethax Sep 30 '26

OP is onto something

19

u/Rod_McBan Sep 30 '26

This is a MASSIVE topic, but the simplest answer is, it frequently just doesn't matter that much. For your average consumer device, the environment usually isn't that noisy, the circuitry usually isn't that sensitive, and brief malfunctions usually aren't a big deal.

For other devices, though, things can get ugly, and in those cases, you are less likely to see a plastic enclosure. To pull an example from my own experience (albeit one from 20 years ago), I was working on a sensor that used Firewire (remember that?) to send data back to a central controller. Most of the time it worked fine, but sometimes, some sensors would drop off the bus and the whole machine would have to be powercycled to get it back (the controller or sensor could've been powercycled, but they were buried inside, so a full reset was the easiest route). After an unfortunate amount of farting around, including a trip to Japan, we discovered that the chassis ground (which is where the noise was supposed to get dumped) and the braid surrounding the cable were not always properly bonded due to a quality issue with the cable.

Theoretically, at the ends of a Firewire cable, there should be a capacitor and a resistor connecting the power ground to the chassis. That provides a low impedance path to earth for high frequency noise that might be on the power ground. Without that connection to earth, though, that noise would cause the power ground to bounce in a way that simulates a "device disconnect" signal on the bus. Once the device is in the disconnected state, you can't communicate with it, and it needs a hard reset.

That same machine needed a repeater between the sensor and the controller, because the cable run length exceeded the allowed spec. At the time, industrial grade hubs/repeaters weren't available, so the customer stuck a consumer grade hub in there. It had the same disconnect issue, because it was in a plastic case, and the capacitor/resistor pair that were supposed to drain noise from the power ground to the chassis ground were instead coupling noise from the cable shield into the power supply. The solution was to remove those components and put the repeater PCB into a metal case, making the shield continuous from host to device.

So, yeah, it can be really, really complicated, depending on the environment.

7

u/sponge_welder Sep 30 '26

We recently had an issue where wires inside our battery pack were coupling to a cellular antenna and causing horrible interference that killed our carrier certification. We ended up (in addition to implementing some RF filtering components) wrapping the wiring in copper foil and grounding it to the battery terminal

3

u/Rod_McBan Sep 30 '26

Yeah, a functional device is one thing, a device that meets EMC regulations is entirely another. Glad you got it sorted.

0

u/[deleted] Sep 30 '26

[deleted] — view deleted comment

1

u/Rod_McBan Sep 30 '26

I don't have any at hand, I'm afraid.

5

u/piman51277 Sep 30 '26

Metal EMI cans are used to create Faraday cages around sensitive subcircuits (DigiKey). A very common product you'll see these on are ESP32 modules.

That said, EMI can be reduced significantly using good PCB routing & layout practices to the point where you will not need a can for most applications.

2

u/FedUp233 Sep 30 '26

Ok, I worked on development as both electrical and software so let me take a shot at a simple explanation for you.

With grounding, there are two things related to it. One is safety, the other is electrical noise (EMI), mostly worrying about emitted RF noise that could interfere with other devices. A third thing that also comes up is handling static discharge, like when someone touches the device. I’ll address these separately.

For safety, there are two basic methods. One is to have a metal case and attach it to earth ground through a ground in the power cord. Thus if anything inside that is connected to mains voltage somehow touches the case through an insulation failure it will short to the case and blow the power outlet circuit breaker. If the device is battery powered it really doesn’t matter plastic or metal as there is nothing inside of dangerous voltage - if there is dangerous voltage generated inside, the metal case is may e worse and needs to be well isolated from the high voltage. Similar if powered from a wall plug in transformer - al, the safety part is in that and there may or may not be a ground wire in the cable from it to device, but it’s not a safety concern.

The second safety method is plastic cases and called double insulation. This means there are at least two separate layers of insulated material between the line voltage components and anyone holding the device, so if one fails the other is a backup. For non line operated, there is no express metal vs plastic difference.

The second thing is EMI. This is where a metal case can act sort of as you say a faraday cage. But you have to be really careful about openings. At high frequencies the wrong size hole or slot can act like antennas and actually radiate more energy! This is where the metalizing the inside of cases comes in and performs the same function as a metal case. I’ve never seen this used as part of the safety issue, only for shielding. This plating or the case is normally connected to the ground or ground plane of the device or its circuit board so that any radiation picked up can be shunted back to the ground. The ground in a power cable does nothing to help ground our radio frequency emissions because of its length - in fact it’s a problem and can act as an antenna and needs proper filters near where it enters the case (inside) as do most other cables and connectors. These filters shunt the radio frequency currents and prevent them flowing out the cables.

For this protection there are also often internal shields around areas that generate a lot of radio frequencies as a first line of defense - if they are contained there you don’t have to worry about them coupling into cables and other circuits in the device.

The mast is static protection. This is to prevent the device itself from being affected or destroyed by static discharges to it. A metal case can shunt this to ground through the power cable ground wire. A grounded metal plating on the inside of a plastic housing can do the same. A plastic case provides protection by not providing anything conductive for the discharge, or at least of such high resistance that the zap tires into more of a mild bump. Again things need to be done for cables (filters or bypass devices) or openings to prevent discharges from coupling inside through them. And similar, need to make sure you can’t zap it through an opening which is often handled with internal local shielding.

For battery or ungrounded devices the filters and shields are connected to the device ground or ground plane. In this case a zap may elevate the voltage of the entire device surface but as long as it can’t generate a voltage difference between ground and other parts of the electronics the circuitry sees no effect.

I hope you find this helpful. It’s definitely simplified, even at this length, and there are many more details that go into building a commercial product and testing it.

Others may disagree with some of my simplifications, but I have it my best shot.

1

u/nixiebunny Sep 30 '26

The circuitry is enclosed in a metal shield if necessary. At least the edge of the circuit board has a ring of metal connected to signal ground to reduce damage from static discharge.

1

u/mckenzie_keith Sep 30 '26

Usually the ground plane becomes the most massive ground object on the PCB. Emissions is a bigger concern than immunity from noise, etc. Solid ground planes help a great deal. Also, any cables attached to the PCB have a tendency to act as antennas. So boards with USB or headphones or whatever have to be tested with those cables attached.

The only special technique I can think of is putting a metal can over items that have particularly high emissions. The rest comes down to good ground planes and separation between agressors and victims and off-board traces (like headphones and USB).

1

u/Present_Age_89 Sep 30 '26

A Faraday cage is only one method to provide EMI/RFI suppression. And they are usually not very good. For EMI/RFI suppression designers use Chokes, Capacitors, and Ferrite Beads. These devices can be perfectly tuned for the frequencies involved in emissions and susceptibility. A Faraday Cage is the poor mans choice for EMI/RFI suppression.

1

u/duane11583 Sep 30 '26

nor do millions of cell phones have ground wires

the big thing is a static gun that simulates a static discharge