The One-Sentence Definition and Core Principle

A current transformer donut is a toroidal or split-core magnetic sensor that clamps around a single AC conductor to induce a proportionally smaller, safely measurable secondary current without breaking the circuit. In a real installation, this component changes everything: it steps down dangerous, mains-level currents (like 100A at 240V) into milliamp or millivolt signals that are completely safe for 3.3V microcontroller ADCs or standard panel meters, all while maintaining strict galvanic isolation between the high-voltage mains and your low-voltage logic.

Think of it like a traffic camera mounted over a highway overpass. It doesn't physically touch the cars (the primary current), it doesn't slow them down (zero insertion impedance), but it counts exactly how many pass by per second based on their magnetic "shadow." The primary wire acts as a single-turn primary winding, while the donut's ferrite or iron core concentrates the alternating magnetic field into a secondary winding wrapped thousands of times around the core.

The Math: Turns Ratios and Burden Resistors

To use a current transformer (CT) donut with a microcontroller, you must convert the induced secondary current into a measurable voltage. You do this using a burden resistor. Let's run a worked numeric example using the most common hobbyist CT, the YHDC SCT-013-000.

Component Spec Check: The SCT-013-000 is rated for 100A max primary current and has a 2000:1 turns ratio. Note the "-000" suffix, which means it outputs raw current. (The SCT-013-030, by contrast, has an internal burden resistor and outputs 0-1V AC).
  1. Calculate Secondary Current: If your primary load is drawing 100A, the secondary current is 100A / 2000 = 0.05A (50mA).
  2. Determine Target Voltage: An ESP32 ADC reads 0V to 3.3V. Because AC swings positive and negative, we must bias the signal to the midpoint (1.65V). This leaves a maximum peak swing of 1.65V in either direction.
  3. Convert Peak to RMS: The RMS voltage of our maximum swing is 1.65V / √2 = 1.166V RMS.
  4. Calculate Burden Resistor: Using Ohm's Law (R = V / I), we get 1.166V / 0.05A = 23.32Ω.

In practice, you select the next lowest standard resistor value to avoid clipping the ADC at maximum load. A 22Ω 1/4W resistor is the perfect choice here, yielding a max RMS voltage of 1.10V and keeping your ADC safely within its linear range. For a deeper look at the underlying magnetics and phase shift errors introduced by the burden resistor, the OpenEnergyMonitor CT theory guide provides excellent bench-level validation data.

Where You Meet This in Practice

You will find current transformer donut arrays inside commercial home energy monitors like the Emporia Vue or Sense, where a dozen split-core CTs clamp onto individual branch circuits in a subpanel. In the DIY and maker space, they are the backbone of solar inverter monitoring, smart breaker projects, and automated welder logging.

However, choosing the right sensor topology is critical. Here is how the CT donut stacks up against alternatives you might find on a parts list:

Criteria Current Transformer Donut (e.g., SCT-013) Hall-Effect Sensor (e.g., ACS712) Rogowski Coil (e.g., PEM CWT)
Measures DC? No (AC only) Yes (AC and DC) No (AC only, measures di/dt)
Requires External Power? No (passive generation) Yes (needs 5V VCC) Yes (needs active integrator circuit)
Insertion Loss / Impedance Zero (clamps over wire) High (must break circuit, insert in series) Zero (flexible clamp)
Cost (Hobbyist scale) ~$4 - $8 per unit ~$2 - $4 per IC $150+ per probe

Bench Scenario: Wiring an SCT-013 to an ESP32 (And the Mistake That Fries Your ADC)

Theory is clean; the workbench is messy. Here is a real-world scenario walkthrough of measuring a 15A space heater with an ESP32 DevKit v1, including a common failure mode that destroys microcontrollers.

The Setup

We clamp the SCT-013-000 over the hot wire of a 120V space heater. The secondary wires connect to a breadboard. We place a 22Ω burden resistor across the CT leads. To bias the signal for the ESP32's 0-3.3V ADC, we build a voltage divider using two 10kΩ resistors from 3.3V to GND, creating a 1.65V virtual ground, and buffer it with a 10µF capacitor. The CT signal is AC-coupled or referenced to this 1.65V midpoint before feeding into GPIO 34.

The Numbers

