Going back in time: “Old school” transceiver for 20 meters with 20 watts of output

"Old school" SSB transceiver for 14MHz by DK7IH (2018)

Hi again! This project directly “beams” you back to the “Good ol’ 80s” when there was no stuff like “DDS, “OLED” or even “SDR” or other modern technology we today use to build our radios.

I designed this transceiver using the “old school” techniques because in a German QRP forum on the internet some hams originated a “Back to the roots”-movement which I thought was a great idea. So I too went back in time 3 decades and constructed a radio like I did it in the eighties at the beginning of my “homebrew career”. That meant: No digital stuff, just a simple VFO but (and that is new) higher rf output power because condx are fairly low on the hf bands currently.

I later presented this radio at an annual German convention of homebrewing hams called the “Black Forest Meeting” named by the place where it is held the beginning of October each year.

To give you an impression, that’s how the radio looks from the outside. Pretty “old school”, isn’t it?

“Old school” SSB transceiver for 14MHz by DK7IH (2018)

The main design objectives were very simple:

  • Compact in size (even without using SMD components),
  • Analog VFO with vernier drive (1:10 gear) and variable capacitor,
  • No digital stuff (=> no digital noise!),
  • RF Output in the range from 15 to 20 watts pep in SSB,
  • Single conversion superhet (9MHz interfrequency)
  • No “save as many components as possible”-design.

First the block diagram giving you the basic structure of this radio::

“Old school” SSB transceiver for 14MHz by DK7IH (2018) – basic outline

The VFO

I decided to use an analog VFO in this project due to three reasons:

  1. It’s really old style,
  2. it is much less prone to produce any unwanted “birdies”, and
  3. phase noise performance usually is better than most of the digital ways to generate a signal.

For the VFO I chose the Hartley design characterized by a tapped coil. This type uses less critical components than a comparable Colpitts circuit thus reducing number of parts (2 caps in this case that are avoided) which might lead to unwanted frequency changes (drift).

How to build a VFO that is really stable

Lots of pages have been written about this topic. This another one. First, be aware of the fact that it is not possible to build a VFO that has the same frequency stability like a modern digital system. This is because these systems are all crystal controlled. But it is possible to achieve a drift of some dozen Hertz within an hour or so which is absolutely sufficient for having even a longer QSO.

The main problem is based on physics, or thermodynamics to say more exactly. All material expands when heated and contracts when ambient temperature decreases. OK, some exceptions exist, water below 4°C is the commonly known example of them.

Avoiding thermal runaway

Heat is the problem in such a circuit. It comes from the interior of the components when current flows through them and from the outside, for example when the transceiver is exposed to sunlight or placed near another source of thermal energy. Also heating of the final rf amplifier stages may contribute to heating the cabinet inside. The electronic parts forming the central strucure of the tuned circuit exert the main influence connected to thermal runaway of the frequency that is generated.

The general approach is: When we can’t avoid physical effects we must choose components that change their values in such a way to compensate the changing of the values of the other parts. That means we have to look carefully on temperature coefficients of the varoius components we intend to build into our VFO.

Choosing the “right” components for your VFO

Choosing advantageous components is crucial for frequency stability. So I did some brief research to find out more about temperature coefficients of coils of various types and available capacitors. Here are some of the outcomes.

Explanation of syntax: If a relation is negative, a minus sign (“-“) is given. In this case the value (C or L) decreases when temperaure increases. A plus sign (“+”) indicates a positive coefficient. When the relation of value change by temperature change is weak (that means no intense changing of the value when heated), there is only one “-“-sign. The more “-“-signs you have, the higher this respective ratio is. The same applies for “+”-signs to indicate a positive relation.

Capacitors:

  • Ceramic capacitors: —
  • Polystyrene capacitor: –
  • NP0 (C0G) capacitor: no measurable effect

Inductors:

  • Air coil on polystyrene coil former: +++
  • Coil wound on T50-6 yellow toroid: +

Based on this short survey, the best combination would be NP0- and Polystyrene caps together with an inductor wound on an T50-6 (yellow) core. Hopefully their temperature behavoiur will compensate more or less and lead to best stability. Hint: On the photos appearing later in this text you will see an air coil wound on a TOKO style coil former that has been used because it does not need so much space.

The VFO circuit

I finally chose the Hartley circuit for my VFO. There it is:

“Old school” SSB transceiver for 14MHz by DK7IH (2018) – VFO

VFO Circuit explanation

Starting from the left you can see the tapped coil (here 60 turns tapped at 10 turns from the bottom end) on a 5.5 mm TOKO style coil former without any core. In parallel there are various capacitors (polystyrene and NP0 mixed) to build up the total capcity. It is common use to spread the total capacity needed to various single capacitors because it has turned out that the effects of temperature change are less significant if you use more (and therefore smaller) single capacitors.

A 100k resistor is used to pull the gate to ground and therefore provides a correct bias at the FET’s gate. The 1N914 diode is a so called “clamp” diode that has been installed to stabilize (and therefore reduce) the rf voltage in order to avoid excessive rf voltage coming to the FET’S gate which would lead to distortion. This diode has a negative side effect, but that an be accepeted for a VFO in the rf bands: It slightly increases phase noise because it works as a regulator. With some the designs you can see this diode in reverse position, don’t worry, the regulating effect takes place either.

To ensure the oscillator to produce radio waves, in-phase feedback between gate and source is generated via the tap you can see with the coil. A tap of about 1/6 of the whole number of windings provides enough feedback voltage to let the oscillator start by its inherent thermal noise and generate clear sine waves afterwards. Putting the tap too close to the “hot end” will cause distortion because the amount of energy coupled back to the gate will be too high. Also instabilites are probable because of excessive drive power to the gate of the FET.

On top of the tuned circuit there is a varactor diode that is used to be controlled by a positive voltage to form a RIT (receiver independend tuning) control circuit. It is very loosely coupled to the tuned circuit to minimze temperature effects and because only 1 or 2 kHz “swing” is needed. The generation of the RIT voltage will be described later in this text.

The main tuning capacitor

An air capacitor is mandatory here! You can either use a ready made one from the surplus market. But to keep it as small as possible I built my own by dismanteling one of old variable capacitors formerly used for homemade AM radios. Use a small drill to remove the rivets, dismantle the capacitor completely and rebuild it again as an air capacitor (get rid of the plastic dielectric interlayers!) by using M2-screws and nuts. Youl will have evenings of endless fun with this game! 😉

Buffering and amplifying the Signal

The second stage with another FET is very loosely coupled to the source of the first FET. This is made to minimize effects of load changes to the frequency. This stage is a so called “source follower” giving a very low impedance signal to the final stage that is responsible for the amplification of the signal to a level of 2 to 3 volts pp which you will need for the rx mixer that has been designed as a dual-gate-MOSFET mixer (see receiver chapter later!).

DC voltage in the VFO

Voltage stabilization is crucial for best performance of this critical part of the radio. Supply voltage changes always lead to frequency changes. So a two-level buffering is common use here. The first (and most critical) stage is buffered twice (10V voltage regulator integrated circuit 78L10 and subsequently by a 6.2V zener diode) whereas the buffer and the amplifier stages are supplied with 10V regulated DC voltage only.

Ambient thermal isolation

To avoid the VFO being affected by interior thermal convection (flow of warm air inside the cabinet) it is recommended to shield the VFO from the rest of the transceiver. I do not recommend using metal sheets as walls here because these form other unwanted capacities that will lead to thermal effects on the generated frequency. Metal also is a good conductor for thermal energy, so you might run counter to your goals. My thermal insulation therefore is made of simple cardboard.

The Local Oscillator (LO)

This oscillator is much more uncritical than the VFO because it is crystal controlled. The purpose of the LO is to supply a carrier signal for the SSB modulator. Due to the fact that there are two sidebands we theoretically can use this LO must be switched to either one of two possible frequencies. In case of an interfrequency of 9MHz (9000kHz) these are: 9001.5 kHz for the first sideband and 8998.5 kHz for the second sideband. Please note that I did not write “USB” or “LSB” because the frequencies forming each sideband might be changed because of the frequency plan of the transceiver where by mixing with the VFO frequency the sideband might be inverted depending on if you add or substract the VFO frequency from the 9MHz-SSB signal.

There are several possibilities to produce these two frequencies:

  1. Using two different oscillators each equipped with a single crystal,
  2. switching two crystals with one osillator,
  3. using a variabale capacitor or a coil to “pull” one crystal to the desiered frequency.

Discussion:

  1. This method means high effort but surely is the most exact one because there are no influences of the unneeded choice to the other crystal currently on duty.
  2. Is the worst idea because the unswitched crystal is highly prone to influence the freqeuncy of the switched one because they are linked to parasetic capacities within the wiring, the switch and so on. Forget this one espacially when using the internal oscillator of a NE602/SA612!
  3. This to my point of view is the best compromise between circuit simplicity and function. You can see this way of sideband switching in my transceiver.

This is my local oscillator:

“Old school” SSB transceiver for 14MHz by DK7IH (2018) – Local Oscillator (LO)

It is a simple Colpitts circuit where in-phase feedback and feedback voltage control are achieved  by a series of two identical capacitors. A simple switch,  a capacitor (90pF max.) and a coil (4 to 8uH max.) that are either connected to the base of the transistor via the 9MHz crystal determine the sidband freqeuncy of the oscillator. Signal is taken out via the collector.

