# Digital AC/DC Voltmeter design

Discussion in 'Electronic Design' started by Marco Ferra, Mar 19, 2005.

1. ### Marco FerraGuest

Hi to all

I'm trying to build a digital AC/DC voltmeter in the most efficient
manner I can, and although I can easily convert one DC voltage using an
ADC, I can't find a reliable way (ie. getting the RMS value) of an AC
signal.

This signal could be perfectly sinusoidal, but it can also be a signal
that doesn't, for example, crosses zero. Thus how can I *remove* the DC
component of an AC signal (if indeed it has it) and how can I get a
digital value from this signal?

Sincere regards
mferra

2. ### John LarkinGuest

Just take random samples using a fast ADC; square, average, square
root. You can either do it the direct way and get DC-coupled true RMS,
or subtract out the mean value from each sample and effectively AC
couple.

John

3. ### Marco FerraGuest

Just take random samples using a fast ADC; square, average, square
I see, and I'll use your approach, thanks for the idea. I'll keep in

mferra

4. ### Fred BloggsGuest

That's not how it's done in practice- not even close. If you don't know
what you're talking about then why don't you just shut the hell up.

;D

6. ### John LarkinGuest

Well, I did design a line of end-use power survey meters that used
this principle. I used a 6803 uP to sample and digitize 16 separate AC
circuits (voltage:current pairs) and compute/log everything: trms
volts, amps, power, pf, kwh; it did temperatures and humidity and
waveform acquisition and stuff like that, too. Over 4000 were sold,
and I received something like \$1.2 million in royalties over the
product lifetime. The 6803, running at 1.2 MHz, had no trouble doing
the math, logging the data, managing a display, and talking 9600 baud.

Here's an updated version, in VME. It's used mostly for production
test of aircraft power systems and big diesel backup generators.

http://www.highlandtechnology.com/DSS/V180DS.html

I really don't understand why anybody would buy the Analog Devices
metering chips; a 90-cent CPU with on-chip ADC will do a lot more.

What's your experience along these lines?

John

7. ### Fred BartoliGuest

Sorry Fred but see the HP3406A.

BTW, you don't need fast ADC. Just fast enough sampling.

8. ### Fred BloggsGuest

A random sample ADC is not the same as an ADC sampling randomly.

9. ### John LarkinGuest

Actually, you don't even need to sample fast; there's certainly no
Nyquist issue here, as we're just gathering statistics on a waveform,
not trying to reproduce it. The reason to sample randomly (or at least
at a not-exactly-periodically rate) is to avoid aliasing the signal or
its harmonics. If the signal is of a known frequency (say, 60 Hz) you
can sample at some fixed rate that dances betweeen the harmonics
safely; the math gets interesting. My old survey meter sampled at some
magic rate close to 27 Hz, as I recall.

The adc s/h does have to have bandwidth compatible with all the signal
components. So you can wind up using a wide-bandwidth ADC fired
slowly, or mux'd between a lot of channels.

The 3406 used a very fast s/h, essentially the full-bridge sampler
like in the 1 GHz 1810 sampling scope plugin, fired at a relatively
low rate. Anybody got details? Was the 3406 true RMS? A schematic
would be fun.

John

10. ### Fred BartoliGuest

Sorry, bad wording again. I meant that the sampler had to have enough BW so
as to see all the signal components.

For the full operating & service manual see:
ftp://bama.edebris.com/hp/3406a/

Lots of other manuals there.

11. ### GuestGuest

Strangely enough, that was my last design, just before I retired 12 years
ago. I designed a calculating RMS-DC converter that could be integrated on
a BiCMOS LSI chip. It used the identity that Vrms = average value of
(V^2/Vrms) If I had it to do today, I'm sure a different method would be
used.

You might look at some of the Analog Devices app notes. They make a
stand-alone LSI chip for the purpose.

Norm Strong

12. ### John LarkinGuest

I checked an old HP catalog, and the 3406 is indeed a sample averaging
instrument, not true RMS.

John

13. ### David Drinnan

2
0
Feb 11, 2010
I apologize for resurrecting an old topic, but Google led me here and this deals exactly with what I need and all I think I need is a follow-up question and answer.

John, you say you can take RMS voltages using that method -- i.e. taking random samples and then running the RMS calculation on them.

What I need is a DC voltage read of a DC voltage signal. The signal is not a constant voltage, but for the most part is a rectified 60Hz signal.

Is there any reason the same method of taking random samples but performing an average instead of an RMS wouldn't work for taking DC readings?

My concern is that when taking an average you will get a different subset of readings than you would at other times, and so the DC reading will change without the signal changing.

For example, if you take the average of a rectified 1Vp-p sinusoidal signal over a single time period (i.e. a single sine hump), you would get an average of 2/pi V = 0.637 V. If, however, you took the average reading over a slightly longer time period of say 6/5*T, the average would then be 0.581 V. So the DC reading you get changes significantly depending on the length of time you take readings, even though the actual DC reading (the original signal) doesn't change at all.

Is that problem mitigated by taking random samples?

Last edited: Feb 11, 2010