#### Power meter accuracy?

sa5pmg@...

Hi all,

new member and fairly new ham (less than one year). Likes to build stuff so my goal is to build my first radio but so far the journey has been long and educational. I'm fairly new to HW engineering, still trying to get my head around how transistors and op amps really works works and how-to interpret datasheets in order to be able to substitute components. But in the area of embedded SW I would say I'm skilled.

So far I've build a Arduino+AD9850 signal generator, an RF Power meter after https://sites.google.com/site/lofturj/ad8307-power-meter  but with an Arduino instead of an expensive Teensy, a LC meter (AADE style but with only one button) and a 40m CW beacon with Arduino+AD9850+my own version of SuddenTX, step attenuator, directional coupler and so on. The power meter, step attenuator and directional coupler works really good and I've been able to verify them using my employers lab.

My next step is to build a PHSNA since my signal generator is not good and it was built before I understood the importance of impedance matching between modules. I'm also tired of manually turning the frequency knob on the signal gen and read the dBm measurement of the power meter or Vpp of the oscilloscope. Sure I could automate it since all units have USB connection but why invent that again when PHSNA already exists.

Enough of background info, now to the questions about power meter accuracy.
The AD8307 datasheets says the output is 25mV/dB and the range is 88dB. Which means that without amplifiers we need to do voltage of a span of 88*25mV=2.2V and as I understand it the AD8307 output swings between 0.3 and 2.5V. The power meter I've built uses a 4.096V voltage reference, hence the accuracy with the Arduino 10-bit ADC ought to be: 4.096V/2^10=4mV per bit. 4mV/25mV/dB=0.16dB accuracy, right?

The W7ZOI/W7PUA and K3NHI amplifies the the voltage in order to be able to utilize the full 5V ADC range, ie 5V/2^10=4.9mV, which gives 0.2dB accuracy. And one of the reasons of amplifying and buffer the signal is to be able to transfer it to the measurement unit if they are separated, right?

I'm planning to build all in one unit so I wonder using a 3.3V or a 2.5/2.56V voltage reference would increase the accuracy to 0.13dB and 0.1dB?
Any drawback of doing it this way?

I see it as a way of getting rid of the op amps and make it easier to build, I'm aware of shielding, decoupling and short leads and so on.

I'm also considering using a STM32F103 instead of a Nano which runs on 3.3V and have a 12-bit ADC (yes, it is Arduino compatible), which would give 0.03dB accuracy. The STMF103 also have a lot more CPU power and flash and RAM so it would be easy to extend and its just \$1 more than a Nano.

Does this sound sane or is it a stroke of beginners obsession for accuracy in to understand things?

DuWayne Schmidlkofer

I built a stand alone AD8307 power meter using a Nano.
Since the max full scale output of the Ad8307 is 2.5 volts, instead of using an amplifier or different voltage reference I took the sum of two readings and used that value to do the conversion. This makes construction and shielding much easier. Using two readings helps average out any noise on the AD8307 output, and reduce the effect of the lease significant bit error that is inherent in a ADC. Looking at the meter readings as I vary the signal level, it gives an apparent increase in the resolution of the meter over just a single reading at half scale.
Looking at your post you mention increased accuracy where you are really talking about increased resolution. Accuracy will depend on what standard you are using for calibrating the system.
I have information on the meter and the reference I use for calibrating it on my blog kv4qb.blogspot.com

DuWayne
KV4QB

On 1/7/2016 3:13 PM, sa5pmg@... [PHSNA] wrote:
Hi all,

new member and fairly new ham (less than one year). Likes to build stuff
so my goal is to build my first radio but so far the journey has been
long and educational. I'm fairly new to HW engineering, still trying to
get my head around how transistors and op amps really works works and
how-to interpret datasheets in order to be able to substitute
components. But in the area of embedded SW I would say I'm skilled.

So far I've build a Arduino+AD9850 signal generator, an RF Power meter
an Arduino instead of an expensive Teensy, a LC meter (AADE style but
with only one button) and a 40m CW beacon with Arduino+AD9850+my own
version of SuddenTX, step attenuator, directional coupler and so on. The
power meter, step attenuator and directional coupler work s really good
and I've been able to verify them using my employers lab.

