Skip to content
K7MDL2 edited this page Jul 27, 2020 · 35 revisions

RF-Power-Meter (aka RF Wattmeter)

Arduino or PSoC5LP based RF wattmeter with optional Python based remote monitoring and control desktop app. OLED screen and/or Nextion Touchscreen is optional. Release V2 issued July 2020.

Build your own RF milli-wattmeter for HF though microwave frequencies with low cost off the shelf modules and some glue wiring and a box. See Wiki page for System Components listing with source links and approximate costs.

Version 1.0 RF Power Meter code runs on a M5Stack (http://M5Stack.com) Arduino CPU module.

V1.02 added support for running headless on the Arduino Nano, added external ADS1100 16bit ADC for M5stack. Ported to Cypress Semiconductors PSoC5LP CY8CKIT-059 dev module (~$10 each) with a high quality internal 20bit AD converter for lower noise and higher accuracy in similar form factor as the Nano. An external I2C connected ADS1100 or ADS1115 module can be used with any platform, for the Arduinos it will improve performance compared the lower resolution and usually noisy Arduino internal AD converters. Added a Python Desktop app for remote config and monitoring. Added OLED and Nextion screens support to the PSoC5 version.

Optionally leverages WSJT-X status message UDP broadcasts to read the radio dial frequency and automatically command the meter to load the appropriate calibration values (10 bands supported). Using the awesome Python library to decode WSJT-X packets and is found at https://github.com/bmo/py-wsjtx.

This GitHub Project Wiki has several pages covering build, setup, and operation of the RF Wattmeter and the app. You should see the pages listed on the right. The newest features are on the PSoC5 platform followed by the Arduinos as time permits.

A web page with additional info on this project can be found at https://k7mdl2.wixsite.com/k7mdl/arduino-rf-remote-wattmeter

Here is the assembled M5Stack system minus the dual directional coupler:

Here is a screen snapshot of the companion Remote RF Power Meter application

Here is a 2.4" Nextion touchscreen version driven by a PSoC5LP with 20bit internal ADC. 2.4: Nextion with PSoC CPU, ADL5519 Detector, USB hub, 5V power 2.4" Nextion screen PSoC version in box.

I plan to enable wireless data connection in a future version. Remote commands and monitoring remove the requirement for a local display screen enabling this to run on simple inexpensive Arduino boards for lower cost, simpler packaging and remote placement of the detector and CPU. Enabling wireless will be that more compelling for remote placements.

The meter features 11 “Bands” or sets of calibration values. Each set contains Band Name, Forward and Reflected Port Coupling Factor, slope and intercept numbers. The coupling factor is a value in dB representing the coupler port’s coupling factor plus any added attenuators and minor cabling and detector related variances at a given frequency.

Direct Band changes (11 bands) are possible using serial port 1 byte commands in addition to emulating the hardware buttons to change Band, Scale, SWR. Saves a lot of time cycling through 11 bands. Since this is VHF and microwave focused in my default config provided the first band is HF and is mostly a place to park the meter when the coupler is not connected. Most HF radios have SWR meters so I have focuses on VHF+ bands where off the shelf SWR meters are hard to find/afford/use at high power and UHF+ frequencies.

RF power detectors: 2 Log Power Detectors (2 single one 1 dual) are used with their outputs fed to the ADC input of the CPU module. They connect to a coupler of your choice. You could likely also use RF detector outputs built into some transverters and amps, or diode based detector designs (such as from W6PQL or W1GHZ).

I started this project using a pair of AD8318 based imported modules commonly found online. They are under $10 each these days. It covers up to 8GHz, might work well enough to 10GHz, I have not checked yet. You could use any RF detector as long as you stay within (or scale) the limits of your CPU's ADC input voltage spec. My latest hardware builds are using a ADL5519 dual detector rated for 10GHz. It is 2 AD8318s on the same chip. The current version now has a commands to calculate slope and intercept for any detector, inverted or not. The AD8318 outputs an inverted voltage curve between 0.5 and 2.2VDC compared to the AD8307 600MHz detector which outputs a normal rising slope voltage from 0 to 2.XVDC with rising power input level. Beware some Arduinos and other CPU ADCs may not read accurately at the extreme ends of the their ADC range. The 0.5V offset in the AD8318 type detectors avoid this problem.

The first version I built was based on the M5Stack CPU module. The detectors is external in a small metal box to house the detector module(s), includes 9V and 5V regulators, and is powered from 12V. The 5V is powered from the 9V to reduce heating and is used to supply the power to the M5Stack Arduino via the USB port. You could put the Arduino in the same box as the detector to save cabling and cost. That will be the case for the headless version planned (future). In later builds I used the PSoC5 dev module CY8CKIT-059 with OLED and Nextion LCD graphic displays (2.4" and 3.5"). The detector and CPU are in the same metal box with a 12V and USB connection. The display is 2 wire serial plus GND and +5V so can be remoted over some length of 2 pair shielded cable, say from near your RF cabling to your station desktop. Again, no display is required as the Python Desktop Remote monitor and Control app can replace any local screens. You can use all at the same time if desired.

RF Remote Power Meter application: The RF Remote Power Meter companion application is a small GUI display app that monitors the Power Meter USB serial data information messages. The typical message contains the Meter ID, a sequence number, Band Name, Forward Power, Reflected Power, a SWR value. The data values for both forward and reflected power are sent out in dBm and Watts for convenience. Other message types exist for dumping the cal table and certain status messages such as cal start and end. A configuration screen handles power cal for each band. Simply apply a RF carrier at 2 known power levels (one hi, one lo) and the CPU will calculate the calibration numbers at at that frequency. Do this for each band you will use.

One simple feature of the app is to turn the SWR value field background red for SWR value > 3.0 (or any number you want in the script). If using WSJT-X the app will automatically change the Power Meter’s calibration set to match the current radio frequency band. Otherwise there are manual band buttons in the app to change the meter’s current calibration set. The Python script code contains lots of usage and configuration details in the comments at top of the file. If using the Nextion graphics screens, there are similar controls for most config and calibration operations. The Nextion screen now features power and SWR graphing and voltage and temp setpoints for additional parameter monitoring in usage scenarios such as station power monitoring or embedding into a high power RF amplifier chassis.

Snapshot on 432Mhz with a well matched antenna

Sample on 1296 with a not so good antenna match. Over 3.0 and SWR will turn to RED.