The space heater draws 15A RMS. The CT steps this down to 7.5mA RMS. Across the 22Ω burden resistor, this generates 0.165V RMS. The peak voltage is 0.233V. Referenced to our 1.65V bias, the ESP32 ADC sees a clean sine wave swinging from 1.417V to 1.883V.

The Outcome

Using the EmonLib library, the ESP32 samples the wave at 2kHz, calculates the RMS of the ADC readings, and accurately logs 15.02A to an MQTT broker. The galvanic isolation means a fault in the heater wiring cannot reach the microcontroller.

What Went Wrong (The War Story)

A reader previously attempted this exact build but grabbed an SCT-013-000 from their parts bin and forgot the external burden resistor and DC bias circuit. They plugged the raw CT leads directly into the ESP32 GPIO, assuming it would "just read the voltage" like the SCT-013-030 model.

Critical Failure Mode: A current-output CT acts as a current source. Without a burden resistor to convert that current into a proportional voltage, the voltage across the open secondary leads will spike massively to try and push the current through the air gap. When clamped to a microcontroller pin, the negative half-cycles of the AC wave forward-biased the ESP32's internal ESD protection diodes. This injected raw current backward into the 3.3V rail, permanently damaging the ADC's sample-and-hold capacitor. The GPIO pin was bricked, permanently reading 4095. Always verify if your CT donut has an internal burden before wiring it to logic-level pins.

Common Confusions and Pitfalls

When sourcing or specifying these sensors, builders frequently confuse the current transformer donut with other current measurement topologies. Understanding the differences prevents catastrophic bench mistakes.

  • Confusion with Hall-Effect Sensors (ACS712): Hall-effect ICs measure the magnetic field directly using a semiconductor element, meaning they can measure both AC and DC current. A CT donut relies strictly on Faraday's Law of Induction, which requires a changing magnetic field (dΦ/dt). If you pass 12V DC from a battery bank through a CT donut, the secondary output will be exactly zero. For DC battery monitoring, you must use a Hall-effect sensor or a shunt resistor.
  • Confusion with Rogowski Coils: Rogowski coils look like flexible CT donuts, but they are air-cored and measure the rate of change of current (di/dt). They require an active analog integrator circuit to reconstruct the actual current waveform. Standard split-core CT donuts have ferrite cores, measure absolute current directly, and only require a passive burden resistor.
  • The Unburdened Solid Core Danger: While split-core "donuts" are designed to be opened and closed, solid toroidal CTs (often found in industrial panel meters) must never be opened or left unburdened while primary current is flowing. As noted in All About Circuits' guide on CT safety, an open-circuited CT under load can generate thousands of volts across the secondary terminals, posing a lethal shock hazard and instantly destroying the core's insulation.

Frequently Asked Questions

Does the primary wire need to be perfectly centered inside the donut?

No. According to Ampere's Law, the magnetic field integral around a closed loop depends only on the total enclosed current. Whether the THHN wire is dead-center or touching the inner plastic wall of the split-core, the induced secondary current remains identical. The only rule is that the wire must pass through the center window exactly once. Looping the wire through twice will double the primary amp-turns, effectively halving the turns ratio and doubling your secondary output (useful for measuring very small currents).

Can I use a current transformer donut to measure the power factor of an AC circuit?

Yes, but the CT donut alone is not enough. A CT only measures current magnitude and phase. To calculate true power (Watts), apparent power (VA), and power factor, you must also measure the AC voltage waveform simultaneously. By feeding a stepped-down AC voltage signal into a second ADC channel and multiplying the instantaneous voltage and current samples in your microcontroller (the discrete equivalent of P = V × I × cos(θ)), you can calculate the exact phase angle difference and derive the power factor. The Espressif ESP32 ADC documentation details the sampling rates required to keep voltage and current channels time-synchronized for accurate phase calculations.

Why is my CT donut reading 20% low on my workbench?

If your math is correct but your readings are consistently low, check your burden resistor tolerance and your ADC reference voltage. Cheap 5% carbon film resistors can drift significantly under continuous load. More commonly, makers assume their ESP32 or Arduino is outputting exactly 3.3V or 5.0V for the ADC reference, when USB power droop often pulls this down to 3.1V or 4.7V. Hardcode your actual measured VCC into your RMS calculation constants, or use the microcontroller's internal bandgap reference to calibrate the ADC dynamically.