Digital Automatic Antenna Tuner GL100

Software Ver.2.50 - Atmega168 New!
Software Ver.1.00 - Atmega88 Old
PCB board V2.0 (GERBER files) New!
PCB board V2.0 (PDF file) New!
Diagram scheme V3.0 (PDF file) New!
Diagram scheme V2.0 (PDF file)
Bill of materials V2.0 New!

Before I started developing its own antenna tuner I had the opportunity to work with factory tuners. They have the advantage that they are verified to have a nice execution and good performance tuning. Unfortunately they are usually expensive. No less have a rather interesting design usually based on stepper motors attached to the knobs tuning capacitor in the case of automatic tuners and knobs in the case of simple hand-held receivers.

So I decided to build himself a tuner automatically, but without the use of complex equipment inventories, relying on the usual ... relays. And so I decided to design the antenna tuner on the basis of selected, previously known to me a simple diagram of the antenna box.
The approximate parameters of the antenna box:

- Work in the 1MHz - 15MHz (optional up to 30MHz )
- The maximum power delivered 100W
- Performance tuning about 90% at 100W
- Built-in LCD display
- Automatic switching of bands for all HF radios
- Measurement of frequency tuned signal
- Measurement of the signal output (RF voltage)
- Measurement standing wave ratio SWR
- Automatic tuning under 10s. with a well matched antenna
- Ability to work under bypass
- Adjustable tuning accuracy
- Volume control switch relay
- Support for only 3 keys
- Signaling LED

And so was born the first thought that could be done by the same antenna tuner capacitors attached relays? At first glance, the idea seemed simple, but obvious to the next question is how these elements behave at higher power? Is it made ​​tuner will be able to tune into the lower LF and HF bands? As it turned out, failed to meet this requirement by using the tuning circuits available ceramic capacitors, metal, resistant to higher voltages (U <500 V or U <3kV). They have this thing that they have less inductance and relatively heat-resistant construction.

An essential element of the box is a dual-resonant circuit made ​​up of two capacitors connected in series with the tuning coil connected to a common weight in the standard "T". One capacitor is connected to the transmitter, and the second antenna. When you turn on the PTT signal current flowing in the circuit series with the capacitor C1 and the coil L to RF power deposition the second resonant circuit in which the antenna is plugged to the capacitor C2. Appropriate tuning of the two capacitors to the impedance transmitter output and antenna input (transmission) and selecting the proper inductance coil to the desired resonant frequency causes the current flowing through inductor L has a minimum value. Then the RF current flowing in the circuit of the antenna to ground. Depending on the degree of matching capacity and inductance of these elements is achieved the desired standing wave ratio, which should be as small as possible.


Antenna tuner project

So many theories. But how to do it in the form of an electronically controlled without the knobs? So I decided to try it. So I designed a similar system. In place capacitors C1 and C2 capacitor inserted the resistance to higher voltages. To minimize the emission of thermal power on the individual capacitors I used a larger number of capacitors connected in series and parallel. By the way, drew on elements available in the market values.

Both capacitors "bulk" are identical. Were arranged in sets consisting of eight groups of elements for each bulk capacitor. Each group is connected to a separate relay. Applying the principle of multiples of 2 BCD got so rough theoretical capacity can be adjusted in increments of 1 pF in the range from 0 to 255, with bulk capacitors should have a maximum capacity of over 320pF. Therefore, the experimentally for most of the various groups of elements added in parallel capacitors 39pF, 68pF and 10pF capacitor increasing the total capacity of the bulk. Such a solution on the occasion of the phenomenon of reduced inductance capacitors, as parallel connection of elements reduces the inductance. As it turned out, used in this way capacitors applied for durable power of 100W transmitter
I made an adjustable inductance coil wound in the form of wire 0.9 mm2 (may be thicker) at the two glued together toroidal ferrite rings. The cores used a ring readyAmidon cores - 41x28x15mm [A5], readily available commercially. Two rings of paper mached with each drop of glue. When dry, glue the two coils wound on each of the 12 section of the coil L1.

Each of the ends of the coil is connected to the next and from entering the relay. As a result, got a tuning coil sections assembled on the principle of removing successive turns of the output coil from the ground. The beginning of the first coil is connected to ground, end of the last coil is connected to the capacitors C1 and C2.

At the end of such prepared and soldered to the motherboard box flooded coil GLUE hot glue to prevent additional turns of wire vibration during the float at higher power and to protect against mechanical damage.
I decided to control the relays of the processors. At the beginning I planned to use for switching normal TTL or CMOS circuits with latches on the outputs, but quickly thought, that could have been better to handle this more elegantly using the processors. This offered an opportunity to control a programmable switching speed of individual sections capacitors and inductors.

Applied at the input of the structure known from earlier 50dB signal attenuator, the output signal of which the administration appears from the transmitter RF power measurement At the time of the broadcast signal is sent to the input speed and a frequency converter for AC input, meant to measure the output power. With the silencer located the sensor PCB SWR standing wave. I made it to designing a measurement path along the main signal path from the transmitter. Measurement path length is approximately equal to three lengths of the signal path. Diodes D1 and D2 detector RF signal capture and give it to the two input amplifiers operations. Further amplified signal is given to two AC input of the processor.
Frequency realized as a very simple system consisting of a pulse forming input output (transistor T1). Further pulses are given the simple preskaler, where they are counted by the counter 74LS90 and divided by 10 Then split pulses are counted by the processor using the interrupt timer in the main program the first CPU.

