A fault interrupter is a protective device or embedded logic block that continuously monitors current imbalance or arc signatures and physically breaks the circuit within milliseconds when a hazardous leakage threshold is exceeded. While most DIYers interact with off-the-shelf GFCI receptacles, embedded engineers and advanced makers build custom electronic fault interrupters using microcontrollers, Zero Sequence Current Transformers (ZCTs), and solid-state relays. Whether you are designing an IoT smart panel, an automated manufacturing tester, or a custom DC solar disconnect, understanding the underlying physics and ADC thresholds is mandatory for safe operation.
Core Theory and Trip Thresholds
What a fault interrupter changes in a real installation is fundamental: it transforms a standard branch circuit from a passive power delivery path into an active, self-monitoring safety loop. Instead of waiting for a catastrophic short circuit, it drops the load in under 25 milliseconds to prevent lethal shock or fire.
The most common point of confusion is mixing up a fault interrupter with a standard thermal-magnetic overcurrent breaker. A typical 15A miniature circuit breaker (MCB) will not trip until 15A of current flows through it. However, a human can experience ventricular fibrillation from as little as 50mA of current passing through the chest. The overcurrent breaker will happily pass 50mA indefinitely, while a ground fault interrupter detects that 5mA imbalance and kills the power before the shock becomes lethal.
| Interrupter Class | Primary Application | Trip Threshold | Max Trip Time (at threshold) | Embedded Sensor / Logic Type |
|---|---|---|---|---|
| Class A GFCI (Personnel) | Residential wet locations, outlets | 4–6 mA | < 25 ms | ZCT + Transimpedance Op-Amp |
| Class C GFCI (Equipment) | Industrial machinery, EV chargers | 15–20 mA | < 25 ms | ZCT + Hardware Comparator |
| AFDD (Arc Fault) | Bedroom/living room branch circuits | 2.5A–5A (High Freq) | < 120 ms | High-bandwidth CT + DSP/MCU FFT |
| Embedded Electronic Trip | Custom IoT panels, DC solar arrays | User-defined (e.g., 2 mA) | < 5 ms | Isolated ADC + FreeRTOS Task |
To sense these thresholds, we rely on a Zero Sequence Current Transformer (ZCT). Think of a ZCT like a closed-loop water pipe: the water flowing out through the hot pipe must exactly equal the water returning through the neutral pipe. If 5mA "leaks" out of a crack (e.g., a human touching a live wire and providing a path to ground), the return flow drops, and the ZCT detects the missing magnetic flux.
Worked Numeric Example: ESP32 Sensing a 5mA Ground Fault
Let’s trace the exact signal path from a 120V AC mains fault to the ESP32-WROOM-32 ADC. We will design for a Class A personnel trip threshold of 5mA RMS.
- The ZCT Stage: We use a toroidal ZCT with a 1000:1 turns ratio. Both the Hot and Neutral wires pass through the center. Under normal conditions, the magnetic fields cancel out (0V output). When a 5mA RMS fault occurs on the hot wire, the secondary winding induces a proportional current.
- Secondary Current Calculation:
I_sec = 5mA / 1000 = 5µA. - Signal Conditioning: An ESP32 cannot read 5µA directly. We route the ZCT secondary into a transimpedance amplifier (TIA) built with an OPA344 op-amp. We select a 100 kΩ feedback resistor (Rf).
- Voltage Conversion: The TIA converts current to voltage:
V_out = I_sec × Rf = 5µA × 100,000Ω = 0.5V RMS. - Peak Voltage: Since AC is sinusoidal, the ESP32 ADC will read the peak voltage.
V_peak = 0.5V × √2 ≈ 0.707V. - ESP32 ADC Translation: The ESP32 12-bit ADC has a usable range of roughly 0V to 3.1V (4095 counts).
ADC_Counts = (0.707V / 3.1V) × 4095 ≈ 931.
In your firmware, 931 ADC counts becomes your hard trip threshold. If the ADC reads ≥ 931, the ESP32 immediately pulls the relay enable GPIO low.
Timing and Sampling Rate: According to NFPA 70 (NEC Article 210.8) and UL 943 standards, a 6mA fault must clear in under 25ms. A 60Hz AC wave has a period of 16.6ms. To guarantee you catch the peak of the fault wave before the 25ms window expires, you must sample the ADC at least 10 times per half-cycle (8.3ms). This requires a minimum sampling rate of 1.2 kHz. Do not use a simple analogRead() inside the Arduino loop() if you are also running WiFi/MQTT; use the ESP-IDF continuous ADC driver or hardware I2S DMA to ensure zero missed samples during network stack interrupts.
Where You Meet Fault Interrupters in Practice
You will encounter embedded fault interrupter logic in several advanced electrical and maker scenarios:
- Smart Home Subpanels: Next-gen IoT breakers don't just trip; they monitor baseline leakage current over MQTT. If a water heater's heating element degrades and leakage creeps from 0.5mA to 3mA over a month, the system alerts the homeowner via Home Assistant before a nuisance trip occurs.
- Automated GFCI Testers: In manufacturing, end-of-line testers use ESP32 DACs and precision current sinks to inject exact 6.0mA faults into newly assembled GFCI receptacles, verifying the mechanical trip solenoid engages within the UL 943 time curve.
- DC Solar Arrays: DC ground fault interrupters (GFI) in string inverters use vastly different thresholds (typically 300mA). Unlike AC, DC arcs do not self-extinguish at a zero-crossing. The embedded logic here must detect slow-ramping DC leakage using Hall-effect sensors rather than AC ZCTs. For deeper reference on DC fault topologies, review TI's isolated GFCI reference designs.
FAQ: Clearing Up Common Confusions
Q: Can I use a standard current transformer (CT) instead of a ZCT for ground fault sensing?
A: No. A standard CT only measures the current on a single conductor (like the hot wire). It cannot tell the difference between 5A flowing to a legitimate load and 5A flowing through a human to ground. A ZCT encloses both the hot and neutral wires. It only outputs a signal when the vector sum of the currents is non-zero (meaning current is leaking outside the intended circuit path).
Q: Why does my ESP32 fault interrupter prototype trip every time my refrigerator compressor starts?
A: You are likely experiencing capacitive leakage or high-frequency transient noise. Motors and compressors generate massive inrush currents and high-frequency switching noise that can capacitively couple into the ZCT secondary. Fix this by adding a low-pass RC filter (e.g., 1kΩ and 100nF) between the TIA output and the ESP32 ADC pin, cutting off frequencies above 1.5 kHz. This filters out the microsecond switching spikes while preserving the 60Hz fault signal.
Q: Is an AFCI (Arc Fault) the same logic as a GFCI?
A: Completely different physics. A GFCI looks for a low-frequency (60Hz) current imbalance. An AFCI looks for high-frequency (10kHz to 100kHz) current "shoulders" and zero-crossing gaps caused by electricity jumping across a carbonized air gap (an arc). Implementing AFCI logic on an ESP32 requires sampling at >200 kHz and running a Fast Fourier Transform (FFT) to detect the specific high-frequency noise signature of a series or parallel arc.






