Searching \ for 'RMS - slightly off topic' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'RMS - slightly off topic'.

Truncated match.
PICList Thread
'RMS - slightly off topic'
1997\08\02@140711 by Mike

flavicon
face
Hi all,

Sorry for slightly off topic - but it might be of use to others also.

I need to read 4 voltages at 60Hz and I need the true RMS value. I know
that I could use a true RMS detector/converter by Analog devices, but these
are just too expensive - any others around in small DIP packages ?

OR
Is there some 'appropriate arrangement' of LM324 or similar opamps that
might provide this conversion for frequencies around 50 to 60Hz ?

Any ideas ?

Rdgs

mike
Perth, Western Australia

1997\08\02@160725 by Harold M Hallikainen

picon face
       Actually, it's an interesting problem.  You're not, by chance,
looking at phase controlled AC sine waves (like outta light dimmers)?
       The trick, of course, is that you need the square root of the
mean of the squares of the instantaneous voltages.  In continuous time
(ie, analog devices), this involves squaring the sample voltage,
integrating it, dividing by the integration time, then taking the square
root.  The "integrating and dividing by the integration time" is pretty
much just running it through an appropriate low pass filter where you
trade ripple in the output for response time.
       Although it COULD be done with a bunch of op-amps and diodes or
transistors to do the squaring and rooting, it seems that the single chip
solution from AD is a lot simpler and more accurate.
       I SEEM to recall Maxim or Linear Technology having an RMS to DC
chip that actually had a heater on it and then measured temperature rise
due to current throguh the heater.  I think it was accurate to 100 MHz or
so.  If you want, I can try to find info on it.  I don't know how
accuracy would compare with the pure analog technique described above.
It seems that we would need two temperature readings along a "thermal
resistance", then determine the "thermal current", which would be
proportional to the power dissipated in the resistance.  This is pretty
much how a thermocouple ammeter works.  The voltage out of the
thermocouple is approximately proportional to the temperature difference
between the two junctions, so we are using temperature difference to
measure rate of heat flow (power) out of the hot wire.  Of course, the
thermocouple voltage is then approximately proportional to power, which
is proportional to the square of the current, so the thermocouple ammeter
has a "square law" meter face.
       Then... there's the DSP approach!  I don't know if the PIC is
fast enough to get enough samples (especially sampling four lines).  If
you're not in a hurry, maybe you could use some sort of sub-sampling
where you move a little further into the cycle to sample on each
successive cycle, reducing sample rate to 60 (or 50) times per second,
but it would take a bunch of cycles to get a result (hoping that the
waveform is relatively stable during that time).  However you get the
samples, square each one, add them up, divide by the number of samples,
then take the square root.  RMS voltage!  Moving complexity from hardware
to software at its best!
       Sounds like something fun to play with.  Lemme know your
thoughts!

Harold


On Sat, 2 Aug 1997 14:07:11 -0400 Mike <spam_OUTerazmusTakeThisOuTspamWANTREE.COM.AU> writes:
{Quote hidden}

1997\08\02@163912 by Reginald Neale

flavicon
face
>Hi all,
>
>Sorry for slightly off topic - but it might be of use to others also.
>
>I need to read 4 voltages at 60Hz and I need the true RMS value. I know
>that I could use a true RMS detector/converter by Analog devices, but these
>are just too expensive - any others around in small DIP packages ?
>
>OR
>Is there some 'appropriate arrangement' of LM324 or similar opamps that
>might provide this conversion for frequencies around 50 to 60Hz ?
>
>Any ideas ?
>
>Rdgs
>
>mike
>Perth, Western Australia

Do you really need the true RMS value? It's usually only when you need to
precisely measure a waveform with a truly bizarre crest factor. If that's
what you've got to have, the classical method is to measure the heating
effect. Works DC to daylight.

Reg Neale

1997\08\03@024149 by Mike

flavicon
face
At 04:38 PM 8/2/97 -0400, you wrote:

>
>Do you really need the true RMS value?

Sadly - yes - very distorted waveforms and need true RMS to determine
what DC power (down the line) to  pump into some big batteries...

> It's usually only when you need to
>precisely measure a waveform with a truly bizarre crest factor.

Yep - thats what I've seen :(

> If that's
>what you've got to have, the classical method is to measure the heating
>effect. Works DC to daylight.

mmmm - Bit like using valves - I think I might mux an AD chip afterall :(

Rgds

Mike
Perth, Western Australia

1997\08\04@092901 by Paul H. Dietz

flavicon
face
    Mike -
       It depends upon what your signal looks like. If it is purely
    sinusoidal, then you can just scale the amplitude. In fact, so long
    as you know the wave shape, you can do this. If you don't know the
    wave shape, there are a number of solutions. Jim Williams did a
    funky RMS to DC converter chip that is thermally based. Check out
    Linear Technology's Web site.
       My favorite tome on this subject (which I haven't seen since grad
    school days) was the manual for HP's 8-digit DMM. They had more ways
    of figuring out RMS than you can shake a stick at. I seem to remember
    a particularly novel random sampling method which worked in a
    statistical fashion. For reasonably stationary signals (in the
    statistical sense), I would imagine this to be the easiest to
    implement on a PIC...

    --- phd


______________________________ Reply Separator _________________________________
Subject: RMS - slightly off topic
Author:  pic microcontroller discussion list <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU> at
WDI-INTERNET
Date:    8/2/97 11:12 AM


Hi all,

Sorry for slightly off topic - but it might be of use to others also.

I need to read 4 voltages at 60Hz and I need the true RMS value. I know
that I could use a true RMS detector/converter by Analog devices, but these
are just too expensive - any others around in small DIP packages ?

OR
Is there some 'appropriate arrangement' of LM324 or similar opamps that
might provide this conversion for frequencies around 50 to 60Hz ?

Any ideas ?

Rdgs

mike
Perth, Western Australia

1997\08\08@162241 by Mike

flavicon
face
At 04:05 PM 8/2/97 EDT, you wrote:

>        Then... there's the DSP approach!  I don't know if the PIC is
>fast enough to get enough samples (especially sampling four lines).  If
>you're not in a hurry, maybe you could use some sort of sub-sampling
>where you move a little further into the cycle to sample on each
>successive cycle, reducing sample rate to 60 (or 50) times per second,
>but it would take a bunch of cycles to get a result (hoping that the
>waveform is relatively stable during that time).  However you get the
>samples, square each one, add them up, divide by the number of samples,
>then take the square root.  RMS voltage!  Moving complexity from hardware
>to software at its best!
>        Sounds like something fun to play with.  Lemme know your
>thoughts!

Hi Harold,

Now I find the software approach very interesting. Given the incoming AC
is full wave rectified at 20v and divided down to a voltage between 0 and
5v (I suppose we can neglect the symmetrical diode drops), then I take
it that all I need to do is:-

1.      Determine efficient number of samples to acquire over the period
       of the waveform, for improved precision I suppose this could be
       16 periods etc. At a sample time of say 50us for a 50Hz waveform
       gives 400 samples and do this over 16 periods gives 6400 samples.

2.      Perform the algorithm you describe above in the most efficient
       manner taking into account the execution time and its relationship
       to the system time constant - is it that simple ?

Rgds

mike
Perth, Western Australia

1997\08\08@162247 by Mike

flavicon
face
At 08:58 AM 8/4/97 PST, you wrote:

>        My favorite tome on this subject (which I haven't seen since grad
>     school days) was the manual for HP's 8-digit DMM. They had more ways
>     of figuring out RMS than you can shake a stick at. I seem to remember
>     a particularly novel random sampling method which worked in a
>     statistical fashion. For reasonably stationary signals (in the
>     statistical sense), I would imagine this to be the easiest to
>     implement on a PIC...

Yes HP had some great algorithms - I miss their discussions in the old
HP journals in the middle 80's. I decided to consider the DSP approach
by sum of squares etc, Harold suggested a simple algorithm - all I have
to do now is the most efficient maths...

rgds

mike
Perth, Western Australia

1997\08\10@141152 by John Payson

picon face
> Now I find the software approach very interesting. Given the incoming AC
> is full wave rectified at 20v and divided down to a voltage between 0 and
> 5v (I suppose we can neglect the symmetrical diode drops), then I take
> it that all I need to do is:-
>
> 1.      Determine efficient number of samples to acquire over the period
>         of the waveform, for improved precision I suppose this could be
>         16 periods etc. At a sample time of say 50us for a 50Hz waveform
>         gives 400 samples and do this over 16 periods gives 6400 samples.

Actually, if you took enough samples at different points in the wave you'd
probably do okay regardless of where those points were.  Of course, if you
just sample periodically you run the risk that your period and the wave's
might coincide.  But if you use methods to randomize your sampling times
you should get decent results (nb: you'll need more samples than if you
know the waveform's period and subdivide it, but you'll avoid the really
bad cases associated with "simple" periodic measurements).

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...