The principle of the box is as follows:

The input signal is fed through the tuning circuit to the output box. At the same time is measured by the frequency of the signal. Detection system after the RF signal goes into the analysis and algorithm created by tuning relay switches so as to achieve the lowest SWR ratio. Breaks are a bit like rattle, but fortunately it is not very loud knocking, and contrary to appearances, does not last long. When the antenna is tuned well could tune inbox within a few seconds! SWR measurement is done by comparing two signals with operational amplifiers. Ratio of two voltages measured U1 (reflected wave) / U2 (incident wave) , multiplied by 10 gives a form factor SWR . Measurement sensitivity can be adjusted mounting potentiometers P1 and P2.
The system according to the SWR ratio wyłapanego best record setting C1, C2 and L1 in the internal EEPROM for each of the bands identified by the frequency counter.
Section for switching capacitors and inductors are used readily available high-current relays JQC3FF or similar, which successfully operate in this system. PCB has been designed as a double-sided, with metallization of holes and Tin on both sides. On the whole free surface of the plate have been applied to areas of mass improve the shielding. The final version of the solder mask was discovered in places where tracks must also be bold solder.
I designed the whole to fit into the housing T-86 .
The system in its design, has 3 processor ATmega88 AVR series. U1 processor acts as the main controller, the processor U2 and U3 are implementing systems. All three processors are connected by I2C TWI.
In order to simplify the construction and operation to prevent any disturbances of processors due to the impact of electromagnetic fields nearby have used in all systems U1, U2 and U3 8MHz internal oscillator. To measure the input voltage has been activated, the internal voltage source of 1.1 V.
Measuring CPU U1 is measured input values​​, analyzes it and displays the results of calculations on the LCD. And that is displayed on parameters such as SWR, Pwr (power), MHz (frequency). Additionally, the display shows information about the bands.

Tuning algorithm

Tuning can be divided into four successive stages. Each of the stages of tuning depends on the previous one, it being possible for any of them to stop tuning. This is also so automatically when the SWR value of about 1.01.

Step 1 Tuning coil L1.
When detecting the signal from the transmitter, receiver C1 sets the maximum digital value 255, which corresponds to a capacity of about 320 pF. Are included, then all eight relays control capacitors in the C1. Then the receiver turns on all relay coils L1_1-L1_12. Total inductance of the coil is maximum. Then turn receiver coil contains L1_1, L1_2 ... L1_12 to ground thus reducing inductance and measuring each time standing wave ratio SWR. After reaching a minimum value of L, the tuner reduces the capacitance C1 of 4 pF. The process begins again. And that in turn looks for the minimum value of inductance, at which the SWR ratio reaches a minimum value.

Step 2 Tuning capacitor C1.
In the second stage set is determined in Step 1 the minimum value of inductance L1. Capacitance C2 is set to the maximum value of 255 (about 320 pF). Then the capacitance C1 tuner also sets the maximum value and then jumps at 1 pF reduces it to the value of 128 (about 150 pF). During this phase, the measured is the value of SWR. Every time you lower the value is detected SWR from the previously discovered, this is indicated by yellow LED blink (Bypass). This value is stored. Once you reach the end of the range is completed or the next stage tuning.

Stage 3 Tuning capacitor C2.
In the third stage of the value of C1 and L1 are already established in previous stages. Capacitance C2 is set at a minimum, that is one (1 pF). Tuner enhances the capacity increments of 6 to the 255 (320pF). While the possible detection of best fit, the same as in the previous stages is indicated by LEDs blink Bypass.

Step 4 Tuning the C1 C2.
This step is entirely optional. It is not necessary, but in extreme cases can be helpful when tuning. Lies in the fact that at fixed before the inductance values ​​of both C1 and C2 are changed simultaneously, while C1 is reduced by 1 pF, and C2 increased with 1pF of both pre-determined value. This amounts to more detailed regulation of the "two hands" of the two capacitors, knobs, one left and one at the right time.


Mechanical installation and initial start

The housing in the front I cut and sawing holes properly matching the display, buttons and LEDs. LCD soldered to the motherboard box using copper wires.

On the back I cut the holes for the UC 50omów jack input and output. After screwing the plate assembled to the housing started to programmed processors. Placing it in sockets plugged processors for each of them to come on board ISP programmer and programmed circuits. At the end screwed on the top cover.

Elimination of interference relay

During the test mode switch receiver with low power of the transmitter there were no problems with tuning. However, with increasing power above 20-30W followed uncontrolled switching the relay due to the impact of a broadcast signal to the transistor control relays.

Therefore it was necessary to correct the interference transistors. For each control transistor proved to be useful for soldering 100nF capacitor between base and ground. On the target PCB solder pads are designed for mass to which you can solder these capacitors.
To effectively eliminate the interference of relays, were necessary for the additional capacitor 100nF solder on the tip of the relay 12 V PZ25 terms of weight. This is the central path of the power relay that is sensitive to RF interference

