Digital SWR Meter
Calculate VSWR from Forward and Reverse RF Power
DIY Inline RF Power & VSWR Meter
RF Power & SWR meter with Average and Peak
Overall this is an accurate meter, fantastic for a meter under $20, good performance across the HF bands using fairly common parts and simple construction techniques.
The Inline Power and VSWR meter is a valuable tool for the antenna builder and transmitter testing. I started this project as a bench meter to use when I was building a transmitter drive input. The idea to build an inline power meter came out of need rather than inspiration. The design is customized for accurate QRP power levels. Read on for detailed information on how forward and reverse power meters work.
The Stockton bridge circuit is selected uses a fixed 50 ohm reference loads. This is a very simple circuit just a forward and reverse set: current transformer, a diode, resistor, filter capacitor and connectors. RF is passed in one connector and out of the other to some unknown antenna impedance. The transformers feeds a fraction of the RF current passing to the respective forward or reverse resistor. The sampling fractions, usually is proportional to the square of the turns. Example: using 10:1 turns would see 1% of the RF current at the reference resistor. Current ratio is proportional to the ratio squared. The little Arduino Nano uses the forward and reverse DC voltages to calculate RF power and Voltage Standing Wave Ratio. See "Decide on these options before you build" for resistor information.
Meter and RF Sensor Wiring Diagram
Meter Prototype operating on Battery
The prototyping breadboard is a good way to test everything while
the connections are easy to get to for trouble shooting prior to installation inn enclosure.
How does it work?
Working with one Watt output transmitter and didn’t have anything suitable for measuring under five watts and nothing with a meter that would wiggle a one watt.. At first I just measured the RF at the dummy load with an oscilloscope. I new one Watt of RF peak to peak voltage on a 50 Ohm load is about 20 Volts. Even at 10 Watts the voltage is only 63 Volts. So for a while I could adjust my bias levels, peak my output and check for clipping. This was fine for QRP, but it was tying up my scope and I only needed the peak voltage of the RF envelope so I setup a rectifier and a digital volt meter to get the same answer. I setup a dummy load with a coax tee adaptor, a short test lead to PCB holding an RF diode, filter and banana plugs to a digital volt meter, shown here.
Temporary Bench Test RF Power Monitor
Voltage - Wattage Spreadsheet
The DVM method worked but, I was spending too much time calculating watt values. The next problem I faced was a power increased the peak reverse voltage (45 V) of a 1N34 diode is reached at just five watts. I could switch to a 1N270 diode or go back to the oscilloscope for higher voltages, but I wanted a Wattmeter for my bench work. It didn’t need 1% accuracy, 5% would be good enough. I found some readymade QRP meters the power range, but I never have liked adjusting for forward power and switching to read SWR. I wasn’t keen on buying one of those BIG face meters and the digital ones cost even more, nothing seemed to fit my purpose and budget. I continued on for some time using a spreadsheet with the voltages (Vpp, Vp, Vrms) and wattage something like the one shown.
It only took me a few days to get tired of having to change screens on a laptop just for a wattage spreadsheet to grow weary. I had a peak voltage value and wanted a wattage answer, so decided to temporally reprogram a homebrew Arduino based keyer sitting on my bench. Just attached clip leads to the pins. Then a few lines of software and resistive voltage divider (to protect the A/D inputs) for the diode voltage. Some of you are ready to stop reading at the idea of software, but you can multiple and divide using a calculator or a spreadsheet you can work with the Arduino. The Arduino microprocessors are not much smarter than a calculator, they just don’t mind do the same thing over and over again. There you have it, inspiration out of necessity. It was not pretty but it was a wattmeter for my bench work was born.
The sampling circiut I built is based on a Stockton Bridge. UHF Coaxial (SO-239) chassis connectors are mounted on opposite faces of a metal box. The RF sensor is a Stockton bridge directional coupler, it turns the forward and reflected power into voltage levels that can be translated into power levels. The current through the line is sampled with the aid of toroid RF transformer windings and applied to termination resistors, The power levels on the termination resistors are proportional to the input power divided by the square of the toroid turns ratio. Diode detectors are connected to the termination resistors to convert the bridge outputs to dc levels, see the Stockton Bridge Circuit diagram shown below ;
Stockton Bridge Circuit diagram
Understanding how the Stockton Bridge works and why antennas have forward RF power and reverse RF power (reflected back) is the stuff college text books are better suited. You will find dozens of homebrew SWR meters based on Stockton’s design by searching on Stockton Bridge circuit or G4ZNQ. I have found two extremely good mentors on YouTube I toughly recommend; David Casler KE0OG has a great video on understanding SWR ( YouTube KE0OG link ) and Alan Wolke W2AEW has a detailed demonstration on the Stockton Bridge ( YouTube W2AEW link ). To know more about HAM radio I recommend you check out all of Dave Casler’s videos for hands on information and Alan Wolke’s videos for details how radio related equipment works.
The bridge is constructed using Single-sided PC board (glass-epoxy material recommended) as a double-sided board would introduce capacitance. The copper shield (red) is optional at HF but only connect the shield at one end. I made my own board shown to the right, one inch square to mount the resistors and diodes and connections for the windings. The capacitors are at the 3.5 mm connector terminal pins to keep RF inside the box.
Bridge Circuit on Circuit Board
Getting from Voltage to Power
The termination resistors provide the bridge forward and reverse power outputs to dc levels, Voltage Peak (Vpeak) level to be exact. The Arduino analog to digital converter compare the Vpeak then computers do all the math. It is important to understand you start with peak and convert to RMS to find the actual power. The Arduino Nano uses a 5V default reference for the digital converter. The resistor voltage does not include the diode voltage drops of about 0.3 V for a 1N270 and the drop is corrected mathematically in the software program. Resistor Voltage Peak = Arduino Steps X 5 Volts divided by the A/D value for 5V then add the diode voltage drop.
Resistor Voltage Peak = Arduino A/D Steps X 5 Volts / 1023 then add the diode voltage drop
The resistor voltage does not include the diode voltage drops of about 0.3 V for a 1N270 and the drop is corrected mathematically in the software program.
Resistor Voltage Peak = ( Arduino Steps X 5 Volts / 1023 ) + 0.3
Resistor Voltage Peak is now known, however the Voltage Root Mean Square (Vrms) value is what is needed to know the voltage required to dissipate that much power in the termination resistor.
Vrms = Resistor Voltage Peak X 0.707 X toroid turns ratio
I considered multiple power ranges and decided not build in a power range selector switch as I find it is only a matter of time before, OOPS wrong range! Buy a new meter! I try not to repeat my costly mistakes. The calculations shown below apply to a circuit using transformers with a 13:1 turn ratio. Typically 10:1 turns ratio is used for low power and more turns at higher power in the bridge circuit. I picked 13:1 turns ratio as it was easy to wind on a small toroid and a middle range, low enough to measure 1 W and only consumes 0.5% of my forward power. Other designs for higher power use greater turn ratios as they develop much higher voltages that would exceed the 5 Volt maximum input of the Arduino.
Resistor Voltage RMS = Resistor Voltage Peak X 0.707 X 13 (turns ratio)
Amps = Resistor Voltage RMS / 50 Ohm Termination Resistor
Amps = [ Steps X 5 ) / 1023 ) + 0.30 ] X [ 13 X 0.707 / 50 ]
Amps = ( ( (Steps X 5) / 1023 ) + 0.30 ) * 0.18382
Amps = Steps X 0.000898435972629521 + 0.055146
Power = Resistance X Current Squared
Power = 50 Ohm X Amps X Amps
Use the forward and reverse power to determine VSWR
p = SQRT ( Power Reverse / Power Forward )
VSWR = ( 1 + p ) / ( 1 – p )
Decide on these options before you build
Select these components based on RF power range
You can use 43 or 61 Material at HF without problems. The size is not critical as the power levels in the toroid are tiny. I used OD 0.6 Inch, ID 0.3 Inch which I found are just enough for turns to wind and leave room for the feedthrough.
The windings are made from two 18-inch lengths of #26 AWG wire (#24-#30 will work) with insulation rated well above range: 25 W ~ 100Vpp. Higher power designs use greater turn ratios as they develop much higher voltages.
Diode circuits have a diode forward voltage dropped across a current-conducting diode that changes with a small amount of current going through it and levels off. Most simply say the voltage drop across a conducting, semiconductor diode remains constant at 0.7 volts for silicon and 0.3 volts for germanium. The circuit needs to use a 1N270 for low power accuracy. Many diode based meters require more than five or ten watts at a minimum for operation to address this drop. This meter corrects for the voltage changes with a software correction for drop vs. current at low power.
Testing 40M, 30M, 20M, 17M, 21M for 1 to 25 W gave accurate results within +/- 0.5 W. At higher frequencies testing for 12M and 10M was less accurate with + 0 to - 1.5 W results. Errors are a few tenths blow 3 W based on my tests. You must use matched germanium diodes for accurate power and VSWR readings.
The resistors used in this meter must be carbon film. Carbon film are stable at HF and low power relative to their values. Two 100 Ohm 1% resistors are used in parallel to get an accurate 50 Ohm reference. Wattage depends on power range, (examples; ¼ for 25W). The series 10K resistors are terminations to protect the A/D inputs from overvoltage damage. Higher power designs change the toroid turn ratios to control the voltage range.
Enclosure for Stockton Bridge
The inline bridge enclosure provides protection from high voltages. I recommend a metal project box over plastic as it also provides RF shielding. The RF feed through can be a single conductor which is fine at HF. At 2M and up a few inch length of RG-58 coaxial cable but it is important the shield braid is grounded at only one end. Another method is to remove the outer insulation and shielding braid from the center one inch that passes through the toroid. The coax braid serves as a Faraday shield to discourage unintended capacitive coupling.
Inline Bridge Circuit in Enclosure
The ground for the PC-board and SO-239 connectors are soldered to one common copper buss to ensure conductivity. Past projects have had intermittent connections due to zinc, chrome, copper, and aluminum interactions over time that are not always overcome by star washers. I used a 4.5 X 2.5 X 2 inch Die Cast Aluminum Box with cover as it was the smallest I had that would permit inside mounting of the SO-239 connectors. Most cast or bend aluminum box will provide shielding to keep you RFI under control.
LCD 5X7 Matrix Displays
The Liquid Crystal Display shown is a blue and red 4 Line 20 Character LCD Module with a backlight and IC2 serial link. If you are an Arduino beginner, I have listed the specifics below. If you have used other LCD displays editing the code for your display should be simple.
20 Character X 4 Rows LCD Driver for Arduino Liquid Crystal displays based on the Hitachi HD44780 chipset, which is found on most text-based LCDs.
Serial Interface: I2C Address: 0x26 Pins : GND?VCC?SDA?SCL
Back light (Blue with White character color)
Supply voltage: 5V
Size : 60mm×99mm
Contrast: Potentiometer Adjustment
When you have finished transmitting the display will continue to display the “Transmitting” data with zero watts for a small delay before displaying the “Average/Peak” data. The code values are loaded with typical SSB values (averaging periods & delays) to allow for the dynamic modulation. You find comments in the code that should help you in customizing the meter to taste.
Average and Peak Display
Use the Arduino Nano based on the ATmega328 (Arduino Nano 3.xx). If you have used other Arduino processors editing the code should not be problem. You must use a 5 volt reference or modify the code/hardware to match your design.
Enclosure for Display & Arduino
I used a 5 X 3 X 2 Inch ABS plastic enclosure just big enough for the display and switches on the face. You should consider more space if you are using a battery for power. I mounted a female 2.5 mm power connector on the rear panel for connection to the remote power supply.
Series Regulator Power Supply
I use a simple series regulator for my 8V shown here and any wall plug power supply from my junk box. The LM7808 is a three terminal positive regulator. I have found a heatsink is not required with the TO-220 package.
Power Supply Choices
The power supply needs to supply 8 to 12 V @ 60-80 mA for the processor and back-lighting of the LCD display. The Nano has a built-in regulated 5 V output for the display. Since the power requirements are small, less is better in this case as the higher voltage requires more heat to be dissipated in the Nano board. Battery operation will require a AA battery 6 pack for a reasonable operating time like you would expect from a portable radio. I tried a 9V battery but it will only work for 20 minutes, just too much power drain in the display. If you want battery operation and are up to rewriting software for a 2 line LCD 1602 display will run 15 hours on a 9V alkaline battery.
Item Description and Comments
Arduino NANO ATmega 328 Rev 3.xx
LCD Display 20X4 Serial IC2 See text discussion
Toroid #61 Material OD 0.6 Inch, ID 0.3 Inch, See text
Diode 1N270 RF germanium diode with small voltage drop See text
Inches #26 AWG Dielectric Windings depends on max watts (longer if you need more turns)
Reference Resistor 100 Ohm 1% Carbon Film See text
Capacitor 0.01 uF Ceramic 50V
A/D Resistor 10K 5% Carbon Film ¼ W Termination not critical value See text
Power Supply 8 to 12 VDC Battery vs. Power Supply, See text discussion
Bridge Enclosure Metal Inside ~ 2 X 2 X 4 Inches, See text discussion
RF Connector SO-239 Chassis Mount
Display Enclosure Plastic Inside ~ 2 X 4 X 6 Inches, See text discussion
Signal Cable Stereo 3.5 mm Male to Male Audio cable, length 3 to 25 Ft
Signal Jack Stereo 3.5 mm Female Chassis Mount
Hookup Wire #24 to #30 AWG Color coded wire helps prevent mistakes
Warning on "See Text" items; these component values are based on maximum RF power
Trust but Verify!
Looking at the example case of 9 Watts RF forward measure the voltage in the cable from the Stockton Bridge using a DVM verify the tip to shield is 2 VDC. Using a 1.5 VDC source (single cell flashlight battery) apply positive to the Display/Arduino Nano input tip and negative to the shield. You should read approximately 5 Watts forward power on the display. The calibration table shows a range of common values for testing. DO NOT EXCEED 5 Volts! DO NOT REVERSE POLARITY! You will distroy the Arduino Nano. When using the Arduino Nano the reference voltage will default to the onboard 5 volt reference that varies +/- 1/10 volt resulting a small wattage error. A extra 1/10 V will make the 2.5 W look like 2.8 W or 31 W be 32 W. This is not a fault in Arduino, the same error is found in the standard LM7805 series regulators. The typical 3 digit DVM has similar errors so unless you have a calibrated references these small errors are within expected tolorence.
*Note: Wattage approximate, good for typical DVM,
see voltage reference discussion.
I did not anticipate when I built this meter how well it would worked on the air and has proven to be a useful test instrument. I use one on my bench and later built one into my tuner. When I transmit SSB the averaging keeps the reading meaningful although averaging does nothing on CW. Even with the variations in reference voltages and diodes I have found the accuracy is better than +/- 5% from 3 to 30 Watts on a dummy load.
Overall this is a accurate QRP meter, fantastic for a meter under $20, but under 1/2 Watt here is something I noticed and most will never see is the power is over stated my power below 0.5 Watt. Not bad considering 5W is the minimum for most designs. This means the meter will show 0.4 W when it is actually 0.3 W but this is a limitation of the diode voltage drop correction in the software. For more details on accuracy see the Diode Selection discussion.