Sept 15, 2015:
Revised: v1.0

A Small Digital QRP SWR Meter with OLED Display

Thin 0.96" 128 x 64 pixel high contrast OLED LCD displaysat good prices led me to design and build this compact QRP SWR meter. 


Standing Wave Ratio (SWR) meters are built into most modern transceivers. However, for those of us who build their own equipment, it's useful to have a compact standalone SWR meter.

SWR meters measure the impedance match between a transmitter and the output load. If the load differs from the reference impedance then ‘standing waves’, i.e. peaks and drops in RF voltages, will be present in the transmission line between the transmitter and the antenna. The ratio of the peak to minimum RF voltage is displayed on the SWR meter, referenced to the transmission line’s characteristic impedance, usually 50 ohms.

Figure 1 : The SWR meter is located between the transmitter and the antenna tuner

Transmitter-antenna matching is a complex and controversial subject. However, most accept that transmitters operate best when the power output is connected to a load which presents an SWR below 2:1. For example, 100 ohms, 25 ohms, or a reactive load such as 35+j25 ohms.

In some cases, severe mismatching the output can result in damage to the transmitter output stage. Antenna tuners (one is described elsewhere on my website) are used to match an antenna’s impedance, sometimes outside of this notionally safe 2:1 SWR range, to a more suitable value.  SWR meters allow antenna matching to be measured, and so are often used to adjust an antenna tuning unit or matching network to the correct setting.

Inside SWR Meters

While SWR can be determined from measurements using an impedance bridge.  Several examples of impedance bridges - analog and digital - are described elsewhere on this website. Impedance bridges are typically standalone test instruments. They are seldom used with a transmitter or remain connected to an antenna for the long-term. By contrast, SWR meters are designed to be used  with transmitters and remain in-circuit.

Most SWR meters use directional couplers. Legacy directional couplers used parallel transmission line couplers. These used ‘forward’ and ‘reverse’ transmission line measurements to determine SWR. Most modern SWR meters use either the Breune coupler or the Stockton coupler. These measure voltage and current on the transmission line and phase differences across the couplers, usually using from one to four toroids, allow impedance, and thus SWR, to be measured.

Numerous versions of Breune and Stockton couplers have been published. Detailed analysis of the functioning of each coupler type can be found on the web and will not be repeated here.

Resistor-based bridge circuits can also be used to measure SWR, particularly for QRP (low power) applications. However, these have high insertion loss and, unlike directional coupler-based SWR meters, these resistor bridge types cannot be left in circuit while operating the transmitter for long periods.

Most couplers use simple diode detectors, many combined with additional op-amps for
buffering and compensation. A few more recent designs have adopted IC-based active logarithmic power detectors for better sensitivity and wider dynamic range.

For a variety of reasons, including simplicity, this design uses a Breune coupler and simple diode detectors

Transmitters range in power, and operate from LF to UHF. This meter is designed for use with HF QRP transmitters with output powers from about 3W to 15W which operate over the HF spectrum, from 3 to 30MHz.

Circuit Description

The schematic is shown in Figure 2. The Breune directional coupler consists of the toroid T1, which samples the current in the transmission line, and capacitors C2 and C3 which sample the voltage on the line. The current sampling transformer produces two anti-phase outputs at each end of R1. Along with the voltage from the C2/C3 voltage sampling, this arrangement allows ‘forward’ and ‘reverse’ power to be detected by the diodes (D1 and D2).

By the way, you must use germanium diodes in this bridge. I tried Schottky diodes and regular small signal silicon diodes, but they gave poor results in comparison to the 1N60 germanium diodes I was finally able to purchase. These other diodes are probably fine if you are using higher RF power, like 50 – 150W or more.

Figure 2 : The SWR meter runs from a single AAA battery

The detected forward and reverse voltages pass to two 10-bit analog to digital (A2D) converters inside the ATtiny45 microprocessor. The firmware in the processor then calculates the resulting SWR.

A compact OLED LCD is used to display forward and reverse power as well as SWR simultaneously on three bar graphs. This OLED display is a very thin 0.96” 128 x 96 pixel module with excellent contrast, ideal for both indoor and outdoor use. The simple I2C interface requires just two pins on the processor. That allowed me use the equally small 8-pin ATtiny45 processor.

In addition, a small icon in the lower left corner of the OLED display also reports the battery level. This is scaled to display from 0.9 to 1.5V. Based on extensive work reported on the well-known eevblog website [], 0.9V is a reasonable ‘end-of-life’ value for a 1.5V AAA battery. The battery voltage is measured via R5 (100k). This relatively high value is necessary to ensure the battery voltage does not keep the ATtiny45 in the reset condition on power-up.

A small 3mm diameter LED is connected to pin 6 of the ATtiny45. This is turned on by the software when the SWR is greater than 2:1. It allows faster tuning of an antenna tuner. The tuner is adjusted either until the SWR bar graph shows an acceptable value, say 1.5:1 if this is the value you prefer, or simply adjust the tuner until the LED goes out (i.e. SWR ≤ 2:1).

A miniature DC-DC boost converter module is used to boost the AAA battery voltage to 5V for the processor and display. This module is reasonably efficient, and reduced the overall size and weight of the SWR meter. With battery installed, the meter weighs about 50 grams.

Operating the meter from a 1.5V AAA battery increased the versatility of the SWR meter. These batteries are readily available, and it provides a reasonable lifetime in this design.

