Electrical Noise and EMI: What Causes It and How to Reduce It

Every microcontroller project eventually meets noise. An ADC reading jitters by 20 counts, a UART link drops bytes whenever a motor starts, or a board passes on the bench and fails EMC testing. The root cause is almost always the same: unwanted energy is coupling into a signal path, or your circuit is radiating it out. This guide explains where that energy comes from, how it travels, and how to reduce it with layout rules, passive filters, shielding, and firmware techniques.

Quick Takeaways

  • Electrical noise is any unwanted signal on a line; EMI (electromagnetic interference) is noise that couples through conduction, radiation, or near-field coupling.
  • Most noise originates from fast edges (dV/dt, dI/dt) on switching regulators, motors, relays, and digital clocks.
  • The cheapest fixes come first: a solid GND plane, 100 nF decoupling capacitors placed within 3 mm of each IC power pin, and short, tight current loops.
  • Filtering, shielding, and firmware oversampling handle what layout cannot.
Coupling Mode Mechanism Typical Source Primary Fix
Conducted Shared wires, power rails Switching supply, motor LC/ferrite filters, decoupling
Capacitive (E-field) Parasitic capacitance High dV/dt nets Spacing, guard traces, shield
Inductive (H-field) Mutual inductance High dI/dt loops Smaller loop area, twisted pair
Radiated Antenna behavior Long traces, cables, clocks Shielding, spread spectrum, layout
Common impedance Shared return path Shared GND trace Star ground, ground plane

Electrical Noise vs. EMI: Definitions That Matter

Electrical noise is any random or periodic disturbance that degrades a wanted signal. Engineers split it into two families:

  • Intrinsic noise: Thermal (Johnson) noise in resistors, shot noise in semiconductor junctions, and flicker (1/f) noise. You cannot remove it, only design around it.
  • Extrinsic noise: Interference from other circuits or the environment. This is what EMI covers, and it is what you can fix.

EMI has two regulatory faces. Emissions is how much interference your product radiates or conducts onto mains. Immunity (susceptibility) is how well it tolerates interference from others. Standards such as CISPR 32, FCC Part 15, and IEC 61000-4-x define limits and test methods for both.

The thermal noise voltage of a resistor sets a floor for sensor circuits:

Vn = √(4 · k · T · R · Δf)

A 10 kΩ resistor at 25 °C over a 10 kHz bandwidth produces about 1.3 µV RMS. Lowering resistance and bandwidth lowers this floor.

The Three Elements of Every EMI Problem

Every EMI issue needs a source, a coupling path, and a victim. Remove or weaken any one and the problem shrinks.

  1. Source: A fast-changing voltage or current.
  2. Path: Conduction, capacitive coupling, inductive coupling, or radiation.
  3. Victim: A high-impedance or low-level analog input, a clock line, a reset pin, or a sensitive receiver.

Always diagnose in this order. Identify the source first, then block the path, and only then harden the victim.

Top Causes of Electrical Noise in Embedded Designs

Switching Power Supplies

A buck converter chops its input at 300 kHz to 2 MHz. The switch node swings the full input voltage in nanoseconds, and the input capacitor current pulses with every cycle. The result is a ripple at the switching frequency plus broadband spikes at its harmonics.

Digital Clocks and Fast Edges

A 16 MHz clock with a 2 ns rise time contains significant energy well past 150 MHz. Edge rate, not clock frequency, decides the harmonic content. Fast GPIO drive settings and unterminated traces make this worse.

Inductive Loads: Motors, Relays, Solenoids

When a coil is switched off, its current cannot stop instantly, and the collapsing field generates a voltage spike that can reach hundreds of volts. Brushed motors also generate arcing noise from the commutator.

Ground Bounce and Shared Return Paths

When several output pins switch at once, the return current flows through the package and board inductance. The local ground shifts by V = L · di/dt. A 5 nH return path with a 100 mA/ns transient lifts ground by 0.5 V.

Cables as Antennas

A cable acts as an efficient antenna once its length approaches a fraction of the wavelength. Common-mode current of just 5 µA on a 1 m cable can fail a radiated emissions test.

ESD and Transients

Electrostatic discharge injects nanosecond pulses of several amps. Without protection, it resets MCUs or destroys I/O pins.

Diagnosing Noise: Tools and Method

