DK1MI.radio

Remote Power/SWR Meter

This WT32/ESP32 based project, combined with a directional coupler setup, allows you to remotely monitor the output power and SWR of your station via a web browser.

It reads two voltages which are supplied by the directional couplers. From these, the respective power is calculated with the help of a calibration data table to be created by the user.

Credits for helping me with the directional coupler setup, software testing and feature ideas go to Matthias DD1US.

DK1MI.radio

Preconditions

Hardware

The following hardware is needed for this project:

My implementation consists of the directional coupler, which i took from an old swr/power meter:

DK1MI.radio

DK1MI.radio

After removing it from the enclose, it needed some shielding:

DK1MI.radio

It fits perfectly into my favorite 5€ project box (Donau Elektronik - KGB15 Euro Box klein, Blau, 95x135x45) with custom 3D printed face plates:

DK1MI.radio

The wiring has been done according the diagram further below.

DK1MI.radio

Software / Libraries

Downloading and Configuring the Arduino IDE

The following steps are needed to be able to compile and upload the code:

Downloading the Software

DK1MI.radio

Programming the Board

DK1MI.radio

Connecting the Board to the Directional Coupler

DK1MI.radio

Please note that the two pins IO0 and GND only need to be bridged during programming. Open the bridge again after programming.

Configuration

Please adapt the following code blocks in the file wt32powermeter.ino to your needs:

Network Configuration

ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER);

// Static IP, leave without this line to get IP via DHCP
//ETH.config(myIP, myGW, mySN, myDNS);

WT32_ETH01_waitForConnect();

By default, wt32powermeter is configured to dynamically get assigned an IP address via DHCP. If you are happy with this, no actions are needed. If not, uncomment the line ETH.config(myIP, myGW, mySN, myDNS); by removing the two slashes at the beginning of the line to have a static IP configuration assigned.

Please define the desired network configuration in the following code block:

// Select the IP address according to your local network
IPAddress myIP(192, 168, 1, 100);
IPAddress myGW(192, 168, 1, 1);
IPAddress mySN(255, 255, 255, 0);
IPAddress myDNS(192, 168, 1, 1);

Selectable Bands

To add or remove bands, find the following code block:

String band = "";
String default_band = "70cm";
String band_fwd = band + "_fwd";
String band_ref = band + "_ref";
String band_list[] = { "1.25cm", "3cm", "6cm", "9cm", "13cm", "23cm", "70cm", "2m", "HF" };

Add/remove bands from the band_list[] variable and set your desired default band with default_band.

Accessing the Web Interface

Open your favorite browser and navigate to http://YOUR_IP_ADDRESS, for example http://192.168.1.100.

The IP address is either the address you’ve defined above or a dynamically assiged address. To find out the latter, you might want to log in to your router and look for a dashboard that shows all current connected network devices.

Usage

The first step is to configure your connected directonal couplers by clicking “Configuration” in left side of the page footer.

DK1MI.radio

Calibration Data

First, select the band you want to configure via the top right dropdown box labeled “Band”.

Please ignore the actual values of the calibration data. These values have been used for debugging purposes. You need to find your own values for your setup. Enter here the mV:dBm value pairs for FWD and RED and click “Save Calibration Data”.

You can enter your data in any line, there is no need to manually sort the value pairs. After saving the data, it will be automatically sorted and correctly displayed.

Here is how peformed the calibration in my environment:

General Configuration Items

The following general configuration items are available to customize the application:

After you are done with the desired changes, click “Save Configuration”.

Warning / Disclaimer

This software contains no security mechanisms at all. There is no input/output sanitization/validation in place. Furthermore there is no authentication or authorization mechanism implemented. Any person/system inside the network is able to access the application, read and modify configuration items, gather information about monitored devices.

DO NOT MAKE THE APPLICATION PUBLICLY AVAILABLE! DO NOT EXPOSE THIS TO THE INTERNET.

If you feel uncomfortable using the software as it is, you are more than welcome to contribute, improve, submit PRs etc.

Thank you for reading! If you have any comments or questions, please send me an e-mail.

#Arduino #ESP32 #Ham Radio #Remote