My next step is to build a PHSNA since my signal generator is not good
and it was built before I understood the importance of impedance
matching between modules. I'm also tired of manually turning the
frequency knob on the signal gen and read the dBm measurement of the
power meter or Vpp of the oscilloscope. Sure I could automate it since
all units have USB connection but why invent that again when PHSNA

Enough of background info, now to the questions about power meter accuracy.
The AD8307 datasheets says the output is 25mV/dB and the range is 88dB.
Which means that without amplifiers we need to do voltage of a span of
88*25mV=2.2V and as I understand it the AD8307 output swings between 0.3
and 2.5V. The power meter I've built uses a 4.096V voltage reference,
hence the accuracy with the Arduino 10-bit ADC ought to be:
4.096V/2^10=4mV per bit. 4mV/25mV/dB=0.16d B accuracy, right?

The W7ZOI/W7PUA and K3NHI amplifies the the voltage in order to be able
to utilize the full 5V ADC range, ie 5V/2^10=4.9mV, which gives 0.2dB
accuracy. And one of the reasons of amplifying and buffer the signal is
to be able to transfer it to the measurement unit if they are separated,
right?

I'm planning to build all in one unit so I wonder using a 3.3V or a
2.5/2.56V voltage reference would increase the accuracy to 0.13dB and 0.1dB?
Any drawback of doing it this way?

I see it as a way of getting rid of the op amps and make it easier to
build, I'm aware of shielding, decoupling and short leads and so on.

I'm also considering using a STM32F103 instead of a Nano which runs on
3.3V and have a 12-bit ADC (yes, it is Arduino compatible), which would
give 0.03dB accuracy. The STMF103 also have a lot more CPU power and
flash and RAM so it would be easy to extend and its just \$1 more than a
Nano.

Does this sound sane or is it a stroke of beginners obsession for
accuracy in to understand things?

N5IB

The underlying limit in building an AD-8307 based RF detector is the accuracy of the log amp detector itself. The data sheet shows a typical log amp conformance of +/- 0.3 dB (with a max of +/- 1 dB) over its roughly 90 dB dynamic range. So that's it. You can't rely on the absolute accuracy of a measurement to be any better than that. You can measure that with any arbitrary precision you wish, but the reality is that something in the area of +/- a half dB or so is the best we can do.

The consideration of A/D conversion bits and reference voltages is just to be sure that we have sufficient A/D resolution to make use of the available accuracy of the 8307.

Consider an 8 bit A/D, that outputs 0 to 255 counts. If you take the 90 dB dynamic range of the 8307 and divide by 256 you get 0.35 dB per count - right about the point where the A/D can just separate two values at the limit of the 8307's performance. So you can argue that anything more than 8 or 9 bit resolution is needless and misleading precision.

But we have a 10 bit A/d available "for free" so to speak in the Arduino. That means we have 90 dB/1024 = 0.08 dB per count. But you have to interpret that as meaning that the A/D output has to change by 2 or 3 counts before you are allowed to think of it as a truly measureable change in level. There's a bit of unused, non linear span at each end of the range, so the extra couple of bits is worthwhile to ensure we have enough counts over the useful linear range.

So in the end, as long as the useful linear span of your AD-8307, along with whatever amplification or lack thereof, and the selected A/D refererence voltage will result in a total change of around 300 A/D counts, you will be capturing all of the accuracy you can honestly expect.

Amplifying the 8307 output to obtain a wider voltage span is more about being sure that the A/D is not trying to resolve signals down in its noise. Note that "its" means the A/D's inherent noise. If the noise is on the 8307 output we'll just amplify it along with the signal. And if the op amp contributes noise that just makes things worse. So carefully decoupled and low noise power supply for the 8307, and a low noise op amp, if used, are essential.

And bear in mind that all of this would be predicated on having a perfect reference standard for calibration. Add in at least another couple of tenths of a dB uncertainty due to your calibration standard (for most hams, closer to a whole dB) and you can see the futility of chasing too much precision.

Jim, N5IB

David Collins

sa5pmg@...

