VK2ETA automatic L-match using separate arduino nano

John VK2ETA has uploaded an updated folder to the BITX20 IO Group list files section.   This adds new schematics for his Antenna Tuning Unit (ATU).

ATU Design objective

1. Fits in the limited space of my Jameco case (Jaycar case here in Oz), on my second level board.

2. Tunes long wire and EFHW (worst case with the help of a 9:1 balun).

3. Works 80m to 10M.

4. Memory tune to save power and time.

5. Negligible power consumption when not tuning.

6. Must integrate with the extra (planned) features like SWR measurements, Finals’ current limiting, and power supply monitoring, and more


John settled on using a second Arduino and an L-Tuner network despite some limitations when compared to T or Z-match networks that seem to require three adjustable elements for 80 to 10M coverage.

The 2nd Arduino has the following advantages: at around US$3-5 it is much cheaper than extra I2C analogue and digital I/Os, plus it gives another 30K of programming space and 1K of EEPROM for memory tuning. It can be put in low power mode when not tuning,  as John uses the Mini Pro version (no USB port), and communication is via the I2C bus to the Raduino.

John needed an SWR meter.  He chose the Don Cantrell (ND6T) circuit as a perfect match.  He made it on a daughter board that plugs directly into the connector after the LPFs.

Browsing the internet and looking at previous solutions like the SLT+ and the Altoid Long Wire Tuner, I settled on 6 inductance values.

Switching the inductance could be done with relays, but that means 5 bi-stable relays and ten digital outputs. Same issue with the variable capacitors.

I decided to use an RC servo controlling a mylar variable capacitor and another one controlling a rotary switch for the coils.

The first challenge was to have a way of switching the capacitor from the antenna side to the transceiver side to match both high and low impedance antenna loads.  One option was a bi-stable relay.   The solution John settled on was to use a double wafer rotary switch with 12 positions and dedicated 6 of them to the capacitor on the input and 6 on the output.

He needed two digital outputs for the PWM generation for the servos and one for cutting the power off to the servos (using a common positive supply).

His main concern was the possibility of the servos not handling RFI. But in the end they were easy to tame.

The next challenge was to find a servo that could do 360 degree rotation (or at least 345 degrees) to cover all 12 contacts on the rotary switch.  There are quite a few servos that manage 180 degrees, but he was unable to find one that did a full 360 degrees. Please note there are many so-called “360 degree” servos available but they are “continuous rotation” servos and do not move to a position, just rotate at a certain speed, with no position feedback.

The first solution he tried was to use a 2:1 gearing and a 180 degree servo. It worked but was not very reliable due to the additional backlash, even with a larger servo to compensate for the power loss in the gears.

Luckily there are now “Sail Winch Servos” available in 1, 1.5, 2 and more turns, but that retain a position control. John chose the 1 turn version, which worked successfully.  It is a “GWS S125 1Turn 2BB Sail Winch Servo”.

The key challenge he faced was to ensure that the servo would settle pretty much centred on the rotary switch contacts. The angular resolution of the servo is sufficient for this but he needed repeatability. Otherwise he would destroy the contacts through arcing.

Since John controls the supply of RF power to the antenna, he can cut the power off when he changes contacts on the rotary switch.   He used a digital input on the Arduino to measure whether the contacts had been established or not, and thereby form a map of the location of the contacts relative to the angular position of the servo. When the contact is established you should get a short to ground through the coils. A pair of 1 M Ohm resistors to feed the 5V and connect to the Arduino pin,  worked very well.

He  builds the contact map once, at first tune, and uses it thereafter until the rig is powered down. It may be possible to store the map in EEPROM, but stability over time and with temperature changes hasn’t been checked.

When the servo is moved from one contact to the next you can again check at what angle the contact is established or lost to compensate exactly for the backlash. A bit of software does this, and it works quite reliably.

John has shielded the ATU with sides made from PCU board to prevent stray RF.  Apart from the capacitor servo, which occasionally displayed small jitters, the rest did not really need shielding and worked quite well without additional effort.

The main components are:

  • Arduino mini pro or nano
  • Variable capacitor and micro servo’
  • Rotary switch 12 positions with two wafers (it could be one wafer and less positions and a bi-stable relay)
  • A “one turn sail servo”
  • a P-Channel Mosfet for servo supply
  • a 5V regulator dedicated to the servos’ power,
  • the components for the ND6T SWR and Power bridge.
John uses the following I/Os on the 2nd Arduino:
  • 4 digital I/Os of which 2 are PWM
  • two analogue inputs
  • the I2C (A4/A5) lines.

John found he had enough I/Os left for the other functions that he wanted to implement on the second arduino.