The Receiver

The receiver will be presented step-by-step starting with the front end stage:

The RF Preamp

This stage is connected to the antenna relay. It provides an amount of basic amplification for the antenna signals. But that is not the main purpose. Noise figure improves significantly if you use a stage with low inherent noise. Thus a dual-.gate MOSFET is installed here. This semiconductor is also used to control stage gain because gate 2 of the MOSFET is connected to the AGC chain of the transceiver. About 12 dB gain swing are possible here. Stage gain is about 15dB.

“Old school” SSB transceiver for 14MHz by DK7IH (2018) – RX PREAMP

Note the position of the primary and secondary windings of the input and the output coil. To avoid self-oscillation the output (drain) of the MOSFET is connected to the untuned part of the LC circuit. Coils must be shielded and should be equipped with ferrite heads (in the photo the piece in left bottom corner).

The Receiver’s Mixer

In this stage also a dual-gate MOSFET is used. This type of mixers provides good capabilities to cope with high signal levels without producing unwanted signals (high IMD3), gives some dB of gain and is low-noise also.

One “disadvantage”, if you want to say so, is that it needs a little bit of higher VFO drive (about 2 to 3 volts pp). Gate 2 bias is generated via the voltage drop on the source line. The tuned circuit in drain line is adjusted to the desired interfrequency. See the schematic for the exact winding data and parallel capacitor.

“Old school” SSB transceiver for 14MHz by DK7IH (2018) – RX MIXER

The SSB Filter section

Transmitter and receiver share the same SSB filter in this transceiver. So some sort of switching is recommended even if circuits exist that go without one. I used a high quality relay made by Teledyne that I bought in a 10-piece bundle for low price (1€ each!) via a well-known internet marketplace. Caution: Some SMD-relay I tested prior to building this rig were disastrous concerning signal isolation between terminals. To avoid any disappointment or frustration  I recommend testing a relay before you finally install it.

“Old school” SSB transceiver for 14MHz by DK7IH (2018) – SSB FILTER

All connections to the rest of the circuit must be made with shielded cable. I found an interesting alternative: I sometimes design my own very thin shielded “cable” with brass tubing (1 mm inside diameter) where I put insulated cable inside. The brass tube is connected to GND on the Veroboard. You can not bend these tubes but longer lines can be interrupted for a short piece so that the “bend” can be made by putting two parts of tubing in 90° degree angle for example.

The IF Amplifier

This one might look familiar to you. It is a simple “remake” of the front-end stage. The one remarkable thing is the secondary of the output transformer. This coil has 4 windings (prim. 16 turns). The secondary is center tapped (2 + 2 turns). This is because the product detector (SSB demodulator) has a symmetric input. Very important in this stage is the 100uF capacitor in VDD line. This cap prevents the stage from AF resonating and self-oscillations on the VDD line and makes the receiver much more “quiet”.

“Old school” SSB transceiver for 14MHz by DK7IH (2018) – IF AMP

The SSB demodulator

This stage is probably the most “old-school” part of the whole transceiver. It uses an old CA3028A differential amplifier as mixer circuit:

“Old school” SSB transceiver for 14MHz by DK7IH (2018) – PROD DET

You won’t be able to buy large amounts of this IC anymore. And if you get one, the prices are close to or beyond a rip-off. But there is an alternative. You can build your own “IC”. Watch this page where all the information you need is provided!

Signal input goes to the paired transistors forming the amplifier stages. LO is fed into the line transistor that is used to set the current of the differential amplifier thus providing a switching and therefore superposition of the two signals.

The output circuit is made of an audio transformer formerly used in the final audio amp  of old AM radios (coil resistance is about 300Ω each side). The 2.2nF capacitors eliminate remainders of the rf signals and “ground” the terminals of the AF transformer.

Audio amplifier

This final receiver part consists of two stages: An audio preamplifier with a bipolar transistor and a final amp with a TBA820M integrated circuit.

“Old school” SSB transceiver for 14MHz by DK7IH (2018) – AUDIO AMPS

The two caps 0.22 and 0.1uF determine how the higher frequency components in the audio signal are cut off. The higher the total value the more the higher frequency components of the audio signal will be limited due to the equation XC=1/(2*PI*f*C).

Tr1, which is a universal purpose NPN transistor, provides high gain. Thus a 10k resistor is installed to form a voltage divider with the audio gain potentiometer.

In the final stage I use a TBA820M ic (8-pin DIL version). This one is more linear than the well-known LM386 that you usually can find in this place and it is not so prone to self-oscillation. The cap aside the 100uF in the top left corner of the schematic is not marked, its value is 0.1uF.

Loudspeaker impedance is 8Ω.

The AGC

Automatic gain control makes listening to signals much more comfortable. AGC voltage is audio derived, like in my other transceivers. The circuit also is nearly the same:

“Old school” SSB transceiver for 14MHz by DK7IH (2018) –

Due to the very high gain of the product detector this stage is directly connected to this circuit and not to the AF preamp. A potentiometer is used to set the threshold of the AGC onset.

Next stage is a simple audio preamplifier followed by a “Greinacher Circuit” serving as voltage doubler and providing DC voltage proportional to the audio signal level. A dc amplifier with another NPN transistor lets its collector voltage drop as soon as it is fed with significant dc input voltage. Thus this voltage decreases and so it can be used to control gate 2 of the MOSFETs in the various receiver stages that are equipped with tetrodes.

The S-Meter is connected to the emmitter of the final transistor. If conductivity in the transistor rises, the emmitter becomes more positive and the S-Meter needle is deflected proportionally. The 220Ω potentiometer in the emmitter line must be set in accordance to the respective S-Meter you are using. One shortcoming should be mentioned: If you have a not so sensitive meter then the value of the pot can be set to nearly 100Ω or above. This will prevent the collector from dropping to nearly 0V in case there is a strong signal and hence reduce the maximum dB you can get from the AGC chain.

The Transmitter

The transmitter section is designed for an output level of about 20 watts and uses 4 stages all equipped with bipolar transistors. The last stage is a push-pull stage, the 3 low-power stages are single ended. I prefer push-pull for the last stage (if possible)  because this circuit inherently does not create even harmonics thus simplifying output filtering.

The first parts of the transmitter to be shown here are the microphone amplifier, the SSB-generator and the TX mixer:

“Old school” SSB transceiver for 14MHz by DK7IH (2018) -MIC AMP

The mic amp is simple but provides enough gain and good linearity for using an old-style dynamic microphone. It works in common emmitter mode and has gain of about 15 to 20 dB.

“Old school” SSB transceiver for 14MHz by DK7IH (2018) – SSB GEN

The audio signal amplified by the microphone amplifier is fed into PIN1 (Input 1) of an NE602/SA612 mixer IC which is the simpliest way to generate a DSB signal with a Gilbert cell. LO input is fed to PIN7 and should be in the range of 200 to 300mVpp. Thus a 12pF cap has been installed to limit LO voltage going to input at PIN7.

Carrier suppression is around 45dB when LO offset frequency is correctly set for each of the two sidebands and LO voltage is not much higher than the 300mVpp mentioned before.

The DSB signal produced by this mixer goes on to the SSB filter relay and filter that has been described before. The use of shielded cable is mandatory, too.

The TX Mixer

“Old school” SSB transceiver for 14MHz by DK7IH (2018) – TX MIXER

You won’t be able to recognize many differences if you compare this TX mixer to the DSB generator. In fact, there are none.

The 14MHz Band Pass Filter

Next is the band pass filter that consists of 2 coupled tuned LC circuits for 14MHz. They are also wound on TOKO style coil formers. Data can be found in the schematic underneath.

It is important to also install the ferrite heads that are provided with most of the coil formers and to use the shield “metal cans” that are also standard for these coils. This is to prevent stray coupling of rf energy into the first stage of the power amplifier strip and therefore preventing self-oscillation of the transmitter strip.

For proper adjustment set the transmit frequency to about half of the frequency swing ((i. e. to about 14.200 kHz) and tune for max. output.

“Old school” SSB transceiver for 14MHz by DK7IH (2018) -BPF

If you modulate with a two-tone signal to the mic amp you should see about 500mVpp by the output of the BPF when the chain is fully driven.

The Preamplifier

We start with the low power end of the power transmitter section. A bipolar rf type transistor is the center part of this stage.

“Old school” SSB transceiver for 14MHz by DK7IH (2018) – TX PREAMP

This one is a standard circuit and has been “trimmed” for maximum linearity in order to reduce distortion to a minimum (which is also true for the following stages). You can see the well understood 2 master ways of achieving max. linearity in an amplifier stage:

  • Negative feedback between collector and base (i)
  • Emmitter degeneration (II)

Explanation:

i) The first measure goes along with the 2.7kΩ resistor between collector and base of the transistor. This resistor provides positive dc bias voltage to the base and leads 90° out-of-phase ac voltage to the transistor’s input. This reduces gain and therefore distortion. But due to the fact that the whole transmitter strip has plenty of gain, this loss in gain is not a serious problem.

ii) The 10Ω resistor in the emmitter line is not bypassed by a capacitor. This stabilizes the circuit. When the current through transistor increases the emmitter voltage will rise (according to Ohm’s law) and the voltage between collector and emmitter drops. This reduces voltage difference between base and emmitter and hence also reduces gain.