Thanks to this simple treatment any inconvenience during the tuner operation ceased. The relays are no longer responding, and began to box properly tune the power of over 100W in the lower and upper HF bands.

The screen of the SWR-meter

In order to improve the working conditions of SWR-meter, the perfect solution was to use the screen in the form of a brass plaque. I made it by cutting a piece of brass strip which is then bent in a U-shaped at the end I put it over the signal path and the path of SWR measurement, soldering it to the mass of the plate. For the implementation of the PCB with solder mask, you would also discover the solder mask soldered in place plaque screening. Application substantially improved screen performance SWR-meter, especially for the higher bands.

The program for the CPU

On this page available is compiled in BASCOM compiler program designed for CPUs to handle the box. There are 3 files - the main program and two files with the programs switching on relays, each of the files is for a separate processor. For the system to work, you can write the program on their own. No less an application created by me here is sufficient demand for this device. A simple program but have a very simple menu and tuning functions. Tuning is done on a factor analysis of the SWR in the loop during the program.

Schematic antenna tuner GL100 in 2.0

After the successful launch of a prototype version of the box drew a diagram. This is the second version of the working device.



Any adjustment to lower the SWR is indicated by a yellow LED blink. In normal operation, this LED indicates bypass mode. Working in the transmit mode is indicated by a red LED. The green LED indicates the readiness of the blocking device and auto-tuning capabilities. This is to prevent deregulation box tuned during its operation.

The parameters in the memory

Antenna Tuner has several parameters that can be corrected during the first testing device. No need to separately program the EEPROM. When you first start a program that saves default settings. After several attempts, you can choose some parameters. These are the parameters entered accordingly in the EEPROM at the address listed below

To modify these parameters, please read the EEPROM and edit parameters in the first line, under the following headings.

Dimension of a frequency counter – address 1 ($01)
The counter, which counted the frequency measured. It should be chosen experimentally depending on the copy CPU U1, as used herein processor ATmega88 internal oscillator. In the described copy of the default value is 32900.
The speed tuning - address 3 ($03)
The time delay is expressed in milliseconds when jumping to the next value of capacitance or inductance tuned. Default value is set to 100ms. The higher the value the more accurate the measurement step.
Switching speed - address 4 ($04)
The value expressed in milliseconds of delay during the switching of each relay individually. The default is set to 0 Increasing this value can significantly alleviate the knocks and mute tuning to a certain extent.
Number of phase tuning - address 5 ($05)
Number of stages during tuning. You can set 1, 2, 3 or 4 stages. If the box tunes to fit well on one or two steps, you can enter the value 2 to skip the next two stages.
Sensitivity of automatic switching of bands - address 6 ($06)
The value of the sensitivity switch bands automatically adjusted in the range 0-255. The higher the value, the lower sensitivity and hence the resistance to changes in signal frequency.
Automatic switching delay bands - address 7 ($07)
The time delay switch bands automatically adjusted within the range 0-255. The higher the value, the greater the delay when changing the bandwidth of the transmitter when PTT is pressed again.
Frequency divider - address 8 ($08)
The value of the frequency distribution of measured prescaller. The default value of 10 for one of 74LS90 and work to 15MHz. For jobs in the 30MHz enter the value 1



SWR Calibration and tuning

Before the first measurement to be calibrated tuning SWR. To do this, set the potentiometers P1 and P2 assembly for maximum value. Then press BYPASS mode P2. Frequency lock (illuminated green LED) turn on the PTT transmission signal modulated (SSB). By providing signal tuning, you can now adjust potentiometers P1 and P2 the output voltage of both SWR-meter. SWR measurement system is pre-calibrated. To tune the antenna to the selected frequency must first enable the transmission PTT, and then unlock the box by pressing the frequency of P3 so the green light went out. The system starts to tune. When you are finished tuning the green LED lights up and displays the message "Ready *". After that, turn off the broadcast and on again. Check if the alignment is satisfactory. If you have difficulty tuning, you can set the transmitter slightly shifted in frequency and retry tuning.

Adjust to work in the whole band 30MHz

If necessary, you can adjust the tuner GL100 for work throughout the range of HF to 30MHz. To do this, make a second prescaller between first prescaller 74LS90, and the processor. Installation is not difficult. Drill a hole in the side of the PCB in place without U6 signal paths. Carry out a wire in patch. Then solder the second 74LS90 chip "on the back" end of U6 combining the two systems: 2, 3, 5, 6, 7, 10 Unused terminals (4, 8, 9, 13) should bend and cut.
To plug the new arrangement between the former and the processor U1 preskaler, should the PCB solder side cut a path between the tip 11 of the U6 ending in six processor U1. The tip 11 of the U6 KROS connect with the tip 14 of the new system 74LS90 divider. In the new terminal 1 connect KROS the tip 12 and tip 11, dragged by PCB KROS reaching the tip of six processor U1.
Modification described here took me 10 minutes of work. Finally, in the EEPROM memory frequency divider to set the parameter to a value of 1 Default value of 10 is entered.