Performance: With a 21m (69′) long wire and a 10m (33′) counterpoise on the ground John found he coul  tune all bands ( 60M wasn’t tested, as VK still doesn’t have access to this band), with an SWR of under 2 at all times.

A full tune sequence takes 32 seconds if the matching coil is in position 12, and a memory tune is around 3 seconds. At first tune after power-up, there is an additional delay of 15 seconds for the rotary switch contact mapping process to complete.

Total parts cost is around AU$130 (US$100 approx.), but a lot cheaper in the USA and other countries I am sure and quite a few items could already be in the junk box.


1. A complete view of the unit with the shields in place. Also the Android hands free headset (with modified software for push-on/push-off PTT).

2. Second Board (double sided fibreglass as a ground plane, plus sections of vero board) with the MAX9814 AGC, the SSM2167 mic compressor, the ATU circuit and Arduino.

3. The back of the unit with the ATU toroids, variable capacitor (the angling is to align it with the servo’s angular range), the SWR/Power bridge. Note that three toroids are used to minimise losses and prevent high voltages since the unused turns are not shorted out as in some designs.

4. A top view of the coupling of the micro servo and mylar variable capacitor.

5. A top view of the rotary switch, toroids and the contact detection circuit.

6. The SWR bridge daughter board’s back with it’s female header to provide solid ground connection and mechanical rigidity.

7. Tuning completed . P = forward power, R = SWR …. front panel labels to come!

A critique  

John provides his own crritique of the design, now that is is completed:

  • the winch servo adds 50g plus coupling of around 30g, which is a fair amount of weight, but the total build is still under 2Kg at 1.25Kg or 2.8 Pounds.
  • a single bi-stable relay instead of the second wafer for switching the capacitor over may be a simpler solution, and leave more steps for the inductance.


John has now also provided the two parts of the schematic. Part 1, the L-Network:

And the Control part:

The software can be found separately.

Reference #1
Reference #2

Extensive VK2ETA mods to KD8CEC firmware

John, VK2ETA, has implemented a range of changes in Ian KD8CEC’s software targeted at portable operations (the software can be downloaded here in the files section of the BITX20 IO Group).

VK2ETA Software modifications to KD8CEC firmware

The scope of these modifications is described below:

Options for various features – These can be turned on or off. Key objective is to be able to customise the rig based on your needs and unfortunately on the restricted memory size of the Nano. So not all features can be selected at once. Choices, choices…

ATU control – A servo-based L-Network ATU. The communication between the Raduino and the ATU Arduino is via I2C. There is a separate sketch for the ATU Arduino (Nano or Pro-mini).   ATU operating mode can be set to OFF, Manual as in on-demand, or auto-RX meaning that it pre-tunes based on historical data on a change of band and after first change of dial frequency (for a quick scan of the bands). It uses the EEPROM data of the closest stored frequency for pre-tune or tune on-demand to accelerate the tuning process.

Handsfree microphone/headphone – Using an Android style 3 rings (TTRS) handsfree earpieces/mic combination, with 1 or 3 buttons (Play/Pause, +, -), the PTT is controlled by Play/Pause as toggle, and I use long presses on + and – as respectively pre-tune and smart-tune of the ATU. Short + or – presses could be used for frequency up and down. Requires a very simple hardware mod to free-up A6 (see below).

S-meter measure and display – using analogue input A7 from an 2N7002 based AGC or a MAX9814 circuit or any other for that matter.

Software based AGC range extender – to augment (as in double or triple) the dynamic range of an audio AGC. This uses the slope of the 1st If filter at 45Mhz to attenuate the Rx signal when the audio AGC reaches its limit. Adds over 50dB of dynamic range.

Forward power and SWR measure and display – Currently assumes that the ATU is providing that info over I2C. Otherwise could be adapted with a pair of analogue inputs for measure. See the excellent NT6D design on the wiki.

Options for displaying the S-Meter, SWR and forward power –  in either easy to see “fat” bars with no number, or “skinny” bars with more text and numbers.

Enable a “Memory mode” – selectable by menu, which cycles through all the populated memories (channels). Dial lock also locks the change of channels.

Made some rarely used or once-off functions as options  – to recover program memory after initial tuning and allow for more options to be selected.

Fixed some issues with the IF-shift option – Ian has resolved these in his new V1.06 and later releases. Two issues were present: IF-shift in USB would change the receive frequency and it was applied to TX as well. Now applies to Rx only.

Hardware modifications required to use VK2ETA software mod

The only required hardware mod is to connect the CW key input to the PTT. Since in Ian’s software we select the mode by menu, there is no need to have a separate analogue input tied-up for the CW key. This frees-up analogue input 6 for use by other functions like the handsfree option above.

Still to come

John plans to apply Ian’s improvements in v1.06, especially the CW transmit frequency option and if possible the WSPR beacon mode (as a further add-in option).

How to use VK2ETA software

Download the zip files, and unzip these in your Arduino sketches folder.  Edit the ubitx_20 options sections, using #define for enabled and #undef for disabled.

Perform a CTRL-R to compile and check how much memory is used. If you go over the limit, a warning is issued.  Providing you have enough memory to run the software, upload the sketch to the Arduino.

John has uploaded both the Raduino as well as the Arduino sketch for the ATU and SWR measurement. They can be found in the folder “Variations on Ian Lee’s Software (by VK2ETA) + ATU sketch”. 

All software is released under GPL V3.

Antenna Tuners for the uBITx

Introduction to tuners and tuning

Arv  K7HKL  suggests the type of antenna tuner depends on the type of antenna:

  • L-network for end-fed or high impedance antennas.
  • T-network for medium to low impedance antenna.
  • Pi-network for dipoles.

He suggests it is unfortunate that specifications for ATU’s usually do not include the adjustable impedance range for each band that they cover.

Bill Schmidt K9HZ suggests there is a false supposition here that you must tune under full power.   It is considered a good design to tune with just the amount of power needed in order to tune… not full power.  This can very easily be implemented on the uBITx with a relay that substitutes in a “Tune RV1” set for a much loser tune power.

List members suggested options for simple external antenna tuners for the µBITx transceiver.  The list of potential tuners below (organised by type) is not intended to be exhaustive, but illustrative of the choices available.


LDG Z100+

The LDG Z-100Plus tunes with only 100mW of power. It holds eight AA batteries internally, making it ideal for portable QRP operation. Small, light weight and self-powered.

However, Rahul VU3WJM found that the match at low power levels was inconsistent. He had to reduce the resistors in the ADC sample line for QRP operation.


From the marketing description, this unit handles up to 125 watts SSB or CW but requires only 0.1 watts to tune, making it ideal for QRP operation.

Elecraft T1

Manual Tuners

SOTA Beams Mountain End-Fed antenna tuner

Sotabeams Mountain End-Fed Tuner


Mike WA1MAD has built the Sota beam Mountain tuner.  He says, “It is easy to build, but very manual and only covers 40-17.”

Emtec ZM-2


Dave K8WPE likes the Emtech ZM-2 better as it has air variable capacitors whereas the 4SQRP uses poly variables.

4SQRP tuner

GQRP tuner

Dave K8WPE prefers a small Z match like the Emtec, 4SQRP tuner, GQRP tuner, etc.  At the home QTH, Dave uses an MFJ 300 watt roller inductor tuner.

He says that the reason he likes manual tuners is he can look at the numbers on the dials and if they are different from what he usually sees he knows he has antenna troubles, i.e. an antenna down, ice coated, wrong antenna, a short somewhere. With the automatic tuner it just tunes and you don’t know if its the antenna or the tuner that is making your transceiver happy. And even at 5 watts or less we can fry an IRF510.

Hendricks SLT

Allison KB1GMX suggests the ZM-2, 4Sqrp, SLT, and L-tuner all work.  The 4sqrp, L-tuner, SLT, and Elecraft T1 are in use in Allison’s QRP rigs for power up to 10W. For higher power a home-built L-tuner easily takes 100W. Those get used for the inverted L and the 160M Inverted V  as all the other antennas are 50 ohm resonant removing losses though a tuner and coax.

Allison says, “By far the best antenna is a matched one. Second best is any needing a tuner.”


An ATU mod from VK2ETA

The news item http://ubitx.net/2018/03/11/ubitx-modders-are-hard-at-work/ has flushed out one or two further modders.

John, VK2ETA, writes:

“For my part I don’t know if it’s hard code developer or more mad hacker, but it is fun.   Here is a picture of the latest addition, an L-Network ATU built in the uBitx case, driven by two servos and controlled by an Arduino mini pro linked over I2C to the Raduino.

“It is now working well (80m to 10m) but needs cleaning up, shields (just to make sure) and a nice display of SWR and Power on the LCD.  More details to come.”

Ron, W7HD, was very interested in the servo control code and components and wiring as he would like to adapt this idea to handle a pair of servos for an az-el rotor for his satellite Arrow antenna, which only weighs about 1-2 pounds. Then he just needs to add a bit of code to show the actual antenna position and he’ll be all set!

Ron suggests another adaptation of this project would be to remotely tune a magnetic loop antenna. One of the problems you run into when trying to tune a loop is that your body affects the tuning.