The coupling to the next stage is done by a capacitor of 0.1uF. This causes some impedance mismatch. But that is as well not a big problem because the gain reduction here helps to prevent the whole transmitter from unwanted oscillations by diminishing overall gain.

The Predriver

This stage is somehow a copy of the stage before but allows more current to flow through the stage. It is also operated in class “A” mode and uses the same methods to maximize linearity like the preamp stage.

“Old school” SSB transceiver for 14MHz by DK7IH (2018) – TX PREDRIVER

You can use a 2N3866 transistor here which is available. But any other rf power transistor for driver stages (2SC1973 etc.) will also do the job well. A heatsink is recommended even if stage current ist not that high. T1 should be a toroid, a “pig-nose” core in this place to my experience is not the best choice. The 10uH RFCs are ready made ones but you can also wind 20 turns of 0.4mm enameled wire to a FT37-43 toroid core.

RF output of this stage could be measured as 100mW into a 50Ω load.

The Main Driver

This stage has an old 2SC2078 CB transistor and is operated in class “AB” mode. An alternative could be a 2N3553 that is available on ebay for example. A heatsink is neccessary for whatever type you use.

“Old school” SSB transceiver for 14MHz by DK7IH (2018) – TX DRIVER

Correctly set bias for “AB” operation is ensured by the 1kΩ resistor from VDD to the bias circuit. The 1kΩ resistor limits the current whereas the diode works as a stabilizing element (thermistor). It must be connected directly to the case of the transistor ensuring good thermal contact. If the temperature of the devices rises the resistance of the diode will decrease. Hence current through the diode increases thus reducing the part of the current that can pass through the base-emmiter line of the 2SC2078. Quiescent current is stabilized and thermal runaway is prevented.

The rf output is uncommonly terminated with a low-pass-filter. This is because I first intended to build the transceiver for an output level of about 4 watts. But then I had the idea that the space still available on the veroboard could be used by another amplifier definitely leaving the QRP power level. So I left the circuit how it first was and just added the final amplifier stage.

Output of this driver stage now ist set to 1 watt into a 50Ω resistor.

The Final RF Amplifier

Now let’s go for the power machine in this transceiver:

“Old school” SSB transceiver for 14MHz by DK7IH (2018) – TX POWER AMP

2 rf power transistors 2SC1969 by Eleflow provide up to 20 watts of rf power. Bias for such a high power stage can not be set by a simple resistor. Here a line transistor (BD137) serves as current control. Diodes D1 and D2 (1N4002 or equ.) follow the same purpose like the single one in the stage described before. They must be mounted with excellent thermal contact to each of the 2 power devices which ensures secured protection against thermal runaway. The transistors also must be connected to a large heatsink. I use Aluminium metal strips (2mm thickness) to connect them to the back wall of the cabinet.

RF is fed into the power transistors via a network of 8.2Ω  resistors and two 22uH rf chokes that seperate the rf line from the dc bias line letting only dc pass. This method makes construction of the input transformer easier. Winding ratio is 4 turns primary, 2 turns secondary. This is because the input impedance of the stage ist fairly low (aorund some ohms).

The output transformer is a homemade “pig-nose” of 6 toroids FT50-43, where 3 toroids are stacked (using 2-component glue) and 2 of these stacks are glued in parallel (see picture at the end of this text for details!). Winding ratio is  1 + 1 (primary center tapped) to 4 on secondary.

Quiescent current of this stage should be set to about 100mA.

A low-pass-filter terminates this stage and is connected to the antenna relay.

In addition you find a section to measure rf power. This is again the so called “Greinacher-Circuit” which doubles the voltage and serves as a charge pump. The dc output of this circuit directly leads to the S-Meter indicating output power of the transmitter.

Performance

First the spectrum of the signal with the transmitter fully driven to 20 watts output power with a two-tone-signal:

IMD3 is about 28dB below signal peak which I think is acceptable.

Amplitude diagram is as follows:

2-Tone-Signal Amplitude
2-Tone-Signal Amplitude

Max. radio frequency voltage is 90.4Vpp which calculates to about 20 watts of rf power (P=(Vpp/(2*SQR(2)))²/50Ω).

Power switch board and RIT voltage

A 12V relay with two pairs of contact sets is the heart of this unit. DC power is lead to TX, RX and permanent supply via the respective power lines.

RIT voltage generation is a little bit more complicated. When the RIT switch is in “OFF” position, RIT voltage always is taken from the fixed voltage divider that is formed of the two 4.7k resistors either when on receive or transmit mode.

If RIT is “ON” then there are two possibilities: When on receive mode, RIT voltage is gained from the 10k lin. potentiometer in the front panel. When on transmit mode RIT again is taken from the fixed voltage divider.

There is also a false polarity protection diode. This can be any silicon type with max. current >= 5 A.

"Old school" SSB transceiver for 14MHz by DK7IH (2018) - TR SWITCH RIT
“Old school” SSB transceiver for 14MHz by DK7IH (2018) – TR SWITCH RIT

Mechanics

The construction is sandwich style made of 2 layers:

“Old school” SSB transceiver for 14MHz by DK7IH (2018) -Inside View – VFO, LO, RX, SSB generator, TX mixer etc.
“Old school” SSB transceiver for 14MHz by DK7IH (2018) -Inside View TX and switchboard

OK, that’s the story. Thanks for joining me on the trip to the past! 😉

73 de Peter.

Advertisements

Shrinking a QRP transceiver to (nearly) the size of a pack of cigarettes

The challenge started some weeks ago, when John, ZL2TCA, commented to this blog

you next challange is to build a rig into a cigerette packet size case.

My problem: I don’t smoke, have never smoked and probably never will. 😉 But I have a new transceiver for 20 meters, that might come close to the dimensions of a pack of “cancer sticks”.

DK7IH pocket sized qrp transceiver 20-4 a
DK7IH pocket sized QRP transceiver 20-4

The transceiver is nearly the same circuit as applied with the “Micro 20-III” but uses a single ended final amplifier instead of a push-pull circuit. I hope to find time the next days to publish an article on this rig featuring full description of the radio. Currently I’m in the IOTA contest and working stations from all over Europe.

73 de Peter

Reviewing and improving the semi-automatic antenna tuner

Foreword

When I built the semi automatic tuner two years ago I did not take into account some possible shortcomings the device could suffer from. The first of these I noticed when I exceeded power levels of about more or less than 50 watts. In some cases there was rf incoupling leading the microcontroller to fail so that the relay setting was invalid for the given combination of frequency and antenna. The next point was that the algorithm to set the capacitor was far from being optimized. And, as I found out, the maximum inductance I had inlcuded was far too high. On the other hand the lowest indcutance was to big to ensure very fine tuning. So this was revised, too by stepping the inductors more carefully.

The consequence then was a complete reconstruction of the tuner trying to avoid the problems from rf stray energy being coupled into the microcontroller and improving the software and hardware.

Abstract

Thsi article describes a microcontroller driven semi-automatic antenna tuner capable of handling power levels up to 150 watts. The device is a low pass filter tuner manually tuned by setting the optimized L/C combination by hand and then storing the values into the EEPROM of the mictrocontroller to recall them later (seperately for each band from 80 to 10 meters including WARC bands). The tuner ist designed to couple long wire antennas (i. e. longer than half a wavelength) in the frequency range from about 3 MHz to 30 MHz. The antennas can be balanced or non-balanced.

The device uses 7 coils wound on iron powder toroids and a variable capacitor controlled by a motor with a reduction drive and a a device that detects the current turning angle of the rotator.

Also integrated you will find a measurement section to give the current standing wave ratio and put out this on the display.

General layout

The tuner consists of two main parts:

  • The microcontroller unit
  • The RF unit containing the tuning coils and the variable capacitor.

Let’s see the schematic first:

DK7IH semi automatic antenna tuner V2 (schematic)
DK7IH semi automatic antenna tuner V2 (Schematic FULL SIZE)

Circuit description

Starting on the left side, you see the microcontroller unit equipped with an 8-bit AVR microcontroller (ATMega16 or similar). The user interface is very simple and made of 6 push buttons. These are connected to GND via switchable individual resistors leading to the ADC3 input of the cntroller. The pull up resistor for ADC3 is activated thus forming a voltage divider and thus an individual ADC value for each push button to be recognized by the software. This is done because it saves control lines and controller ports to a wide extent.

The LCD is a two line 16 characters LCD.

Output ports are connected to ULN2003 driver ICs. These ICs contain a driver capable to handle up to 30V DC including a clamp diode so this IC can drive mtors and relays directly. There are capacitors of 0.1uF connected to the port lines to minimize rf coupling effects.

The RF board is made of 7 coils wound on T68-2 toroids with the inductances given in the schematic:

  • L1: 0.1uH: 4 turns,
  • L2: 0.25uH: 7 turns,
  • L3: 0.5uH: 9 turns,
  • L4: 1uH: 13 turns,
  • L5: 2uH: 19 turns,
  • L6: 4uH: 26 turns,
  • L7: 8uH: 37 turns.

Wire gauge is 0.4mm. The inductors are shortened by a 12V relay each if neccessary. So you can (by binary calculation) set any value from 0.1 uH to close to 16uH.

