3
\$\begingroup\$

I have worked many years with AVRs and know that its ADC has an internal capacitor that if charged well can measure AC voltages (applying an AC voltage gives a number). But what I don't know is that if this is just a feature made by intrinsic nature of them or they are designed to do that. In other words, how reliable this measurement is as a RMS measurement and if this is applicable, should I cut the input signal to remove the negative part of it (for example by a diode) or the pure peak-peak voltage is applicable?

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

If you want to use an undocumented feature then that's fine but if you want to be safer you need to calculate RMS based on the input waveform being fully within the upper and lower limits of the ADC.

You also need to take enough samples per second so that your RMS calculation fully takes account of harmonics in the waveform.

Removing part of the waveform is OK provided you are dealing with sinewaves (no harmonics) and you take account of this "planned" distortion.

\$\endgroup\$
4
  • \$\begingroup\$ "Calculate RMS" means using rms circuits as ICs designed for that? or calculating it on the paper? \$\endgroup\$
    – Aug
    Commented Sep 18, 2013 at 13:16
  • 3
    \$\begingroup\$ @Aug I would calculate RMS using the code running in the AVR chip. \$\endgroup\$
    – Andy aka
    Commented Sep 18, 2013 at 13:19
  • \$\begingroup\$ OK let check I understood well. you mean to use the micro without additional components and converting the ADC value regarding the waveform ? Sine waves have negative parts but AVRs can not tolerate negative voltages. What do you do with that? using only the positive part of the signal or adding an offset voltage and removing the offset value by code? \$\endgroup\$
    – Aug
    Commented Sep 18, 2013 at 14:14
  • \$\begingroup\$ @Aug I would add an offset voltage to put the ADC in the middle of its range. If you do an RMS and an average in code you can calculate what you need. What type of signal are you trying to compute RMS? \$\endgroup\$
    – Andy aka
    Commented Sep 18, 2013 at 14:55

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.