RF MiliWatt meter

This page contains two versions of my mW meter, the PIC version with AD8318 and the Arduino version with AD8317

 

PIC Version with AD8318

PIC version mW meter

 

http://www.webx.dk/oz2cpu/radios/miliwatt.htm
AD8318 at Aliexpress.com

Downloads:   PIC Hex file V5.0.   Note: This file is for a 24 character LCD!

 

In ‘Elektuur’ (Elektor) of October 2002 an article was written about the construction of a PIC controlled RF Watt meter. I found the design earlier on the site of OZ2CPU and I bookmarked it for later use…. That moment was here and I ordered the print and software and got to work.

I must say, it’s a very nice measuring tool. It is based on a PIC 16F876(a) and an AD8307 logarithmic detector. Extension with a MAX232 offers the possibility of connecting the apparatus to your PC. The original available software has many features to make a very useful tool of it.  It is written in ‘C++’ format and should be compiled into a hex file. I used the PICC compiler. I made a small modification in the software to activate the second DC input (B) for using it, together with the already available DC input (A), for SWR measurements. I have modified the software to enable me to determine an SWR value out of two DC input voltages.

Major update February 2018.
Because the need of measuring frequencies in the GHz range more than below 1 MHz, I have rebuild the mW meter and replaced the AD8307 module by a AD8318 module, bought at Aliexpress
. Besides I have modified the software, I removed the SSB meter, SWR meter, About screen and display-update-speed screen. All to make the program smaller so I did not get into troubles with MPLABX for too less program memory space available. No problem with the 60-days demo version of the XC8 compiler, but 60 days has come very fast to an end! I modified the AD8318 output conversion to dB’s as well because the AD8381 has a reversed output compared to the AD8307.

Insight view, on the right side below the PIC PCB you see the AD8318 board

I found that the AD8318 is sensitive for temperature. After 1 hour the measurement of the input signal increases about 1.2 dB due to warming up of the enclosure. I replaced the transformer for one with 9 Volt output in stead of 12 Volt. I also mounted the 7805 regulator on the backside of the enclosure. After that, the measurement increases not more than 0.3 dB after an hour.

 

Arduino Nano Version with AD8317

Arduino version mW meter

 

AD8317 at Aliexpress.com 
AD8317 Datasheet

Downloads:   Arduino sketch v1.0.   Note: This file is for a 24 character LCD, including Bounce2 and LiquidCrystal libs).   The schematic of the mW meter.

Because of the PIC  compiler constraint to make the necessary changes in the source, I decided to step over to the Arduino Nano. I build the same display layout as from the OZ2CPU meter because I liked that. Even the menu functions I build in the new software.

In first instance I used the sketch of Joost Breed because he uses the average of a lot of measured samples in a second to display the power.  That gives an accurate and stable display as well.
Secondly I added a calibration method to calculate the SLOPE and INTERCEPT by two measurements on -10 and -40 dBm. By this method you get a much accurate measurement over the complete dynamic range. For details please read the AD8317 datasheet. The calibration is done for 8 bands (HF, 6m, 2m, 70cm, 23cm, 13cm, 6cm and 3cm) and the calculated SLOPE and INTERCEPT is stored in EEPROM.

The menu function gives also the possibility to set an attenuation value (0 – 50dB) and is stored in EEPROM as well.

Menu functions:
– Set attenuation to 0, -10, -20, -30, -40 and -50 dB  (stored in EEPROM)
– RF Power meter (default function)
– Calibration -10 and -40 dBm for each band  (stored in EEPROM)
– Read calibration data
– Zero All Calibration data (Reset calibration)

Calibration procedure

  • Select the band you will calibrate
  • Push the Menu button
  • Select Menu item 7
  • Set your RF generator to -10 dBm
  • Push the Select button
  • Set your RF generator to -40 dBm
  • Push the Select button.
  • Calibration completed.

 

Hardware:
As you can see on the picture below the hardware is pure and simple..  It consists of (from left to right) the 5V power supply, the Arduino Nano, the AD8317 module and a 2×24 character module.
For the 2.048 Volt reference you can use every reference chip you like. Some parts do need a serial resistor, some do not.

Insight view