An output transformer is used to give a balanced out for e. g. doublet antenns. It is 10 turns bifilar on a 2.5 cm toroid ferrite core of No. 43 material. If you use a non-balanced antenna you can leave out this transformer.

The capacitor in my construction is a 200pF max. butterfly capacitor with air as dielectric.  The advantage of a butterfly type is that it needs only 90° angle to turn it from minimum to maximum capacity. The motor (a 5V dc version) is connected via a 240:1 gear drive by TAMIYA. The motor is pulse driven so it can be directly connected to 12 Volts with running danger to damage it.

The drive has two outlets providing one axle at each side of the drive. To one of the axles I connected the capacitor, the other one connects to a potentiometer to report the current swing angle to the microcontroller. This allows precise feedback of the capacitor’s current position which is essential for setting it to the desired value. The value of this variable resistor does not really matter since it is only a simple voltage divider. Anything between 1k and 10k should fit. Make sure that you use a piece that is easy to turn to minimize friction. To connect the axles I used PVC tubing with an inside diameter of 3 mm.

Also included is a measurement section to give the user a current reading of VSWR. The coupler can be anything you should regard as proper. I used a strip power coupler from an old CB radio. But other systems should also work.

To compensate losses when tuning low frequencies I added a DC amplifier based on an operational dual system amplifier (LM358). There is no means to reduce sensitivity. This is done by regulating the input power of the driving transmitter. The software will give you a readout for FWD and REF power in the range from 0 to 999. Tune to maxmimun FWD and minimum REF energy and everything will be alright! 😉

Practical aspects

To minimize RF couping into the microcontroller I seperated the control board from the RF board by putting it on a seperate veroboard with an aluminium shielding underneath:

DK7IH semi automatic antenna tuner V2 (inside view)
DK7IH semi automatic antenna tuner V2 (inside view)

The RF board is mounted to the bottom of the case, here with dismantled controller board. The controller board is sited on top of the package.

DK7IH semi automatic antenna tuner V2 (inside view)
DK7IH semi automatic antenna tuner V2 (inside view)

On the right side there is the variable butterfly capacitor, on the board, centered you can see the motor plus the reduction drive. On the left side of this there is a small potentiometer that forms the turning angele detector. To connect this to the ADC of the controller it is highly recommended to use shielded cable!

To come to an end, here is the deveice positioned under the roof window of my shack directly connected to the ladder line:

DK7IH semi automatic antenna tuner V
DK7IH semi automatic antenna tuner V”

Thanks for reading and enjoy your radio! 73 de Peter (DK7IH)

The software