@DuWayne
Thanks for reminding me that ADC:s gives at least 1/2 LSB noise. I changed my power meter to to take the average of two readings and it became less "jittery". I also used this to recalibrate my signal generator to have a flatter output. I still have to look into the spectral impurities.

@DuWayne & N5IB
Thanks for correcting me, I meant resolution instead of accuracy.

@N5IB
Thank for your elaborate and pedagogical reply. You confirmed my suspicions that I might suffer from some kind of "beginners obsession" , although I not at the point that I can let it go yet, see below. But I think I leave the STM32F103 out of this project for now.

Thanks for the links, after a brief read my question is: Is there no point in of making the AD985x with amplifier to have constant output power over the scan/sweep spectra?

During my research for RF power meter builds I came across the QRP Homebuilder site. I've spent a large portion of the holidays reading the QRPHomebuilder.pdf file. A really inspirational document.

In that a simple power meter is referenced on page 610 and in previous messages I've found in this group but the version on page 650, which is a tweaked version of K3NHI caught my interest, in particular the parts mentioned about filter ripple with 0.04dB.

How can the AD8307 be used for this when the accuracy is 0.3dB?
Does the DC offset into U1c give capability to "zoom" into a voltage range for the ADC to work on, of course together with the U1b input calibration?

Best regards
Marcus Gustafsson, SA5PMG

David Collins

Hi Marcus,

Getting constant output power from an AD985x is a little more complicated that just adding an amplifier.  Here's another link discussing the subject in detail:

CWTD - May 26, 2014

(I apologize for just sending you another link to answer your question but it sure saves me a lot of keying ;-).

73,

sa5pmg@...

No problem Dave. My question actually stems from reading that page and also from building the K8IQY LT1253 based amplifier but with R8 replaced with a digitally controlled potentiometer and use it in my signal generator.

My question is actually if a constant power level in the signal sweep can improve the SNA measurements somehow or if it will be equally accurate to compensate with math and data collected from calibration runs?

David Collins

Hi Marcus,

In my humble opinion, the only possible advantage to a constant DDS output power level would be to have a constant dynamic frequency response across the frequency range.  In my case, that would not be worth the effort and time that would require.

I generally calibrate my SNA for 0 dBm at 1 MHz. With a short coax from RF out to RF in, I do a sweep across the full frequency range (1 to 30 MHz for an AD9850 and 1 to 60 MHz for an AD9851) and capture the data in a calibration buffer (up to 1K data points).  I also capture the scan parameters (start and end frequencies and number of steps).  During all future scans, the firmware locates the closest point in the calibration buffer corresponding to the current frequency and subtracts the content of the calibration buffer from the current power reading.

I find this calibration method much easier to deal with than the curve fitting approach used with the standard PHSNA configuration.  The limited memory (both program memory and RAM) in the NANO and UNO prohibits using this type of calibration in the PHSNA.  The MEGA and, depending on the model you choose, the STM32F103 have enough RAM to use this approach.  The dsPIC33 in the SNA has 16 KB of RAM so my data and calibration buffers each hold 1K data points (doubles).  I also save the calibration data in an EEPROM so I can restore the calibration buffer contents and don't have to re-calibrate each time I turn the SNA off and on.

At 60 MHz, the AD9851 output level is generally about 5 dB less than the output level at 1 MHz so the calibration constant for that frequency is -5.0.  Subtracting this from the power reading adds 5 dB to the reading and has the effect of shifting the dynamic range of the SNA up 5 dB and raising the AD8307's -75 dBm floor to -70 dBm.  You get it back at the top end since the ceiling is raised from +17 to +22 dBm.  I doubt if this shift would be significant for anything I would be doing.  Also, achieving the -75 dBm floor would require a great deal of care dealing with such things as power supply noise, shielding, grounding, etc.  I never really tried to optimize in this area so I typically see a level of about -50 to -55 dBm with an open (or shorted) input to the RF Power Meter.

73,

dick faust

Sam Wetterlin has another approach to a leveler.  This would be on the lower half of his Accessories for MSA Calibration page.  The schematic and board layouts are available in a link higher on the page.

ACCESSORIES FOR MSA CALIBRATION

Sam's main page also has a wealth of information that can be applied here as well.

Sam Wetterlin Electronics

Dick K9IVB