The SWR bar graph also features an expanded scale. If SWR was displayed linearly, then the most useful part of the display (from 1:1 to 3:1) would be displayed over just 30% of the scale.  Instead, this is expanded out to cover 50% of the meter scale.

Parts List

These are the parts you’ll require:

Table 1 : Parts list for the SWR meter

Just as I finished this meter, I noticed that the price for these OLED displays had surged in price, and were suddenly from 2 to 10 times more expensive. The usual Chinese suppliers were also reporting no stocks. A fire in the Chinese factory perhaps?


It’s built on a small piece of prototyping board. I began by winding the toroid, and mounting the parts for the Breune coupler. I could then test that section using a voltmeter to measure results. The diode detectors produced about 1.5V across the 1M resistors with 5W of RF.

I used phono sockets for the RF connectors. I can hear the screams of horror from readers over that choice. Feel free to use SO-239 or BNC sockets if you prefer. I could not buy those where I live, and without a reliable postal service, I couldn’t order anything more suitable. Anyway, this is only for QRP power levels, and phono sockets have proven OK for me. At some stage, I may rebuild it using BNC sockets.

The remaining parts associated with the ATtiny45 can then be mounted. I used a socket for the processor, and a four-way socket for the display. The OLED LCD came complete with a four way matching connector soldered to the  display. The small DC-DC module can also be added at this point.

If the ATtiny45 and display are left unplugged, almost all of the circuit can be tested including checking the supply voltage on pin 8 of the processor socket with the AAA battery installed. (It should be 5V +/- 0.5V)

Making the 3D Printed Enclosure

I also designed a 3D-printed plastic enclosure for the SWR meter consisting of an upper and lower half. I use the DesignSpark Mechanical software which I have found to be excellent. The connectors and switch fit along the case seam for a neat finish. The box measures a very compact 70 x 50mm, and tapers in height from 22mm at the back to 15mm at the front, roughly one-third of the volume of a packet of cigarettes.

Figure 3 : The 3D-printed enclosure includes an integrated AAA battery holder

I printed it using standard black 1.75mm PLA plastic. I used my Printrbot Simple Metal 3D printer (without heated platform) to print out the case. The required STL-format files are available for download below.

Figure 4 : The tapered enclosure is compact and robust when assembled

To make the battery contacts for the AAA holder, cut two 10mm x 4mm flat tin strips from a tin can. Solder a short piece of red hookup wire to the end of one strip and a similar short black hookup wire to the other. Slide each strip into the slots located in the ends of the battery holder. Adjust if necessary to ensure there is just a slight pressure on the battery terminals when the battery is in place.

Figure 5 : Battery contact details

The assembled circuit board can be placed in this enclosure, the battery wires connected as shown, and the top and bottom covers screwed together using two short M3 self-tapping screws. You will need to drill two 3.3mm holes for clearance for the two M3 screws that hold the case together.

The OLED display is carefully placed into the upper half of the case. A drop of glue can hold it in place. Be careful not to apply any pressure to the display. They are very delicate. Then close the case ensuring the display pins slide into the 4-way socket on the lower board.

The artwork can be printed out using a laser printer, covered with self-adhesive clear plastic film, and glued to the top cover. (The panel artwork is available for download below)

Programming the ATtiny45

All of the software is written in Bascom, a Basic-like language for the AVR processor family. To ensure the display is updated quickly, the OLED LCD screen is not completely updated every time some value changes. Instead, each bar graph (and battery icon) is updated, speeding up the display significantly.

I used a USBasp programmer to program the chip. Ready-to-use USBasp programmers can be purchased from any number of Chinese suppliers over the web, usually for less than $US3 delivered. Examples include Banggood (SKU064451 or SKU131560, for example) and Hobbyking (e.g. Part 381000147). Note: These part numbers vary periodically.

GUI software to drive the programmer is available (free) from various websites including Khazama and Extreme.

The ATtiny45 processor has flash memory, EEPROM, and “fuses”, all of which are programmable.  Flash memory contains the program. EEPROM can also be programmed by an external programmer (like the USBasp above) but is more typically used by the ATtiny, to save user-entered settings, for example.

The “fuses” save special parameters semi-permanently. These configure the ATtiny for its operation. That includes the clock oscillator configuration, reset timing, and so forth.

In this case, you will need to program the flash memory with a HEX file. This is the compiled Bascom software which is saved in an Intel-formatted HEX file. It’s available for download below. You will also then need to program the fuses in the ATtiny45 (The details for fuse settings are described in the source code)


Connect the SWR meter as shown in Figure 1 and turn the meter on. The battery icon should indicate the battery level.

Turn on the transmitter’s carrier. The output power should be less than 15W to avoid damaging the meter. The SWR meter should then display the relative forward and reverse power levels and the SWR.

Adjust the antenna tuner and confirm that the SWR LED goes out when the SWR is about 2:1 or less.
The meter may be left in circuit, either turned on or off, as required.

Figure 6 : The SWR meter in use with my 5W QRP transceiver displaying
a SWR of about 1.5:1 and a nearly 100% battery level


 Software for the SWR meter (including Bascom source code and HEX file)
Note: Fuse details are documented near the top of the source code

 Front panel artwork

 STL-format 3D printer enclosure file


Want to go back to the main page? Click here to return directly.