You do not need an EMC chamber to start. Use this workflow:

  1. Oscilloscope with a short ground spring. Remove the long ground clip lead, which acts as an antenna and adds false ringing. Measure at the exact pin, not at the connector.
  2. Bandwidth limit toggle. Switch the 20 MHz limit on and off. If noise vanishes, it is high frequency.
  3. FFT view. Look for peaks at the switching frequency and its harmonics.
  4. Near-field probes. A DIY loop probe from semi-rigid coax and a spectrum analyzer or SDR can locate hot spots on a board.
  5. Process of elimination. Power the board from a battery. If noise disappears, the source is the mains-side supply.
Symptom Likely Cause First Test
ADC jitter at fixed frequency Switching regulator ripple Scope the rail, check FFT
Random MCU resets Rail dips, ESD, or inductive kick Probe VCC and RESET
UART/I2C errors near a motor Radiated or ground-coupled noise Run with motor unplugged
Wi-Fi/BLE range drops Digital noise near the antenna Disable the offending peripheral
Fails radiated emissions Cables, clocks, loop areas Near-field scan, ferrite on cable

Reducing Noise: Layout Rules That Do Most of the Work

Layout fixes cost nothing and usually deliver 80% of the improvement.

Use a Solid Ground Plane

Dedicate a full layer to GND and avoid cutting it with slots. Return current follows the path of least impedance, which at high frequency is directly under the signal trace. A split plane forces the return around the slot and creates a loop antenna.

Minimize Current Loop Area

Radiation and pickup both scale with loop area. Keep the hot loop of a buck converter (input capacitor, high-side switch, low-side switch) as small as physically possible. Place the input capacitor right at the IC.

Place Decoupling Capacitors Correctly

  • Put a 100 nF ceramic (X7R or C0G) at every IC VCC pin.
  • Place it closer than 3 mm, with the capacitor pad between the pin and the via.
  • Add a 10 µF bulk capacitor per power entry point.
  • Use short, wide connections and a via to the ground plane right at the capacitor pad.

Route Sensitive and Noisy Signals Apart

  • Keep analog traces away from switch nodes and clock lines.
  • Cross noisy and quiet traces at 90°, never in parallel.
  • Add a guard trace tied to GND on high-impedance inputs.
  • Maintain a 3W rule: spacing of at least three trace widths between aggressive nets.

Slow Down Edges Where Speed Is Unnecessary

Add a 22 to 100 Ω series resistor on clock and fast GPIO outputs. This slows the edge and cuts harmonic energy, with negligible effect on function at moderate speeds.

Filtering: Passive Components That Block Conducted Noise

Ferrite Beads

A ferrite bead acts as a frequency-dependent resistor, absorbing HF energy as heat. Choose by impedance at the noise frequency, not DC resistance, and verify rated current with margin, since beads saturate under load.

LC and Pi Filters

An LC low-pass filter on an analog supply rail attenuates ripple at 40 dB per decade beyond the corner frequency:

fc = 1 / (2π · √(L · C))

A 10 µH inductor with a 10 µF capacitor yields a corner of about 16 kHz, which strongly attenuates 500 kHz buck ripple.

RC Filters on Sensor Inputs

For slow sensors such as thermistors, an RC low-pass at the ADC input is cheap and effective. A 1 kΩ resistor with 100 nF gives fc ≈ 1.6 kHz. Make sure the source impedance still satisfies your ADC’s sampling requirements.

Common-Mode Chokes

On USB, CAN, and Ethernet lines, a common-mode choke blocks noise that appears equally on both conductors while letting the differential signal pass.

Snubbers and Flyback Diodes

Always protect inductive loads:

  • DC relay or motor: Place a flyback diode (1N4007 or a Schottky) across the coil, cathode to the positive side.
  • AC loads: Use an RC snubber (typically 100 Ω + 100 nF) or a varistor.
  • Brushed motors: Solder 100 nF ceramic capacitors from each terminal to the motor case and across the terminals.
Filter Type Best For Cost Trade-Off
Ceramic decoupling cap Local IC supply Very low Limited bulk charge
Ferrite bead HF rail isolation Low Saturates, can resonate
LC/Pi filter Analog supply, regulator output Low Added size, possible peaking
RC filter Slow sensor inputs Very low Adds delay, source impedance load
Common-mode choke Differential cables Medium Larger footprint
TVS diode ESD, surge Low Needs low-inductance placement

