A current transformer (CT) is a device that produces a scaled-down, isolated alternating current in its secondary winding that is directly proportional to the much larger alternating current flowing through its primary conductor. Whether you are building an ESP32-based home energy monitor or sizing metering for a 400A commercial service, understanding how this magnetic scaling works is the difference between accurate data and a burnt-out microcontroller.
The Core Mechanism: Step-Down Current, Step-Up Voltage
Unlike a standard voltage transformer where both primary and secondary are multi-turn wire coils, the primary of a current transformer is often just the single mains conductor passing through the center of the toroidal core. The secondary is a coil of fine wire wrapped hundreds or thousands of times around that same core. The alternating current in the primary wire generates an alternating magnetic flux in the core, which induces a proportional current in the secondary winding.
The governing principle is the conservation of ampere-turns. The ratio of primary current ($I_p$) to secondary current ($I_s$) is inversely proportional to the ratio of their turns ($N_p$ and $N_s$):
$I_p \times N_p = I_s \times N_s$
Worked Numeric Example: Interfacing with an ESP32
Let us look at the extremely popular YHDC SCT-013-000 split-core CT, widely used in DIY energy monitors. This specific model has a rating of 100A:50mA.
- Turns Ratio: If the primary is 1 turn (the wire passing through), the secondary has 2,000 turns ($100A / 0.05A = 2000$).
- Primary Current ($I_p$): Assume your circuit is drawing 20A RMS.
- Secondary Current ($I_s$): $20A / 2000 = 0.01A$ (or 10mA RMS).
Microcontrollers like the ESP32-WROOM-32 cannot read current directly; their ADC pins read voltage (0-3.3V). To convert our 10mA secondary current into a readable voltage, we must place a burden resistor across the secondary leads. If we use a 33Ω burden resistor:
$V_{rms} = I_s \times R = 0.01A \times 33\Omega = 0.33V_{RMS}$
The peak voltage will be $0.33V \times \sqrt{2} \approx 0.46V$. By adding a DC bias circuit (two 10kΩ resistors and a 10µF capacitor to create a 1.65V midpoint), this 0.46V AC signal swings safely between 1.19V and 2.11V, perfectly centered in the ESP32's 12-bit ADC range. For a deep dive into calculating exact burden values for your specific ADC, the OpenEnergyMonitor CT sensor guide remains the gold standard reference.
Where You Meet Current Transformers in Practice
You will encounter CTs anywhere electrical current needs to be measured, monitored, or protected without physically breaking the circuit to insert a meter.
- Home Energy Monitors: Devices like the Emporia Vue or Sense use arrays of split-core CTs clamped to individual branch circuits in your breaker panel to provide real-time, circuit-level power usage data.
- Utility Metering: The digital kWh meter on the side of your house uses internal CTs (and Potential Transformers) to step down the 200A service entrance current to levels the metering logic board can safely integrate over time.
- Protective Relaying: In commercial switchgear, CTs feed data to overcurrent relays. If a short circuit causes current to spike to 10,000A, the CT scales this down to trigger the breaker's trip coil in milliseconds.
- Variable Frequency Drives (VFDs): VFDs use internal CTs to monitor motor phase current, allowing the drive's firmware to adjust PWM output and prevent motor stall or overload.
Real-World Scenario Walkthrough: The Open-Circuit Arc
The most critical rule of current transformers, as detailed in All About Circuits' AC theory textbook, is that the secondary must never be left open while the primary is energized. Here is what happens when that rule is broken on the workbench.
- Setup: A hobbyist is building a smart monitor for a 50A Level 2 EV charger using a raw SCT-013-000 (no internal burden). They route the secondary wires 10 feet to a breadboard, using cheap Dupont jumper wires, intending to solder the burden resistor later. They clamp the CT onto the live 240V charger feed and turn the breaker on.
- Numbers: The EV charger begins pulling a continuous 40A. The CT secondary attempts to push 20mA. Because the breadboard circuit is incomplete (infinite resistance), Ohm's law ($V = I \times R$) dictates that the voltage will spike toward infinity to force that 20mA through the open air gap.
- Outcome: The magnetic core instantly saturates. The collapsing flux induces massive voltage spikes (easily exceeding 2,000V). The voltage arcs across the breadboard contacts, melting the Dupont wire insulation, permanently frying the ESP32's GPIO pin via parasitic capacitance, and leaving a scorched mark on the CT's plastic shell.
- What went wrong: Without a burden resistor to limit the voltage, the CT stopped acting as a step-down current transformer and became a high-ratio step-up voltage transformer. The insulation breakdown of the air gap and the microcontroller's internal protection diodes became the only "load" on the secondary.
What CTs Change in a Circuit (and Common Confusions)
A current transformer changes the measurement paradigm: it allows you to measure high current without inserting series resistance into the primary circuit and provides galvanic isolation between lethal mains voltage and your low-voltage logic.
However, builders frequently confuse CTs with other sensing technologies. Here is how they actually compare on the bench:
| Feature | Current Transformer (CT) | Shunt Resistor | Hall Effect Sensor (e.g., ACS712) |
|---|---|---|---|
| Measurement Type | AC Only | AC and DC | AC and DC |
| Galvanic Isolation | Yes (Magnetic) | No (Direct electrical contact) | Yes (Magnetic) |
| Primary Voltage Drop | Negligible (millivolts) | Significant (creates heat, e.g., 75mV @ 50A) | Negligible |
| Phase Shift / Power Factor | Low (good for Real Power calc) | Zero (purely resistive) | Higher (requires software compensation) |
| Best Use Case | AC Mains monitoring, high current | DC battery banks, low voltage | DC solar arrays, low-cost AC/DC hobby projects |
Common Confusion: CT vs. Potential Transformer (PT). A PT (or Voltage Transformer) is wired in parallel with the circuit to step down voltage (e.g., 480V to 120V for a meter). A CT is placed in series (the wire passes through it) to step down current. Never wire a CT in parallel across a voltage source; it will act as a dead short and explode.
FAQ: Sizing, Safety, and Selection
Q: Can I use a standard CT to measure the DC current from my solar panels or LiFePO4 battery bank?
A: No. Current transformers rely on a changing magnetic field (AC) to induce a secondary current. A steady DC current creates a static magnetic field, which induces zero voltage in the secondary. For DC systems, you must use a Hall Effect sensor (like the Allegro ACS758) or a dedicated DC shunt with an isolated amplifier (like the Texas Instruments AMC1100).
Q: Does the direction I clamp the CT matter?
A: Absolutely, if you are calculating Real Power (Watts) or Power Factor. CTs have polarity markings, usually P1/P2 for the primary (wire direction) and K1/K2 or S1/S2 for the secondary leads. If your CT is clamped backward relative to your voltage reference, your ESP32 will calculate a negative power factor and report that your load is generating power back to the grid. For simple RMS current (Amps) monitoring, direction does not matter.
Q: I bought a CT with a 3.5mm audio jack. Is it safe to plug and unplug it while the panel is live?
A: Only if it is a "voltage-output" CT (like the SCT-013-030) which has a built-in burden resistor inside the molded casing. The internal burden ensures the secondary is never truly open-circuited, even when the jack is unplugged. If you are using a raw current-output CT with a removable jack, unplugging it opens the secondary and creates the dangerous voltage spike scenario described above. Always verify the NFPA 70 (National Electrical Code) guidelines for working spaces and live parts before interacting with panel components.
Q: How do I choose the right CT ratio for my project?
A: Select a CT where your maximum expected continuous current falls between 60% and 80% of the CT's primary rating. If you expect a 30A continuous load, a 50A or 100A primary CT is ideal. Using a 400A CT to measure a 5A lighting circuit will result in a secondary signal so small that it gets lost in the noise floor of your microcontroller's ADC.