(Apology for having some comments in German. I have been using this code for centuries! 😉

/*****************************************************************/
/*              Antennatuner with ATMega 16 V2                   */
/*  ************************************************************ */
/*  Microcontroller:  ATMEL AVR ATmega16, 8 MHz                  */
/*                                                               */
/*  Compiler:         GCC (GNU AVR C-Compiler)                   */
/*  Author:           Peter Rachow DK7IH                         */
/*  Last cahnge:      2018-07-27                                 */
/*****************************************************************/

/*    PORTS */
// O U T P U T 
// LCD 
// RS      = PD2
// E       = PD3
// D4...D7 = PD4..PD7

//Coil relays: PC0...PC6
//Motor drive on/off: PD1
//Motor direction relay: PD0
//Extra capacitor 200pF: PC7 (not yet!)

//I N P U T
//ADC0: SWR-Meter 0
//ADC1: SWR-Meter 1
//ADC2:
//ADC3: Keys
//ADC4: Potentiometer for Capacitor position

#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/sleep.h>
#include <avr/eeprom.h>
#include <util/delay.h>

int main(void);

#define LCD_INST 0x00
#define LCD_DATA 0x01

#define MAXCAP 220
#define CAPDELAY 10
#define MAXBANDS 7

void lcd_write(char, unsigned char);
void set_rs(char);
void set_e(char);
void lcd_init(void);
void lcd_cls(void);
void lcd_line_cls(int);
void lcd_putchar(int, int, unsigned char);
void lcd_putstring(int, int, char*);
int lcd_putnumber(int, int, long, int);
void lcd_display_test(void);

//BAND DISPLAY & MISC
void show_band(int);
void show_meter(int, int, int);
void define_chars(void);

//Coils & Cpas
void set_coils(int);
void set_cap(int);
void rotate_cap(int);
int get_cap(void);

//ADC
int get_adc(int);
int get_keys(void);

//Delay
void wait_ms(int);

//String
int int2str(long, int, char *, int);
int stringlen(char *);


long runsecs = 0;

/**************************************/
/* Funktionen und Prozeduren fuer LCD */
/**************************************/
// LCD 
// RS      = PD2
// E       = PD3
// D4...D7 = PD4..PD7

/* Ein Byte (Befehl bzw. Zeichen) zum Display senden */
void lcd_write(char lcdmode, unsigned char value)
{
    int x = 16, t1;
	
    set_e(0); 

    if(!lcdmode)
	{
        set_rs(0);    //RS=0 => INST
	}	
    else
	{
        set_rs(1);    // RS=1 => DATA
	}	

    wait_ms(4);
	
    //Hi nibble
    set_e(1);
	for(t1 = 0; t1 < 4; t1++)
	{
	    if(value & x)
	    {
	       PORTD |= x;
	    }
        else	
	    {
           PORTD &= ~(x);
	    }  
		
		x <<= 1;
	}	
	set_e(0);
	
	x = 16;

	// Lo nibble
	set_e(1);
	for(t1 = 0; t1 < 4; t1++)
	{
	    if((value & 0x0F) * 16 & x)
	    {
	       PORTD |= x;
	    }
        else	
	    {
           PORTD &= ~(x);
	    }  
		
		x <<= 1;
	}
    set_e(0);

}

//RS
void set_rs(char status) //PD2  
{
    if(status)
	{
        PORTD |= 4;
	}	
    else
	{
	    PORTD &= ~(4);
	}	
}

//E
void set_e(char status)  //PD3
{
    if(status)
	{
        PORTD |= 8;
	}	
    else
	{
	    PORTD &= ~(8);
	}	
}

/* Ein Zeichen (Char) zum Display senden, dieses in */
/* Zeile row und Spalte col positionieren           */
void lcd_putchar(int row, int col, unsigned char ch)
{
    lcd_write(LCD_INST, col + 128 + row * 0x40);
    lcd_write(LCD_DATA, ch);
}


/* Eine Zeichenkette direkt in das LCD schreiben */
/* Parameter: Startposition, Zeile und Pointer   */
void lcd_putstring(int row, int col, char *s)
{
    unsigned char t1;

    for(t1 = col; *(s); t1++)
	{
        lcd_putchar(row, t1, *(s++));
	}	
}


/* Display loeschen */
void lcd_cls(void)
{
    lcd_write(LCD_INST, 1);
}


/* LCD-Display initialisieren */
void lcd_init(void)
{
    /* Grundeinstellungen: 2 Zeilen, 5x7 Matrix, 4 Bit */
    lcd_write(LCD_INST, 40);
    lcd_write(LCD_INST, 40);
    lcd_write(LCD_INST, 40);

    //MAtrix 5*7
    lcd_write(LCD_INST, 8);

    /* Display on, Cursor off, Blink off */
    lcd_write(LCD_INST, 12);

    /* Entrymode !cursoincrease + !displayshifted */
    lcd_write(LCD_INST, 4);
	
	//4-Bit-Mode
    lcd_write(LCD_INST, 2);	
	
	lcd_cls();
}


//Write number with given amount on digits to LCD
int lcd_putnumber(int col, int row, long num, int dec)
{
    char *numstr = malloc(32);
    int l = 0;
    if(numstr != NULL)
    {
        int2str(num, dec, numstr, 16);
        lcd_putstring(col, row, numstr);
        l = stringlen(numstr);
        free(numstr);
        return l;
      
    } 
    return 0;
}


void lcd_line_cls(int ln)
{
    int t1;
	
	for(t1 = 0; t1 < 15; t1++)
	{
	    lcd_putchar(ln, t1, 32);
	}
}	
/*****************************************/
//           STRING FUNCTIONS
/*****************************************/
//INT 2 ASC
int int2str(long num, int dec, char *buf, int buflen)
{
    int i, c, xp = 0, neg = 0;
    long n, dd = 1E09;

    if(!num)
	{
	    *buf++ = '0';
		*buf = 0;
		return 1;
	}	
		
    if(num < 0)
    {
     	neg = 1;
	    n = num * -1;
    }
    else
    {
	    n = num;
    }

    //Fill buffer with \0
    for(i = 0; i < 12; i++)
    {
	    *(buf + i) = 0;
    }

    c = 9; //Max. number of displayable digits
    while(dd)
    {
	    i = n / dd;
	    n = n - i * dd;
	
	    *(buf + 9 - c + xp) = i + 48;
	    dd /= 10;
	    if(c == dec && dec)
	    {
	        *(buf + 9 - c + ++xp) = '.';
	    }
	    c--;
    }

    //Search for 1st char different from '0'
    i = 0;
    while(*(buf + i) == 48)
    {
	    *(buf + i++) = 32;
    }

    //Add minus-sign if neccessary
    if(neg)
    {
	    *(buf + --i) = '-';
    }

    //Eleminate leading spaces
    c = 0;
    while(*(buf + i))
    {
	    *(buf + c++) = *(buf + i++);
    }
    *(buf + c) = 0;
	
	return c;
}

//STRLEN
int stringlen(char *s)
{
   int t1 = 0;

   while(*(s + t1++));

   return (t1 - 1);
}


//BAND DISPLAY
void show_band(int b)
{

    char *band_str[] = {"80m", "40m", "30m", "20m", "17m", "15m", "12m", "10m"};
    lcd_putstring(0, 13, band_str[b]);
}

//Meter (max. value = 25)
void show_meter(int value, int value_old, int pos)
{
	#define MAXBLOCKS 4
    int v1, v2, v3, i1;
	
    //Clear meter (5 chars) if new value > old value
    if(value < value_old)
    {
        for(i1 = 0; i1 < MAXBLOCKS; i1++)
        {
	        lcd_putchar(1, i1 + pos * 6, 32);
        }
	}
			
	v1 = (int) value / MAXBLOCKS; //Full blocks, 5 cols each
    v2 = value - v1 * MAXBLOCKS;  //Rest
	if(v1 > MAXBLOCKS)
	{
		v1 = MAXBLOCKS;
	}
	
	if(value >= value_old)
	{
	    v3 = (int) value_old / MAXBLOCKS; //Full blocks, 5 cols each, already drawn
	}
	else
	{  
		v3 = 0;
	}	    
	
	//Full blocks	
	for(i1 = v3; i1 < v1; i1++)
	{
	    lcd_putchar(1, i1 + pos * 6, 4); 
	}
	
	//Rest
	if(i1 < MAXBLOCKS)
	{
		if(v2)
	    {
	        lcd_putchar(1, i1 + pos * 6, v2 - 1);
	    }
        else
        {
            lcd_putchar(1, i1 + pos * 6, ' ');
        }
	}
}

//PROGRAM CUNSTOM CHARS FOR S-SMETER
void define_chars(void)
{
    int i1;
	unsigned char adr = 64;
						  
	unsigned char b1[] = {0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, //S-Meter blocks 
	                      0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00,
						  0x00, 0x00, 0x1C, 0x1C, 0x1C, 0x1C, 0x00, 0x00,
						  0x00, 0x00, 0x1E, 0x1E, 0x1E, 0x1E, 0x00, 0x00,
						  0x00, 0x00, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00,
						  	0x0,0x0,0x4,0xe,0x4,0x0,0x0, 0, //+
						  	0x4,0xe,0x4,0x0,0x4,0xe,0x4,0, //++
						  0x00, 0x01, 0x02, 0x12, 0x0A, 0x04, 0x00, 0x00  //Tick
						  
						  };					  
	//Dummy operation!
	lcd_write(LCD_INST, 0);
	lcd_write(LCD_DATA, 0);

    //Load data into CGRAM
	for(i1 = 0; i1 < 64; i1++)  
	{
	    lcd_write(LCD_INST, adr++);
		lcd_write(LCD_DATA, b1[i1]);
	}
}		


/////////////////////////////////////
//
// C O I L S & C A P S
//
/////////////////////////////////////
void set_coils(int pattern)
{
    int unsigned t1, x = 1, p = pattern;
    
    //Inductance in uH  * 100
    int i0[] = {10, 25, 50, 100, 200, 400, 800}, i1 = 0;
    
    //lcd_putstring(0, 10, "    ");
    //lcd_putnumber(0, 10, p, -1, -1, 'l', 0);
    
    for(t1 = 0; t1 < 7; t1++)
    {
		if(p & x)
        {
            PORTC &= ~(x);      
            i1 += i0[t1];
        }
        else
        {    
            PORTC |= x;
        }
        x <<= 1;
     }       
     lcd_putstring(0, 0, "       ");
     lcd_putstring(0, lcd_putnumber(0, 0, i1, 2), "uH");
}

void set_cap(int cap)
{
               
    if(cap < 0 ||cap > MAXCAP)
    {
		return;
	}
	
	lcd_putstring(0, lcd_putnumber(0, 7, cap, -1) + 7, "pF");
	wait_ms(500);
	/*	
    lcd_putnumber(0, 0, get_adc(4), -1, -1, 'l', 0);
    lcd_putnumber(0, 8, cap, -1, -1, 'l', 0);
    lcd_putnumber(1, 0, (int) adc0, -1, -1, 'l', 0);	
    */       
    
    while(get_cap() > cap)
    {
		rotate_cap(0);
		lcd_putstring(0, 7, "      ");
        lcd_putstring(0, lcd_putnumber(0, 7, get_cap(), -1) + 7, "pF");
        if(get_keys() == 5 || get_keys() == 6) //Quit if band QSY key is pressed
        {
			return;
		}	
    }
    
    while(get_cap() < cap)
    {
		rotate_cap(1);
		lcd_putstring(0, 7, "      ");
        lcd_putstring(0, lcd_putnumber(0, 7, get_cap(), -1) + 7, "pF");
        if(get_keys() == 5 || get_keys() == 6) //Quit if band QSY key is pressed
        {
			return;
		}	
    }
        
    

}

//Measure real cap val from sensor
int get_cap(void)
{
	double val = (double) (get_adc(4) - 384) * MAXCAP / 256;
	
	return (int) val;
}
	
void rotate_cap(int direction)
{
	if(direction)
	{
		PORTD &= ~(1); //RelayOFF      
	}
	else
	{
	    PORTD |= 1;   //Relay ON	
	}	
	
	PORTD |= 2;   //Motor ON
	wait_ms(CAPDELAY);
	PORTD &= ~(2);  //Motor OFF      
	wait_ms(CAPDELAY);
}	


ISR(TIMER1_OVF_vect)   	   // Timer1 Überlauf
{ 
    runsecs++;
    TCNT1 = 57724;	  
} 

//***************************************************
//                      ADC
//***************************************************

int get_adc(int adcmode)
{
    int adc_val = 0;
	
	
	ADMUX = (ADMUX &~(0x1F)) | (adcmode & 0x1F);     // Kanal adcmode aktivieren PA0=TUNE
    wait_ms(3);
	
    ADCSRA |= (1<<ADSC);
	wait_ms(3);
	
	adc_val = ADCL;
    adc_val += ADCH * 256;   
	
	while(ADCSRA & (1<<ADSC));
	
	return adc_val;
}	

//Read keys via ADC0
int get_keys(void)
{

    int key_value[] = {18, 22, 29, 43, 74, 132};  
       	
    int t1;
    int adcval = get_adc(3);
        
    //TEST display of ADC value 
    /*
    lcd_cls();
    lcd_putnumber(0, 0, get_adc(3), -1, -1, 'l', 0);
    return 0;    	
    */
    
    for(t1 = 0; t1 < 6; t1++)
    {
        if(adcval > key_value[t1] - 2 && adcval < key_value[t1] + 2)
        {
			 return t1 + 1;     
        }
    }
    
    return 0;
}

/***************************************************/
/* Wartezeit in Millisekunden bei fck = 8.000 MHz  */
/***************************************************/
void wait_ms(int ms)
{
  int t1, t2;

  for(t1 = 0; t1 < ms; t1++)
    for(t2 = 0; t2 < 137 * 8; t2++)
      asm volatile ("nop" ::);
}

int main()
{
	int t1;
	int key;     //Keystroke
	int adc_val; //Value of ADC
    int i = 65;  //L
    int band = 0;
    int l1 = 0, c1 = 0;
    
    //Standard values for DK7IH antenna
    //L=      - (128), 8uH(64), 4uH(32), 2uH(16), 1uH(8), 0.5uH(4), 0.25uH(2), 0.125uH(1)
    int std_l [] = {65, 33, 12, 8, 6, 4, 3, 2, 1};
    int std_c [] = {172, 41, 75, 110, 88, 55, 33, 17};
    
    //Meter data
    int s0, s1;
    int s0_old = -1, s1_old = -1;
    int s0off, s1off;
    int loopcnt0 = 0;;
        
    int ok = 0;
    long runsecs2 = 0;
	
	/* Set ports */
    /* OUTPUT */
    DDRB = 0x1F; //Relays 1.55 of cap switching
    DDRC = 0x7F; //Relays for coils             
    DDRD = 0xFF; //LCD data on PD4...PD7
                 //LCD RS:PD2, E:PD3
                 //PD0, PD1: Relay 6 and 7 of cap switches
    
    PORTA = 0x08; //Pullup resistor for keys' input   
    
    //Display
    lcd_init();
	wait_ms(500);
	lcd_cls();
	lcd_putstring(0, 0, " DK7IH Antenna");				
	lcd_putstring(1, 0, " Tuner Ver. 2.0");				
	wait_ms(500);
	lcd_cls();
			
	//Watchdog abschalten
	WDTCR = 0;
	WDTCR = 0;
    	
	//ADC initialisieren
    ADMUX = (1<<REFS0);     // Referenz = AVCC
    ADCSRA = (1<<ADPS2) | (1<<ADPS1) | (1<<ADEN); //Frequenzvorteiler 64 u. //ADC einschalten
	ADCSRA |= (1<<ADSC); //Eine Wandlung vornehmen
	while (ADCSRA & (1<<ADSC)); //Eine Wandlung abwarten
    adc_val = ADCL;
    adc_val += ADCH * 256;   //Wert auslesen
	adc_val = 0;
	
	//Timer 1
	TCCR1A = 0;                      // normal mode, keine PWM Ausgänge
    TCCR1B = (1<<CS12) + (1<<CS10) ;   // start Timer mit Systemtakt, Prescaler = /1024
	                                    //Auslösung des Overflow alle Sekunde sec.
    TIMSK = (1<<TOIE1);   // overflow aktivieren.
	TCNT1 = 57724;        //Startwert für Sekundentakt

    //Define custom chars for meter
    //define_chars();

    //Load standard data if eeprom cell empty
    for(t1 = 0; t1 < 8; t1++)
    {
		if(eeprom_read_byte((uint8_t*)(t1 * 2)) == 255)
		{ 
			eeprom_write_byte((uint8_t*)(t1 * 2), std_l[t1]);
			eeprom_write_byte((uint8_t*)(t1 * 2 + 1), std_c[t1]);
		}
	}		
				
		
    //Get recent data           		
   	band = eeprom_read_byte((uint8_t*)32);
   	if(band < 0 || band > MAXBANDS)
	{
	    band = 3;
	}
	show_band(band);
	
	l1 = eeprom_read_byte((uint8_t*)(band * 2));
	if(l1 >= 0 && l1 < 128)
	{
		set_coils(l1);
	}
	else
	{
		set_coils(65);
		lcd_line_cls(1);
		lcd_putstring(0, 0, " -x-uH");
		wait_ms(1000);
	}
	c1 = eeprom_read_byte((uint8_t*)(band * 2) + 1);	
	if(c1 >= 0 && c1 < MAXCAP)
	{
		set_cap(c1);
	}
	else
	{
		set_cap(110);
		lcd_line_cls(1);
		lcd_putstring(0, 0, " -x-pF");
		wait_ms(1000);
	}	
    sei();

    show_band(band);
    
    //Calculate 0-offset of swr meter
    s0off = get_adc(0);
    s1off = get_adc(1);
    
    for(;;) 
	{
		key = get_keys();
		if(i > 0 && key == 2)
		{
			i--;
		    set_coils(i);
		    wait_ms(50);
		}    
		
		if(i < 127 && key == 1)
		{
			i++;
		    set_coils(i);
		    wait_ms(50);
		}    
				
		while(get_cap() > 0 && key == 4) //C(-)
		{
			rotate_cap(0);
		    lcd_putstring(0, 7, "      ");
            lcd_putstring(0, lcd_putnumber(0, 7, get_cap(), -1) + 7, "pF");     
            wait_ms(100);
            key = get_keys();
		}    
		
		while(get_cap() < MAXCAP && key == 3) //C(+)
		{
			rotate_cap(1);
		    lcd_putstring(0, 7, "      ");
            lcd_putstring(0, lcd_putnumber(0, 7, get_cap(), -1) + 7, "pF");     
            wait_ms(100);
            key = get_keys();
		}    

        if(band > 0 && key == 6)         //Band (-)
        {
			band--;
		
			while(!eeprom_is_ready());
		    eeprom_write_byte((uint8_t*)32, band);
										
			lcd_putstring(1, 0, "Recalling.");
				
			l1 = eeprom_read_byte((uint8_t*)(band * 2));
			c1 = eeprom_read_byte((uint8_t*)(band * 2 + 1));

	        if(l1 >= 0 && l1 < 128)
	        {
		        set_coils(l1);
		        i = l1;
	        }
	        else
	        {
		        set_coils(65);
		        lcd_putstring(0, 0, " -x-uH");
		    }    
									
														
			if(c1 >= 0 && c1 <= MAXCAP)
			{
			    set_cap(c1);
			}	
			else
			{
				lcd_putstring(0, 7, "-x-pF");
			}	
				
			show_band(band);
			lcd_putstring(1, 0, "             ");
			while(get_keys());
		}
		
        
        if(key == 5) //Band (+)
		{
		    show_band(band);
			lcd_line_cls(1);
			
		    runsecs2 = runsecs;
			ok = 0;
			lcd_putstring(1, 0, "Waiting....");
			while(get_keys() == 5 && !ok)
			{
			    
			    lcd_putnumber(1, 10, 3 - (runsecs - runsecs2), -1);
				if(runsecs - runsecs2 > 2)
				{
				    ok = 1;
				}	
			}	
			
			if(runsecs > runsecs2 + 1) //Key has been pressed for longer than a second, new values for current band to be set
			{                          //Also store values in EEPROM 
			    while(!eeprom_is_ready());
				eeprom_write_byte((uint8_t*)(band * 2), i); 
				
			    while(!eeprom_is_ready());
				eeprom_write_byte((uint8_t*)(band * 2 + 1), get_cap());
				
				while(!eeprom_is_ready());
				eeprom_write_byte((uint8_t*)32, band);
								
	            lcd_line_cls(1);
				lcd_putstring(1, 0, "Stored.");				
				wait_ms(1000);
				lcd_line_cls(1);
			}
            else	
			{
			    if(band < MAXBANDS) //Change band 1 up
				{
				    band++;
				}
                				
				while(!eeprom_is_ready());
				eeprom_write_byte((uint8_t*)32, band);
				
				show_band(band);
				
				lcd_putstring(1, 0, "Recalling.");
				
			    l1 = eeprom_read_byte((uint8_t*)(band * 2));
				c1 = eeprom_read_byte((uint8_t*)(band * 2 + 1));
								
	            if(l1 >= 0 && l1 < 128)
	            {
		            set_coils(l1);
		            i = l1;
	            }
	            else
	            {
		            set_coils(65);
		            lcd_putstring(0, 0, " -x-uH");
		            wait_ms(1000);
		        }    
									
														
			    if(c1 >= 0 && c1 <= MAXCAP)
			    {
			        set_cap(c1);
			    }	
			    else
			    {
				     lcd_putstring(0, 7, "-x-pF");
			    }	
			    lcd_putstring(1, 0, "             ");
			}	
		}
		
		//Meter check
        if(loopcnt0++ > 10)
        { 
            
            s0 = get_adc(0) - s0off;
            s1 = get_adc(1) - s1off;
            
            if(s0 != s0_old)
            {
				if(s0 > 999)
				{
					s0 = 999;
				}	
				lcd_putstring(1, 0, "FWD:    "); 
				lcd_putnumber(1, 4, s0, -1);
				s0_old = s0;
			}
			
			if(s1 != s1_old)
            {
				if(s1 > 999)
				{
					s1 = 999;
				}
				lcd_putstring(1, 8, "REF:     "); 
				lcd_putnumber(1, 12, s1, -1);
				s1_old = s1;
			}	
            
            loopcnt0 = 0;
        }    
        
	}
	return 0;
}


 

A compact project: The “Micro42” – Another “shirt pocket” SSB transceiver.

The Micro42 - A really pocket sized SSB QRP transceiver for 7MHz

Having deferred the work on the “micro multibander” for some time I finished another small QRP rig (this one for 7MHz) that is suitable for my summer excursions by bike or hiking the local mountains here in the State of Rhineland-Palatinate or the Black Forest that is not that far away on the other side of the Rhine valley.

Besides, this transceiver to be discussed here is some sort of a “remake” of a 20 meter rig I built 3 years before. And this time, the transceiver really fits into a shirt pocket without having to wear “XXXXL”- clothing. ;-):

