| View previous topic :: View next topic |
| Author |
Message |
Ttelmah
Joined: 11 Mar 2010 Posts: 20063
|
|
Posted: Sun Sep 07, 2014 11:50 am |
|
|
I must admit, I assumed he was using a precision half wave rectifier. Otherwise as you say the asymmetry would give ludicrous results....
This is why there is such a price difference for proper 'true RMS' meters etc.. |
|
 |
VernonAMiller
Joined: 11 Sep 2014 Posts: 25 Location: Contoocook, NH
|
|
Posted: Wed Oct 15, 2014 9:32 pm |
|
|
Another option is to use a true RMS-to-DC converter chip, then just use the PIC ADC to read the DC output. The Analog Devices AD636 is a sweet one. A bit pricey at $30 a pop (for the 1% accuracy version) but if you want high accuracy over a wide frequency range (like if you are designing a piece of audio test equipment) for complex waveforms, it's worth considering.
VAM |
|
 |
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Sat Oct 18, 2014 2:16 pm |
|
|
If you want to spend money on an amazing external RMS detector,
consider the AD630 synchronous demodulator ic.
When equipped with a suitable integrating capacitor, and the comparator input tied to the input signal- then it is capable of being a fine RMS detector.
But when the comparator is fed with an appropriate reference signal instead, it is then also able to offer phase sensitive detection, ideally suited for RMS true
( REAL) power detection as well - ala the watt meter and determining power factor of the load. |
|
 |
VernonAMiller
Joined: 11 Sep 2014 Posts: 25 Location: Contoocook, NH
|
|
Posted: Sat Oct 18, 2014 6:50 pm |
|
|
| asmboy wrote: | If you want to spend money on an amazing external RMS detector,
consider the AD630 synchronous demodulator ic.
When equipped with a suitable integrating capacitor, and the comparator input tied to the input signal- then it is capable of being a fine RMS detector.
But when the comparator is fed with an appropriate reference signal instead, it is then also able to offer phase sensitive detection, ideally suited for RMS true
( REAL) power detection as well - ala the watt meter and determining power factor of the load. |
WOW. Cool chip! Thanks for the tip.
I'm like a kid in a candy store when it comes to this stuff - I see something cool like this and I want to go out and get one just to play with it. I have the same problem with PICs. But there are only so many hours in a day
VAM |
|
 |
SuperDave
Joined: 22 May 2008 Posts: 63 Location: Madison, TN
|
|
Posted: Thu Oct 23, 2014 2:13 pm |
|
|
In case anyone else reads this thread there's an area that I didn't see covered and is critical. That is the combination of sample rate, signal frequency and sample size.
Under most conditions you must sample at more than (hopefully much more than) twice the highest frequency in the signal that is greater than the LSB of the A/D. And, you should get lots of cycles otherwise the stop/start points that result in partial cycles will make the reading noisy (same as inaccurate). Some silly examples:
1. A 100Hz sine wave is sampled every millisecond for 10 samples. The result will be perfect every time. A 110Hz sine wave won't be.
2. A 100Hz sine wave is sampled every 10 milliseconds for 100 samples. The result will vary randomly across every value from 0 to full scale! (You are getting exactly one sample every cycle and there is nothing to prevent those samples from occurring when the sine wave is a zero or any other value.)
3. A 100Hz sine wave is sampled every millisecond for 256 samples will see 25.6 cycles with the .6 making the result look noisy. (This produces real garbage if you try a Fourier transform.)
This is the wonderful world of aliasing which is often useful and often catastrophic and about as often not understood. A/D users beware.
Also, assuming the A/D has a stable mid point reference and the output is twos complement there should not be a need for a precision rectifier. That's handled by the squaring function. |
|
 |
|