Learn / Passive components / Transformers

Measuring Mains Current Safely with a CT

ReviewedAdvanced ProAbout 7 min
In short

Measuring Mains Current Safely with a CT: the short answer

A current transformer (CT) such as the SCT-013-000 clips around one wire of a mains appliance. The wire is the single-turn primary, and the CT's secondary has many turns (2,000 for the SCT-013-000), so the secondary current is the primary current divided by 2,000.

Level
Advanced
Time
About 7 min
Topic
Passive components
You will learn to

Design the burden resistor and bias circuit for a split-core current transformer and calculate real current from ADC samples.

Before this: Transformers and Isolation, ADC Measurement & Reference Error, AC, RMS and Real Power

A current transformer (CT) such as the SCT-013-000 clips around one wire of a mains appliance. The wire is the single-turn primary, and the CT's secondary has many turns (2,000 for the SCT-013-000), so the secondary current is the primary current divided by 2,000. At 100 A in the wire, 50 mA flows in the secondary. You never touch the mains wiring: the CT clips over the insulated cable, which makes it the safest way to measure appliance power in a student project. Clip it around only the live (or only the neutral) conductor; around a whole two-core cable the currents cancel and it reads nothing.

The secondary is a current source, so it needs a burden resistor to turn current into a voltage. Never leave a current-output CT open-circuit while current flows in the primary: the voltage across its terminals can rise high enough to damage it. Pick the burden so the peak voltage fits your ADC. For an ESP32 at 3.3 V, centre the signal on 1.65 V using a divider of two equal resistors (10 kΩ to 470 kΩ) with a 10 µF capacitor to ground, and allow a swing of about ±1.5 V. Some versions (such as SCT-013-030) have a burden built in and output a voltage directly, so check which model you have.

In software, sample fast (at least 20 samples per 20 ms mains cycle, and preferably more), subtract the mid-point, square each sample, average over a whole number of cycles, and take the square root. That gives RMS current. Multiply by the mains RMS voltage for apparent power; for real power you must also sample the voltage through an isolated AC adapter and average the instantaneous V × I. The ESP32's ADC is non-linear near its ends, so calibrate against a known load such as a 1 kW heater.

A CT is a current transformer

A split-core clamp passes around one conductor, and the mains wire is a single-turn primary. The secondary has many turns and gives a small current in proportion. This isolates the measurement from the mains. Never clamp it around a cable with both live and neutral inside, since their currents cancel and the reading is zero.

A CT with a current output needs a burden resistor across it, and a CT with a built-in burden gives a voltage. Never leave a current-output CT open-circuit while current flows in the wire, because it can produce a dangerous voltage.

From signal to current

A CT's output is AC and swings both ways, so for a microcontroller ADC it must be biased to the middle of the range with two resistors and a capacitor. Sample fast enough to capture many points of each cycle, calculate the RMS by squaring each sample, averaging and taking the square root, and remove the bias first.

For power, multiply the current and voltage samples, which needs a voltage reading as well, and the power factor then comes from real power divided by apparent power.

Safety and accuracy

Choose the CT's rating to match the circuit, and check its linearity at low current, which is poor for small loads. Mains wiring must stay inside an enclosure with the right ratings. Do the clamping with the circuit isolated, and use a ready-made certified module if you are not experienced with mains.

Common mistakes
  • Clamping the CT around a cable containing both live and neutral.
  • Leaving a current-output CT open-circuit with no burden.
  • Feeding the AC signal to an ADC without biasing it.
Advanced lesson · Pro plan

Practise this lesson with Pro

The explanation above is free for everyone. The practice for Advanced lessons in every domain are part of the Pro plan at ₹999 a month.

With Pro you also get: a worked example, a hands-on task, a 3-question check.

Common questions

What will I learn in "Measuring Mains Current Safely with a CT"?

Design the burden resistor and bias circuit for a split-core current transformer and calculate real current from ADC samples.