The Micro42 - A really shirt pocket sized QRP SSB transceiver
The Micro42 – A really shirt pocket sized QRP SSB transceiver (this is my work shirt, so don’t mind the stains! 😉 )

General circuit description (instead of presenting a block diagram)

The rig uses two mixers NE602 plus one filter as central elements. The signal way is reversed when switching from receive to trasmit mode. This is done by 2 relays and is a well known technique for simple QRP rigs. You will find lots of equivalent ideas on the internet (Example 1, Example 2).

But not to ignore the shortcomings of these designs: They are somehow inferior to my requirements, particularly concercing receiver performance. I prefer to have higher signal gain and an AGC circuit. AGC for me is a must. But these designs can be expanded easily, so I added an AGC controlled interfrequency amplifier with dual gate MOSFET BF998 into the receiver’s signal path enhancing performance significantly.

Frequency layout

The frequency generation of the superhet transceiver scheme is simple: Again I use one interfrequency (i. e. 9MHz). The VFO is DDS based on AD9835 operating below the desired radio frequency, which means that it is set to the range of about 2 MHz. Due to this low frequency you could replace the DDS by a VFO if you don’t like the relatively complex work with the software programming and microcontroller stuff). A 2MHz VFO can also be made very stable, so this is an alternative not to be ignoered.

Due to the fact that the schematic is not very difficult to analyze you are kindly requested to refer to it for further talking:

Schematic - The Micro42 - A really shirt pocket sized QRP SSB transceiver
Schematic – The Micro42 – A really shirt pocket sized QRP SSB transceiver. Click for full size picture

Circuit description

In the center of the schematic you can see the main elements of the circuit: One SSB filter (9MHz), correctly terminated by 2 resistors of 1k each (to ensure proper filter response curve) and two relays with a double set of switches. These relays reverse the way the signal travels through the filter. The advantage of this: You can use the integrated oscillator of the NE612 controlled by a crystal and a tuning capacitor to set the carrier frequency correctly for the lower sideband because the mixer is used as SSB generator and as product detector in common.