Shielding and Grounding Strategies

Shielding

A conductive enclosure or board-level shield can blocks radiated coupling. Effectiveness depends on seams and apertures, not material thickness. A slot longer than 1/20 of the wavelength leaks. Use gaskets and keep cable penetrations filtered at the shield boundary.

Cable Practices

  • Use twisted pair for differential and low-level signals. Twisting cancels inductive pickup.
  • Use shielded cable and terminate the shield to chassis at the entry point with a 360° connection, not a pigtail.
  • Add a clamp-on ferrite to cables that fail emissions testing.

Grounding Topologies

Method Use When Risk
Single-point (star) Low frequency (< 1 MHz), audio, sensors High inductance at HF
Multipoint (plane) Digital, RF, > 10 MHz Ground loops if chassis connected twice
Hybrid Mixed-signal products Needs careful planning

For mixed-signal boards, do not split the plane arbitrarily. Keep analog and digital sections physically separated, and let return currents stay in their own regions over one continuous plane.

Firmware Techniques to Survive Residual Noise

Hardware gets you most of the way. Software handles the rest. The ESP32-style example below applies oversampling and a median filter to an ADC input to reject spikes.

// Noise-robust ADC read: oversampling + median filter
// Works on Arduino-compatible boards and ESP32 (adjust ADC pin and resolution)

const int ADC_PIN = 34;         // Analog input (ESP32 GPIO34, input-only)
const int SAMPLES = 16;         // Oversampling count (power of 2 is convenient)

int readMedianFiltered() {
  int buf[SAMPLES];

  for (int i = 0; i < SAMPLES; i++) {
    buf[i] = analogRead(ADC_PIN);   // Take raw sample
    delayMicroseconds(50);          // Spread samples to avoid correlated noise
  }

  // Insertion sort to find the median
  for (int i = 1; i < SAMPLES; i++) {
    int key = buf[i];
    int j = i - 1;
    while (j >= 0 && buf[j] > key) {
      buf[j + 1] = buf[j];
      j--;
    }
    buf[j + 1] = key;
  }

  // Average the middle half to reject outliers
  long sum = 0;
  for (int i = SAMPLES / 4; i < 3 * SAMPLES / 4; i++) {
    sum += buf[i];
  }
  return sum / (SAMPLES / 2);
}

void setup() {
  Serial.begin(115200);
}

void loop() {
  Serial.println(readMedianFiltered());  // Print filtered result
  delay(100);
}

Additional firmware defenses:

  • Debounce and glitch-filter digital inputs. Require a stable level over several samples.
  • Enable the watchdog timer so noise-induced lockups recover automatically.
  • Use hardware CRC on UART, SPI, and I2C payloads, and retry on failure.
  • Enable brown-out detection (BOD) to avoid executing from corrupted rails.
  • Sample the ADC away from switching events. Trigger conversions between PWM edges when possible.

Practical Project: Quieting a Motor-Driven Sensor Node

Scenario: An ESP32 reads a BME280 over I2C and drives a small brushed DC motor through an N-channel MOSFET. Whenever the motor starts, I2C throws errors.

Fix procedure:

  1. Flyback diode: Add a 1N5819 Schottky across the motor terminals.
  2. Motor capacitors: Solder 100 nF across the motor terminals and from each terminal to the case.
  3. Separate supplies or filter: Feed the motor from a different rail, or isolate the logic rail with a ferrite bead + 10 µF capacitor.
  4. Decoupling: Add 100 nF + 10 µF at the ESP32 and BME280 power pins.
  5. I2C hygiene: Keep SDA/SCL short, use 4.7 kΩ pull-ups, and route them away from the motor leads. Lower the bus speed to 100 kHz if errors persist.
  6. Ground: Join motor ground and logic ground at one point near the supply entry (star), keeping the high-current path out of the sensor return.
  7. Firmware: Add CRC-checked retries and a watchdog.

Result: Typical improvement is the elimination of bus errors without any shielding, because the source and path were addressed together.

EMC Pre-Compliance Checklist

