I'm looking at using a current transformer (CT) to measure 50hz sinusoidal AC current with a microcontroller's ADC.

Is there a way to measure the RMS or average of an AC signal with good response without taking many samples with the ADC? I'd like to minimize the number of samples required by the ADC by using external filtering or other circuitry if possible. I have seen there are AC to RMS IC's available from Analog Devices but these seem to be in short supply and I feel as though there would be another non-proprietary solution.

I've found there are two popular ways of transforming the AC into a non-negative fluctuating voltage signal:

  1. DC voltage offset to one side of the CT (example 1 example 2)
  2. Use a precision rectifier (example)

And there are two popular ways of converting that non-negative fluctuating signal into a measurement:

  1. Measure with an ADC at a high frequency (100-1000hz) and calculate the RMS current.
  2. Use an RC filter to convert the fluctuating signal into a average value.

My problem with any combination of these methods is that either the response time is slow to current changes or there is ripple introduced to the ADC reading in the case of the RC filter, or the ADC measurement becomes resource intensive for the MCU if continuous monitoring of the current is required.

  • 1
    \$\begingroup\$ What response time are you looking for and how much cpu time and samplerate is available? \$\endgroup\$
    – Jeroen3
    May 17, 2022 at 7:29
  • \$\begingroup\$ If no harmonics, you can just sample at 2 times (with phase=0 and phase=90°). \$\endgroup\$
    – Antonio51
    May 17, 2022 at 7:53
  • \$\begingroup\$ Otherwise, 6, 11, or 21 samples per period (under timer interrupt) and run the DFT program. \$\endgroup\$
    – Antonio51
    May 17, 2022 at 7:55
  • 2
    \$\begingroup\$ "Is there a way to measure the RMS or average of an AC signal" - average is easy - it's always zero :). What is the purpose of this measurement? \$\endgroup\$ May 17, 2022 at 8:07
  • 1
    \$\begingroup\$ What current waveform are you dealing with? It's a simpler problem if it's sinusoidal. It's harder if you want a true RMS value for a non-sinusoidal waveform. In the latter case you won't get the correct result from a precision rectifier/RC filter combination. \$\endgroup\$
    – Graham Nye
    May 17, 2022 at 12:02

1 Answer 1


... the response time is slow to current changes ...

This is a circuit that can give the "peak voltage" (positive or negative) every "cycle" and/or "half cycle".

If there are no harmonics ... and voltage on the CT "enough" ...
You could use also a "synchronized sampler" to "sample" peak voltage value.
For this goal, use a "phase" shifter of 90°, followed by a comparator. Just sample with the ADC on the edges of the comparator, this will give the "peak" value (positive or negative).
See the last part of my answer in this post.

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.