A word on chosing the proper relays: An intense examination of the relays’ data sheet is essential. I built a prototype of this transceiver on a breadboard prior to soldering the components to a veroboard. I found that some SMD relays have signifikant coupling capacities between the unused relay contacts (in the range of some Picofarads). So stray coupling was a severe problem. Later I used some second-hand Teledyne RF relays that I had purchased via ebay two years ago (price originally 50€!) for 1€ each. These relays are absolutely superb!

The receiver

Before we go: In the circuit scheme above I missed out the antenna switch relay because I think every homebrewer knows what to do in this case. 😉 So the receiver’s signal path starts with a band filter for 7MHz consisting of to tuned LC circuits.  The coupling is relatively loose. As coils I use the well known coil formers in TOKO style with 5.5mm outside measure.

Coil data for the 7MHz band pass filter (BPF) is 39 turns primary and 9 turns secondary of 0.1 mm enameled wire. The respective capacitor is 33pF. This is a high L to C ratio which gives you excellent LC quality factor. This is mandatory especially when working on the 40 meter band, because of the strong broadcasters starting from 7.200 kHz intermodulation might be a problem when the receiver is connected to a high gain antenna and broadcasters’ signals might overload the first mixer (remember that NE612 has a relatively low IM3!). If you still should have problems coping with too strong out-of-band signals you can reduce the coupler from 4.7pF down to 2.7pF.

In practical terms I could not detect any unwanted signal products even when using an antenna with high rf output voltage. One reasons for this is, that there is no rf preamplifier for the receiver. This avoids overloading the first mixer generally.

The NE612 has two mixer inputs and two outputs. This makes it very suitable for this sort of radio. In receive mode pin 2 of the right NE612 is used as signal input. VFO signal is fed into pin 6. The resulting mixer products are taken out from pin 4. Next the 9MHz filter follows from right to left.

The 9MHz IF signal then is fed into an IF amplifier. This one is equipped with a dual gate MOSFET (BF998), gain is about 15dB when full AGC voltage is applied wich leads to about 6V by the 1:1 volatge divider in the applied to gate 2 of the MOSFET.

The left NE612 is the product detector. I use the internal oscillator with a 9MHz crsytal and a tuning capacitor here. This saves building an extra oscillator and simplifies the rig again.

One AF low pass filter made of 1k resistor, 100uF rf choke and a 0.1 uF capacitor eliminates high frequency remainders generated by the mixing process.

The audio stages are also made simple: One preamplifier (using bipolar transistor in grounded emmitter circuit) and a final stage with LM386 transform the signal to a level that is sufficient to be fed into a small 8 ohm loudspeaker or a set of standrd MP3-player headphones. Because the rig is very small and there was definetely no space for a loudspeaker I use headphones instead.

Keep an eye on the power supply switching of the two audio stages. The problem was to eliminate the switching click and pops to a minimum and to avoid acoustic feedback when unsing a loudspeaker. So the audio preamp is only connected to DC on receive. When switching to transmit the charged capacitors avoid instant cut off supplying some Milliseconds DC to the amp until significantly discharged. The main amplfier on the other hand is connected to permanent DC supply. So it won’t pop when switching from tx to rx an vice versa but can cause feedback. To avoid feedback a transistor is used to cut the speaker/earphone from the power amplifier.

AGC

AGC is audio derived. A two stage amplifier provides a DC voltage analog to the audio input sginal strength. First amplifier stage is a common emitter bipolar transistor supplying sufficient audio voltage. This voltage is rectified by a two diode circuit letting only the positive halfways pass. You can use silicon diodes (1N1418) oder Schottky diodes here. An electrolytic capacitor (100uF/6V) provides the time constant respectively DC decay once the signal has disappeared. Output of the DC stage is split. The collector is connected to 12V via a 4.7k resistors causing a voltage drop when the transitor’s conductivity increases. The emitter is fed to the ADC of the microcontroller (pin ADC1) causing a proportional voltage to the voltage of the applied audio signal so that on the OLED an S-meter can be displayed.

The transmitter

An electret microphone picks the operator’s voice. The signal output level of these microphones is high enough to drive the left NE612 (which serves as balanced modulator in this case) directly. Signal input for the mixer should be 200mV RMS according to data sheet. An electret produces about 0.5 to 1 V pp if spoken with a decent voice in the distance of some centimeters. So you have more than enough audio signal power for the modulator.

BTW: Carrier suppression of the modulator is excellent. I achieved 56dB without doing anything else!

The resulting DSB signal then is fed into the SSB filter, the SSB signal subsequently is directly sent into the right NE612. A band pass filter for 7 MHz eliminates the unwanted mixer products. You should have 400 to 500 mV pp of rf signal here when the transmitter input is fully driven. I recommend a two-tone test generator to check out the linearity of this and the remaining amplifier stages!

Next parts of the transmitter are a band pass filter (same coils and capacitors like th rx bandpass filter), a preamplifier and a driver. The later should put out about 150 mW into a 50 ohm load. They are made more linear by emitter degeneration (4.7 and 2.2 ohm resistors for predriver and driver) and negative feedback. This helps to ensure that transmitter performance is fine when IMD3 products are concerned even if the main IMD3 problems usually occur in the final stage.

To transfer the rf power into the final stage proper impedance matching is mandatory. Input impedance of the final stage is fairly low (<10ohms), therefore a broadband (down)transformer is used. Data is: Core T37-43, primary 12 turns, secondary 4 turns of 0.4 mm enamled wire.

Last stage is a single ended linear amplifier in AB mode equipped with a 2SC1969 rf power transistor by eleflow.com.

BIAS circuit: The combination of the 1k resistor, a silicon diode (1N4002 or equ.) and a capacitor sets up the correct bias. Bias is fed into the cold end of the input transformer. Quiescant current should be around 40mA. A good thermal contact between the diode and the transistor is recommended. As the transistor gets warmer the diode will increase its conductivity so reducing bias current. This will prevent thermal runaway effectively!

To avoid bulky output transformers the PI-filter (7MHz LPF) is part of the tank circuit of the final amplifier transistor. For this power level this is an acceptable and practical solution because the output impedance of the stage is nearly equivalent to 50 Ohms. A certain mismatch is not a severe problem. DC to the final transistor is applied via an rf choke, for exact data please refer to the schematic!

T2 helps to suppress unwanted signals that I encountered when taking the transmitter from the dummy load test environment to a real antenna. I observed unwanted parasetic oscillation in the range of about 1MHz. T2 has a low reactance for this frequency range thus eliminating the oscillations in a reilable way by short circuiting them towards ground.

Powered with 12.5V DC the transmitter will put out slightly more than 5 watts PEP.

DDS VFO

AD9835 is a simple but well performing 10-bit DDS chip made by Analog Devices (AD). It is controlled via 3 SPI lines transmitting the frequency data. Maximum output frequency is around 16MHz when the chip is clocked with its maximum clock rate of 50 MHz. Oscillator output voltage is some hundred millivolts peak-to-peak, so you can connect the output directly to pin 6 of the NE612 mixer.

Control signals come from an Arduino Pro Mini board. The microcontroller in this module is, if you are an Arduino user, preinstalled with a bootloader program. I overwrote this small portion of code and use the ATMega168, which is the core of the Arduino, in “native” mode. My software is written in C and transferred via “AVR dude” software using the ISP lines MOSI, MISO, SCK and RESET. These lines are not in the schematic, please refor to ATmega168 data sheet. Alternatively you can use, like shown in the schematic, an ATmega168 controller. So you have to de neccessary wiring on your own.

You will find the source code here. I packed it into an Open Document Text File because of problems I encountered when I tried to store the code into this Blogtext. If you need a compiled HEX-file, please feel free to email me!

Display is a very small OLED with 64 by 32 pixels. The OLED is, to my point of view, a little bit noisy. To suppress any rf traveling on VDD line I use an 82 ohm resistor and a set of bypass capacitors of 100uF and 0.1uF capacity closely connected  to the OLED VDD pin to GND.

A low pass filter by the output of the DDS ensures spectral purity and avoids clock oscillator feed through. Remember that if you need another output frequency other than 2 MHz you should redesign the low pass filter.

Frequency control

Tuning is done by a rotary encoder connected to PD5 and PD6 of the microcontroller. I use the pull up resistors internal to the microcontroller, so you won’t see any other things than the mere encoder.

Tunings steps are selected by pushing the encoder knob or another suitable push button. This button is connected to ADC0 in the ATMega168 via a 3.9k resistor. The resulting ADC voltage might be problem because of a certain variation in the values of the pull up resistors that form the second resistor of the voltage divider.  There is an outcommented section in the code that will show you the exact ADC value that has to be typed into the code so that key recognition works exactly.

The button once pushed will increase the tuning step by a certain amount of Hz. Steps are 10, 50, 100 (standard step), 250, 500, 1000 and 5000 Hz in and endlessly revolving chain.  The step will be reset to 100Hz (standard tuning step) by leaving the tuning knob idle for 2 seconds. That’s all with the controls. Very simple, but sufficient.

Practical aspects

The transceiver is constructed on a double sided veroboard with 6 by 8 centimeters area. Components are through hole and SMD where available. The Arduino is mounted to the front panel (another Veroboard carrying the controls etc.) as well as the OLED is. The veroboard is inserted into an aluminium frame connected to the front panel with 4 lateral M2 screws:

Mounting frame - The Micro42 - A really shirt pocket sized QRP SSB transceiver
Mounting frame – The Micro42 – A really shirt pocket sized QRP SSB transceiver

Design hints:

Wiring can be made by using the colored lines stripped from old parallel printer cables. These cables have a diameter of precisely 1mm an fit through the holes of the veroboard excactly.

If you connect any external components that are not on the same veroboard use standard 2.54 mm (0.1″) male and female board connectors! This will make it much easier to dismantle and reassemble the rig in case troubleshooting is neccessary.

Use M2 srews instaed of M3 when building very small rigs like this one!

The reverse side of the main arrangement:

Reverse side of mounting frame - The Micro42 - A really shirt pocket sized QRP SSB transceiverord-and-front-assembled-in-frame-reverse
Reverse side of mounting frame – The Micro42 – A really shirt pocket sized QRP SSB transceiver

Two brass made bends (from the local hardware store and each cut to a length of 8 centimeters) hold the PCB inside the mounting frame. A winding has been cut into the brass to fix the bends with screws in M2.

Final assembly

Together with 2 halves of a bent aluminium cabinet covered with “DC-fix” (a German manufacturer of self-adhesive PVC coating) the final rig looks like that:

The Micro42 - A really pocket sized SSB QRP transceiver for 7MHz
The Micro42 – A really pocket sized SSB QRP transceiver for 7MHz

So, that’s the end of the story so far. Now it’s time for going outdoor and test the rig in field use. 😉

73 and thanks for watching!

Peter (DK7IH)

A Micro Multibander – Step by step (Part III): The Receiver (Overview)

Work is in progress. The recent weeks I finished all the 6 modules that are going to be the receiver:

  • Band pass filter section
  • Relay switches for switching the BPFs
  • RF preamp, RX mixer and IF preamp
  • IF main amp
  • Product detector and AF amp section
  • AGC unit

Mounted together to an aluminium carrier board it looks like this:

Receiver board for Micro Multiband QRP SSB TRX (C) DK7IH 2018
Receiver board for Micro Multiband QRP SSB TRX (C) DK7IH 2018

On the picture the board is not equipped with the neccessary wiring yet to give the reader more sight on the single circuits. Next I will draw a schematic of each board to point out the used circuitry for those who want to build this or a similar receiver.

First test are promising so far, the receiver is sensitive, has a very low noise figure (due to dual gate MOSFETs in the preamp and the two main IF amp stages) and has shown no problems to cope with high out-of-band broadcaster signals on the 40 meter band which is due to the SBL-3 mixer I have used that has a good IM3 performance..

Thanks for watching an 73 de Peter (DK7IH)

A Micro Multibander – Step by step (Part II): VFO and Front Panel

In the last entry about my new project, a micro multibander for QRP SSB HF use, I referred on the circuits of the Si5351 VFO, the microcontroller, OLED module an the other digital circuits controlling the transceiver.

This is the practical side, now: All the digital circuits are placed behind the front panel. This is for practical (to save space in the main cabinet) and electronic reasons. By keeping the digital leads as short as possible you make it is easier avoiding hum, noise and other unwanted radio signals penetrating into your analog circuits, mainly the reciever.

This is how the front section looks from the user side:

Front panel of a SSB QRP micro multiband transceiver for SSB (C) 2018 DK7IH)
Front panel of a SSB QRP micro multiband transceiver for SSB (C) 2018 DK7IH)

The 3 potentiometers on the left (still awaiting suitable knobs) are for audio volume, receiver gain and mic gain. A switch will allow to switch the AGC from fast to slow. The S-meter has been taken from an old CB mini radio. All does not fit that much, some mechanical work still has to be done. 😉

Front panel of a SSB QRP micro multiband transceiver for SSB (C) 2018 DK7IH)
Front panel of a SSB QRP micro multiband transceiver for SSB (C) 2018 DK7IH)

This is the module taken from the side. All electronic stuff is mounted onto a 8cm x 6cm double sided veroboard. I use M2 spacers of various lengths to keep the “subboards” in place, like the Si5351 breakout, that you can see in the middle of the picture. These spacers are available from Chinese vendors on ebay and help a lot to build very compact electronic stuff. All joints and bolts are kept in M2, too.

The module is finished with a 1.5mm aluminium board where the plugs for the connectors are fed through. These connectors will be equipped with home-made plugs (1″ technology) and then connected to the respective parts of the analog circuits like receiver or transmitter.

qrp-ssb-multiband-micro-dk7ih-frontpanel-side2
Front panel of a SSB QRP micro multiband transceiver for SSB (C) 2018 DK7IH)

Here is another view of the lateral arrangement: The old-style S-meter stripped from an old HANDIC-brand CB radio was purchased on ebay for a few Euros. There ist still a lot of old CB stuff there, giving enthusiast homebrewers a large stock in interesting electronic and radio-related material.

(To be continued)

A Micro Mulibander – Step by step (Part I)

This project tries a new personal approach in designing a very small (i. e. a micro) QRP radio. And also new is the way I want to report about it. The blog entries will be published more or less simultanously to the building progress of the respective modules.

1 A brief project description

The main objective is to set up a SSB QRP transceiver for 6 HF bands (similar to my 5-bander introduced in 2015) now starting with 160m, then 80m, 40m, 20m, 15m and 10m at last.

Another idea I have in mind is to build the rig from separate modules for each single stage so that each main circuit (mainly receiver and transmitter section) is constructed with the needed stages on verobaords that are mechanically identical.

The idea behind that is that a board which does not show top performance in function (or even completely fails) can be changed quickly and an improved version can be installed easily without the need to throw the whole receiver (for example) into the junk box labelled with “failed projects”.

Band switching will be done by small relays again (I purchased 60 SMD relays for 40€ some months ago). The band filter section will be shared by tx and rx section this time. This saves space and reduces effort.

The transmitter will be a 4 stage unit again (more or less the same like in my 5 bander). Output power projected is 5 to 10 watts on all the bands.

The receiver is designed once again as a single conversion superhet because experiments with double conversion were not successful due to a large number of spurs audible in the receiver.

The first mixer is set to be an SBL-3 diode ring mixer. This will give the receiver a very good handling of strong signals, I hope. IF amplifier will be a two staged one with dual gate mosfets controlled by an audio derived AGV voltage. The rest? The usual suspects, I would say. Wait and see!

1.1 The VFO module

I have become quite familiar with SiLab’s Si5351 oscillator module the recent months. I first used it in my “Micro 20-3” trx which was a success. The module is very small, completely ready for use (I’m still using a breakout board made by Adafruit) and able to handle 5V. It provides 3 oscillators that can be programmed independently to put out something lieke a square wave ranging from 8kHz to 160MHz. I have developed a software that avoids any tuning noise, so, this oscillator (which is a clock oscillator by intention) can be used as a VFO for an amateur project.

To keep the effort simple, I reused the 1306 oled module that you can see in lots of my previous projects. Both boards (Si5351 and 1306 oled) are controlled by I²C-bus which allowes me to use a relatively simple micro controller. In this case again I have the Arduino Pro Mini containing an ATMega168 controller (16 MHz) on board. If it should turn out that I might need more memory, the same board here is on stock carrying an ATmega328 controller. Let’s see how this will work out.

This is the circuit of the complete VFO module:

Si5351 VFO for Micro Multiband QRP SSB TRX (C) DK7IH 2018
Si5351 VFO for Micro Multiband QRP SSB TRX (C) DK7IH 2018

The module will be placed behind the front panel.

Tuning will be done by a Bourns optical encoder that turns very smoothely. I purchased some for under 5 Euros each from pollin.de. An unbeatable price! Unfortunatley they have been quickly sold out.

The core of this module is the Arduino Pro Mini microcontroller centered on the diagram. It is connected to the Si5351 breakout board and the 1306 oled display by I²C bus.

Si5351: Output 0 is used as VFO terminal and output 1 carries the LO signal with 9Mhz. To avoid digital noise spreading on the +5V line a 100µF capacitor should be switched close to the VDD terminal. Proper and short grounding also is recommended to avoid spurs.

OLED1306: Also a 100µF electrolytic capacitor has been added including a 10µH rf choke forming a low pass filter together. I found that these oleds a very prone to distribute digital noise via VVD line, so this measure contributes much to keep your receiver clean from any unwanted signal spektrum generated by the oled.

Keep in mind to tie SCK and SDA lines to +5V via two resistors of 4.7kOhms each!

Band switching: It is software controlled. To save output ports I did not connect the 6 relay drivers for the 6 bands directly to the ports of the microcontroller. I’m using an open collector BCD to DEC driver (74LS145) instead. Ports PB0, PB1 and PB2 are forming a 3-bit pattern that is switched to 6 output lines (output 0 to output 5) of the BCD2DEC driver IC. 74LS145 is capable of handling switch voltages up to 15V thus working with 12V coil relays is easy.

User control interface: This rig has 4 different switches that will be explained later from the functional point of view. The operator can set nearly all functions of the transceiver by using these push buttons and the main tuning wheel. The buttons  switch to GND by 4 different resistors and are read by PC0 port of the micro. PC0 equivalents to  channel 0 of the integrated analog-to-digital converter (ADC) inside the ATMega168. This also saves controller ports to a large extent (using 3 instead of 6 ports!). So, all in all, I think I can dare controlling a multibander by a relatively small microcontroller.

(To be continued!)