Digital SWR and Power Meter

This module is an analogue and digital SWR and power meter/monitor, designed to replace analogue SWR and power metering in an AM Transmitter project. Of equal importance was the ability to detect high SWR and raise an interlock (a control line) to inhibit transmitter power in the presence of unreasonably high SWR. I make no claim to either SWR or power accuracy; my version is an indicative tool and an interesting experiment, not an accurate test equipment, although it could be made into same with some skill and patience.

Various couplers could be used in a module such as this. I built the Bruene Bridge directional coupler described in ‘A PIC16F876 based, automatic 1.8 – 60 MHz SWR/WATTmeter‘, a project from “Il Club Autocostruttori” of the Padova ARI club‘ by IW3EGT and IK3OIL. Each coupler type has its own strengths and peculiarities. All are fairly similar, all will require some effort to calibrate, depending on how fussy you are.



The Arduino script is here.


Calibration has always caused me some frustration with these kinds of meters. SWR is easier than power because it is a ratio and the absolute values don’t matter so much (within a certain range). However, power is an absolute value which you have to determine by mapping arbitrary milliVolt readings into an absolute power measure. There is no logarithmic detector such as an AD8307 between the coupler and the Arduino in my module, and I didn’t want to add one, so I came up with an approximation in software.

I used the forward and reflected milliVolt readings and the corresponding RF power level (as measured from the transmitter into a load using a ‘scope) and mapped these pairs (milliVolts, power in watts) into an approximation using an online curve fitting calculator. I coded the resulting expression. It gives power readings within 5% in the range 10 to 100 watts which is good enough for my transmitter project.


This design is primarily intended to be used to detect high SWR and raise a control line in an AM transmitter project — it is not a precision instrument. It is not even particularly accurate. SWR and RF power meters have a long history and there are many fine examples available, I strongly suggest you look around to find one that suits your exact purposes. OZ2CPU has a nice QRP power meter although you will need to either use his PIC and firmware or find a script of your own for an Arduino MCU. And for a really high performance option that is fast enough to double as a monitor scope, see this project from TF3LJ.

Note that the time taken to detect and raise this interlock is dependent on several factors including the processing speed of the Nano; it is in the 10s of milliseconds range; this may not suit or even protect your transmitter!

I added a few features to the code. The displays dim after a configurable period of inactivity. The ‘High SWR’ interlock resets when the SWR drops below the threshold. Analog reads from the forward and reflected coupler ports are buffered and averaged. And all of the constants in the scrips are #define‘d for convenient configuration.

Comments, feedback, improvements, stories welcome.

Tagged , , ,

10 thoughts on “Digital SWR and Power Meter

  1. vk3kr says:

    Very interesting and thoroughly described video, Paul, particularly your method to calculate and display the relationship between the forward and reverse power measurements. I didn’t know those tools existed! 73 David VK3KR


    • Paul Taylor says:

      Thanks for commenting David.

      A better approach to the power meter might have been to order and wait for an AD8307 logarithmic detector. However I didn’t have one and it was lockdown. Additionally the power meter was a bit of an afterthought as the SWR detector was the main objective. So without a true logarithmic power detector it was necessary to find a way to do an approximation in firmware!

      73 Paul VK3HN.


      • kb1dzf says:

        Paul, First thanks for the post and info!! I am thinking of a similar meter, though I am going to add “data logging”.
        Can you expand on your comment using the AD8307? For just the forward power? Or both the reflected and forward? Still using the Bruene Bridge?
        Thanks, 73.
        Phil – KB1DZF


      • Paul Taylor says:

        Hi Phil, Thanks for commenting. My meter works fine as an SWR indicator, as SWR is a ratio, independent of the power . But an RF power meter must display the actual power level in absolute terms. My meter uses measurements or known data points, then extrapolated for all others based on a best fit expression, obtained using a handy online tool. Power is logarithmic but my diodes are not. So the power range that can be read by this meter is limited. And that’s exactly what I see. It works,well in the range 1..150 watts, then fmgets stuck there, as the diodes hit an upper limit. This is OK for my use, but in a general purpose RF power meter you might want it to go higher.
        An 8307 is a logarithmic power detector that will handle the logarithmic power curve. It can be found in most DIY RF power meters. Search for some examples and read about them.
        Good luck with your projects!
        73 Paul VK3HN.


  2. Don McGrath says:

    Paul: It is your cousin, Donald McGrath.please email me.


  3. Deden says:

    // calculate SWR
    float swr_f = (float(fwd_mV) + float(ref_mV)) / (float(fwd_mV) – float(ref_mV));
    swr = swr_f * 10.0;
    is this formula correct?
    because i simulate in proteus, for swr it stays 1.0


    • Paul Taylor says:

      Hi there, did you get that from my code? If so, then about all I can say is, that’s what I used, and it worked for me. Easy enough to build it, then see what SWR a dummy load indicates. If you are simulating this, you are probably way ahead of me!


      • Deden says:

        I’m a beginner sir. in the Arduino world. it’s just that I simulated your article on proteus, to minimize the cost of the experiment. then it means I still failed. And sorry if I offended you


      • Paul Taylor says:

        Hi there, no you didn’t offend me at all, I am happy to be corrected, if you’ve found a problem with any of my code or schematics I am happy to hear about it. I can see Proteus is an embedded simulation environment, if the simulation doesn’t work there may be a problem. What DC voltages did you use on the simulated analogue IO ports? Happy to discuss further as you wish 73 Paul VK3HN.


      • Deden says:

        i use dc voltage in proteus (battery) for analog io inputs (fwd and Ref).
        because my assumption is that the output of the transmitter(fwd/ref) will be converted to DC current with a diode. therefore I simulated in Proteus for the source code that you made. for watts (power) can change, by changing the value of the resistor from the battery to the io input pins and the resistor from the io input pins to ground. but for swr it doesn’t change, that’s why I ask you whether the formula for calculating swr is correct?
        sorry if my assumption is wrong.
        I am a beginner in the world of electronics and amateur radio.
        73 YD1HDD


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Shack of VK2KMI

Ham Radio Blog of VK2KMI

Ham Historian

A passionate amateur looks at Melbourne history


My journey of repairing and recycling anything I put my hands on that I believe is still useful. Not just hardware, but including software with relevant content and issues in the field of Cyber Security, Vulnerability Scanning and Penetration Testing.

G4YDM Ham-Radio and SWL news

Radio craft, homebrew, QRP/SOTA, AM

Amateur radio experiences with VK1DA

Tj Lab


The Microscopic New Yankee Make Shop

Bits of technology and illogic by WA2MZE

Paul Gacek



This blog is no longer in use!

%d bloggers like this: