HF Automatic tuner


Introduction :

Generally Automatic Atu are very expensive.

However the atu is composed essentially of relays commanding inductors and capacitors. Most of the time the L match circuit is used. For several months I have been thinking about a way to make one around an Arduino and using economic cards.  It will not be necessary to spend more than 70$ for an ATU of 100W.

In addition it can be installed outdoors and controlled remotely by an rs485 link

ATU characteristics:

  • Modular design.
  • Up to 100W or more (not tested)
  • Tandem match detector
  • Arduino nano CPU.
  • Remote controller by RS485
  • Balun integrated symmetric and asymmetric output
  • Can be installed outdoors
  • SWR and POWER meter.
  • Ajustable trigger power (lower than 1W)
  • Simple protocol between ATU and remote control
  • Cost 70$ max without box

The ATU is based on modular cards:

  • Arduino
  • 12V Relais x8 (two cards)
  • 12V Relais x2
  • 4×20 LCD display.
  • PCF8574 expander.
  • Specials PCB for detector

Pcb available mail me :  f4goh@orange.fr

ATU and his RS485 remote CTRL
Boards interconnection
PCB available in january 2017

Antenna tuning unit:

The L matching network is a classical design in amateur radio.


Prototyping an ATU is not easy nor cost efficient with spare parts.

The trick was to use eight 12V relays manufactured modules for Arduino. They are optocoupled insulated and have screw terminal blocks, reducing cost and assembly time.

They can be found on online merchant sites. (atu-ebay-links)

Those relays are enabled at 0 logic Level.

12V input is used for relays power

5V input is used for the optocoupler and led

Don’t forget to add capacitors !

One is used to switch eight inductors and another to switch eight capacitors (another relay module is high/low impedance switcher and symmetric / asymmetric inverter)

QRO tores
QRP tores

To prevent HF return, you need to weld capacitor on each transistor

Values of inductors and turns depending of toroid for QRO:

µH Tore and turns QRO Capacitors
L1 0,07 4 turns 10mm diameter on air 10pF
L2 0,18 6 turns 10mm diameter on air 20pF
L3 0,3 5 turns T94-2 40pF
L4 0,6 8 turns T94-2 80pF
L5 1.2 12 turns T94-2 160pF
L6 2.2 13 turns T106-2 320pF
L7 4.4 19 turns T106-2 640pF
L8 10 29 turns T106-2 1280pF

Values of inductors and turns depending of toroid for QRP:

µH T50-2 T50-6 FT37-43 T30-2 T50-10 FT50-61 FT50-1
L1 0,06 3 4 4 4
L2 0,12 5 5 5 6
L3 0,25 7 8 8 9
L4 0,5 10 11 13
L5 1 14 16
L6 2 20 22 3
L7 4 29 32 4 8 20
L8 8 40 45 5 11 28

You can use other toroid models and calculate them with Mini Tore Calculator from DL5SWB for example.

Tore calculator from DL5SWB

If ATU being used at low power, capacitors voltage is not critical.


Directly soldering inductors and capacitors on relay cards, placing the two cards in front of each other, making connections with wires.

Balun 4/1 on T200-2 and LZHZ inverter

Relay drivers:

You can use two types of card

An OM made with MCP23008 or manufactured modules like PCF8574 expander


MCP23008 expander :


Two I²C I/O expanders drive all relays.

12V power supply is plugged to both J21 terminal blocks, 5V power supply comes with the I²C bus.

Take care of J19 jumper position setting the I²C address.

Inductors relays card: J19 2-3 position, address 0x20

Capacitors relays card: J19 1-2 position, address 0x21

If you want to use another I²C address, change line in source code here

#define mcpLRAdr 0x20    //adresse i2c mcp23008

#define mcpCRAdr 0x21

Home made expander (distance between J1 and J2 change according to relay models)

PCF8574 expander :

This expander is easy to use, cheaper, but be careful to the I²C address

There was 2 PCF8574 package

PCF8574  Address range is 0x20-0x27

PCF8574A Address range is 0x38-0x3F

In my case I use 2 types

#define pcfLRAdr 0x38    //address i2c PCF8574AT

#define pcfCRAdr 0x20    //address i2c PCF8574T

You must add 2 wires to powering 5V to the relays card. Interrupt input isn’t used.

If is necessary add some decoupling capacitor on 5V power like the scheme of the MCP23008

IO expander with 5V power supply connected to relay card

Tandem Coupler:

A dedicated printed circuit has been specially designed to facilitate assembly of the coupler


RF transformer is made with 3 T50-2 side by side and 25 turns (0.6mm wire)

Two AD8307 is added on this board. This avoids the use of diodes and one can measure small powers. So we can use the ATU in QRP.


You need to insert -14 dB attenuator between coupler and AD8307. Indeed AD8307 can be measure power lower than 17dbm (50mW). Here is the equivalent circuit to calculate the attenuator if you want to change the gain.



Arduino PCB :

Another dedicated printed circuit has been specially designed to facilitate assembly of the Arduino nano.


Two PCB is need. One for the ATU and another for the remote control.

Schematic is classical. An RS485 module is inserted on board. The LM385-2.5V is soldering for VREF ADC converter. Q1 and Q3 is used to control Green and Red external LED. That inform user can be transmit (LED green ON) or not (LED red ON).


You don’t need to sold LM385, Q1, Q3, C1 and C3 for the remote control. Just add lcd 4×40 char with his I2C expander. Don’t forget a 5V regulator.

I²C LCD expander

To configure parameters of ATU from the remote control, connect a little keypad. The output delivers a voltage corresponding to the pressed key.

Key board is wired on A0 CPU Arduino input

If you want to use ATU without remote control, you need to learn how to configure it by serial terminal using a specific protocol.


Arduino firmware programming :

Use ATUV0.8 for ATU or remoteV02 for the remote control from the following link:


Specific protocol and Testing ATU:

Tuning search is made in two passes:

A coarse search using each capacitor for each inductor in high and low impedance.

A fine search using combinations of inductors and capacitors around the coarse search.


Use HTerm on ATU (usb on NANO directly or USB dongle on RS485 line)

RS485 dongle

If you use usb on NANO directy,RS485 adapter (on ATU) need to be disconnected to prevent serial bus error.

ATU Commands list : (from serial terminal to ATU)

b00/01 : symetric or asymetric

w22 : swr trigger x10 (22 = 2,2)

u00/01 L/C UP

d00/01 L/C Down

h00/01 HzLz

c00 record config

m47 tandem coupler correction (in dBm)

n00 force search

v00/01 auto save (auto save LC config)

i00 init eeprom (set config as default)

t30 trig level Power

r00 read config

ATU Commands list : (from ATU to serial terminal)

S45 :  swr x10 (45= 4,5) 99 max

R00 : Start coarse search

F00 : Start fine search

L(byte)  : inductors values

C(byte)  : capacitors values

H(byte) : hzlz state

P 000/999 : x10  power level (ex : 455 = 45,5W)

B 00/01 balun state

W 22   swr trigger

M 47   m47 tandem coupler correction (dbm)

V 01   save auto state

T 30   power level trigger

With hterm, send ATU Commands list in lowercase

You could check all relays and force searching tuning

Screen Init (ATU config  from remote CTRL)
ATU Left Side


Making this ATU was a good learning path either on hardware and software aspects.

Antenna tuning unit conception was challenging to reduce cost and footprint and also to integrate it in the little programming space available in the Arduino.

I am deeply involved in programming search algorithm and RS485 protocol almost from scratch.

It was a good opportunity using AD8307 logarithmic amplifiers for SWR measures and calculation in the QRP/QRO environment.

This ATU will be improved in the future with the prevision of Java oriented multi-platform configuration software

73 from Anthony F4GOH

HF Automatic tuner

12 réflexions sur “HF Automatic tuner

  1. Joe dit :

    Hi Anthony

    I have been looking at your very nice ham projects on your web blog. Thank you for publishing those. I have been collecting parts to make an arduino based tuner also. What I have been thinking about lately is using an AD8302 phase-mag detector similar to what you did in the VNArduino but in this case the arduino could calculate the values needed for a conjugate match for the antenna and then switch in the relays to deliver this value in one step. My only problem is I don’t have the C coding skills to write the code but perhaps you would be interested in this idea?



    1. Hi Joe,
      Sure, this is a good idea. Calculate XS. but ad8302 didn’t give the sign of XS. So may be that’s works in one or two steps.
      I try some simulations with VNArduino.
      73 and HNY 2017


  2. […] Anthony, F4GOH, hat uns Funkamateuren ja schon einmal ein schönes Bastelprojekt gezeigt, nämlich den VNArduino, einen VNA, der mithilfe eines Arduino Nano kontrolliert wird. Nun hat Anthony erneut „zugeschlagen“, und uns zum Jahreswechsel (sozusagen als verspätetes Weihnachtsgeschenk) mit einem neuen interessanten Selbstbauprojekt beschert: einem HF Automatic Tuner. […]


    1. Hello Willi,
      Thanks for HF automatic tuner report.
      Next projects i work with F4HGA on Impedance matching tutorial between stage.
      i work also on 433Mhz Oregon weather station; 433MHz reciver to make APRS bridge without PC.


  3. Hello Anthony

    I have a some questions for the HF tuner:

    What toroids are you using for the 2 versions QRP and QRO (100 Watt)

    T94 and T106 toroids available in several versions – Frequency areas?
    What toroid / ferrite are you using in the Balun?

    The HF Tuner is now a club project in OZ1FRD local EDR club.

    Vy 73 de OZ9F – Leif


  4. Hello Anthony,
    my name is andreas, dl5mgd. It would be great to add an ad8302 to measure the phase angle. After that it could be possible to compute the LC components in 4 steps.
    Firts the vswr will show 2 possible impedances (eg vswr 3 could be 16,67 or 150 ohms) and the phase could be inducitve or capacitive. After these steps a fine tuning process should yield the optimal vswr. I experimented a lot in building an atu (www.dl5mgd.de) but did the same aproach as you with coarse and fine tuning.
    It would be great to enhance the tuning speed. I think only sgc did these by measuring more than the vswr.
    If you are interested in adding the above feature i would be glad to help as muc as i can.
    Thanks a lot for your great prohjects!!!


  5. Joe dit :

    Hi Andreas, you and I had the same idea. Anthony and I have already discussed it. He is busy on another project right now but agreed it is an interesting approach. I am collecting parts to build a tuner which will use the phase/mag detector approach. Since the 8302 does not give a +/- sign on the phase it results in some extra steps but will still speed up the tuning and result in less wear on the relays. We should keep this discussion going. de ve3vxo.



  6. So what Joe said about using an 8302. I have used such a tuning algorithm and I find it to be highly superior to the hunting algorithms. The trick, since you do not get the sign of the phase, you add a small capacitance to the load side. I find that switching in 10-15 pf is perfect. Depending upon if the phase increases or decreases, you know the sign! You can then calculate an exact transfer function and resolve the capacitors and indictors to get to your ideal load real ohms. Since there is a little bit of slop (ideal vs reality) I usually make a step +/1 both inductors and capacitors (2×2 or 4 total moves) just to see that I am at the SWR minimum. That’s it!


Votre commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l’aide de votre compte WordPress.com. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l’aide de votre compte Facebook. Déconnexion /  Changer )

Connexion à %s