Run through this before paying for lab time:

  • Continuous ground plane under every high-speed trace
  • Decoupling at every power pin
  • Series resistors on clock and fast edges
  • Filtered and protected every connector (ferrite, TVS, common-mode choke)
  • Cable shields terminated 360° at the enclosure
  • Spread-spectrum clocking enabled on switching regulators or MCU PLLs, where supported
  • Near-field scan completed, with the hottest components identified

Frequently Asked Questions

What is the most common cause of electrical noise in microcontroller circuits?

Switching activity is the most common cause. Buck converters, motor drivers, and fast digital edges inject current spikes onto shared power and ground paths. Poor decoupling and a weak ground return let those spikes reach sensitive analog and digital inputs.

How do I reduce EMI on a PCB?

Use a continuous ground plane, shrink high-current loops, and place 100 nF decoupling capacitors next to every IC power pin. Slow unneeded fast edges with series resistors, filter connector lines with ferrites, and keep noisy and sensitive traces separated.

What is the difference between EMI and RFI?

EMI covers interference across the full electromagnetic spectrum. RFI (radio frequency interference) is the subset in the radio range, roughly 3 kHz to 300 GHz. In practice, engineers use the terms almost interchangeably.

Do ferrite beads and decoupling capacitors do the same job?

No. A decoupling capacitor supplies local charge and shunts noise to ground. A ferrite bead blocks high-frequency noise in series and absorbs it as heat. They work best together as a filter on a power rail.

Hot this week

Agricultural Robots Explained: Weeding, Harvesting, and Monitoring

Learn how agricultural robots weed, harvest, and monitor crops, with ROS2 code, kinematics, sensor tables, and tuning tips. Build your stack today.

Industrial Robots Explained: Arms, SCARA, Delta, and Gantry Types Compared

Compare articulated, SCARA, Delta, and gantry robots by speed, payload, and kinematics. Includes IK math and ROS2 code. Pick the right robot today.

Robot Grippers and End Effectors: Types and How to Choose

Compare parallel, vacuum, soft, and magnetic robot grippers. Learn the force math, payload sizing, and ROS2 control steps to pick the right end effector.

Robot Actuators Explained: Motors, Servos, and What Drives Movement

Compare DC, stepper, servo and BLDC robot actuators with torque math, wiring specs and ROS2 code. Pick the right motor for your robot today.

Robot Simulation Explained: Gazebo, Isaac Sim, MuJoCo, and Webots Compared

Compare Gazebo, Isaac Sim, MuJoCo, and Webots on physics, sensors, ROS 2 support, and cost. Pick the right simulator for your robot today.

Topics

Agricultural Robots Explained: Weeding, Harvesting, and Monitoring

Learn how agricultural robots weed, harvest, and monitor crops, with ROS2 code, kinematics, sensor tables, and tuning tips. Build your stack today.

Industrial Robots Explained: Arms, SCARA, Delta, and Gantry Types Compared

Compare articulated, SCARA, Delta, and gantry robots by speed, payload, and kinematics. Includes IK math and ROS2 code. Pick the right robot today.

Robot Grippers and End Effectors: Types and How to Choose

Compare parallel, vacuum, soft, and magnetic robot grippers. Learn the force math, payload sizing, and ROS2 control steps to pick the right end effector.

Robot Actuators Explained: Motors, Servos, and What Drives Movement

Compare DC, stepper, servo and BLDC robot actuators with torque math, wiring specs and ROS2 code. Pick the right motor for your robot today.

Robot Simulation Explained: Gazebo, Isaac Sim, MuJoCo, and Webots Compared

Compare Gazebo, Isaac Sim, MuJoCo, and Webots on physics, sensors, ROS 2 support, and cost. Pick the right simulator for your robot today.

How Robots Navigate: Localization, Mapping, and Planning Explained

Learn how robot navigation works: EKF localization, SLAM mapping, A* and DWB planning, plus copy-paste ROS2 Nav2 configs. Build yours today.

Kalman Filters Explained: The Gold Standard for Sensor Fusion

Master Kalman filter sensor fusion: math, Python code, ROS2 EKF configs, and Q/R tuning for robots. Build a reliable state estimator today.

Control Theory for Robotics: A Learning Roadmap

Master control theory for robotics: PID, state-space, LQR, and MPC with ROS2 code, tuning tables, and a staged study path. Start the roadmap.

Related Articles

Popular Categories