Automatic Magnetic Loop Tuner – IC-7300 setup

The Automatic Magnetic Loop Tuner can be used with a variety of transceivers, from the most common brands like Yaesu, Elecraft, Kenwood and of course Icom.

I recently acquired an IC-7300 and since many ham’s love and own this radio, I’ll quickly show you what settings you need to enter to make it “talk” with the Automatic Magnetic Loop Tuner.

First we do the setup on the IC-7300. On the transceiver, push the menu button. Next press the “SET” button on the touchscreen.

Select “Connectors” and “CI-V” in the two following screens.

In the CI-V menu, following options must be set accordingly:

  • CI-V Baude Rate: 19200
  • CI-V Address: 94h 
  • CI-V Transceive: OFF
  • CI-V USB->REMOTE Transceive Address: 94h
  • CI-V Output (for ANT): OFF
  • CI-V USB Port: Unlink from [REMOTE]
  • CI-V USB Baud Rate: 19200
  • CI-V USB Echo Back: ON

No we switch to the Automatic Magnetic Loop Tuner, and press the Menu / Enact button for more than 1 second. Select the “Radio Type” menu item.

Choose for ICOM CI-V Poll in the Tranceiver Type menu.

The value will be saved in the memory and you’ll return back to the Config Menu. Now select “ICOM CI-V Addr” and set the value to 94.

Next, we set the SerialPort Mode to TTL, and the SerialData Rate to 19200 b/s.

Exit, the menu, and if everything went wel, now your Automatic Magnetic loop tuner follows the VFO of your IC-7300, and you can use the auto tune function to set the radio in transmit mode and let the tuner hunt for an acceptable SWR.

Power And SWR Meter – Multi Band Calibration

You might have noticed it: I’m a big fan of Loftur’s projects. I’ve already described his Automatic Magnetic Loop Tuner in detail and now I will show you what functionality I added to his Power and SWR Meter.

For most OM’s his version of the code is more than good enough. But sometimes you have OM’s with particular needs 😉

If know the exact forward coupling attenuation and the exact reversed coupling attenuation of the directional coupler you are using.
If you have access to a signal generator and want one power and SWR meter calibrated for multiple bands… this little change of code is made for you!

The easiest part of changing this code was to implement an extra menu so you could select the desired band for which you want to use the meter. All values are stored in memory and will overwrite the initial values as defined in Loftur’s code. This way I had little to change in the calculation formulas coded by Loftur.

20181031_131232 20181031_131244

No changes were done to the “One Level Calibration” so it’s still usable for (most) OM’s without a signal generator.
New here is that you can enter both the higher and lower level for both Forward and Reverse power.



And save the adjusted calibration values.


This picture was taken without proper signal input. I’m one of those OM’s without a signal generator. However, I know a OM with a signal generator (for whom I made these code changes) who can do this calibration for me. Just like he did for one of his friends in South Africa who is using this power meter and code while bouncing signals to the moon and back (EME) 😉

Now, most important: the code.

This coding was done already a year ago, only today I retrofitted it to the latest version you can find on Loftur’s website (version 1.02). I’ve sent a copy to Loftur, but I have my doubts it will be merged in his version. It might be to specific and not many OM’s have the equipment to make use of this exact calibration method. Yet it was a nice project to work on and someone might find it useful…

USB Morse Key Keyboard Input

Funny little project to train your morse code sending capabilities. Let’s connect a morse key to a pc and turn it into a keyboard.
To do this, you’ll need: a Teensy 3.2, a morse key, two jumper cables and 15 minutes of your time.

USB Morse Keyer

First you have to program the Teensy 3.2. To do this you need to download the source code from It’s a project of Nomblr, who posted it on imgur in 2017. It has been in my favorites for more than a year before I finally took the time to play with it.

if you can’t download the code, just copy it from the browser and past it in Arduino.

Connect the Teensy to your PC via USB.
USB Morse Keyer

In Arduino you’ll need the following “board settings”. You can find these in the menu Tools (or “Hulpmiddelen” in Dutch).
Board: “Teensy 3.2 / 3.1”
USB Type: “Keyboard”
Keyboard Layout: “US English”
and select the correct com-port for your Teensy 3.2.

Verify and upload the code to the Teensy.

Connect the black jumper wire to the ground pin of the teensy, and the red to “pin 7”
USB Morse Keyer
For info: “pin 7” is not the seventh pin of the Teensy. First pin is ground, second pin is “pin 0”, third pin is “pin 1”, etc…

Then connect crocodile clip of the black jumper wire to the ring of the morse key, and the red one to the tip.
USB Morse Keyer

When done, you can start keying and watch the letters appear on your screen.

People using a AZERTY keyboard have to switch their PC input settings to QWERTY. If you are using Windows you can do this by pressing “Shift + Alt” (do it again to switch back to AZERTY). This is probably because we choose for the “US English” keyboard layout, but all other keyboard layouts of the Teensy gave the same result.

Although a Teensy is perfectly capable of doing this job, it’s a rather expensive device for this simple task. I’ve ordered myself some “Beetle USB ATMEGA32U4” devices on AliExpress and some Mini buzzers and will provide you with an update when they arrive. The ATMEGA32U4 are much cheaper and the buzzer will give you audible feedback. I’ll reprogram the Teensy and put it back in my Automatic Magnetic Loop Controller 😉

*This blogpost may or may not have been written using this USB Morse Key Keyboard input method.

Because sometimes things get removed from gitHub, I made a copy of the code which you can find below.

// Turns Morse key into USB keyboard

#include // include de-bounce library

const int led = 13; // led is connected to pin 13
const int keyPin = 7; // morse key is connected to pin 7
Bounce morseKey = Bounce(keyPin, 10); // 10 ms debounce

const unsigned long dashThresh = 150; // time threshold in ms to differentiate dots from dashes
const unsigned long letterThresh = 500; // time threshold in ms to differentiate letter gaps
const unsigned long wordThresh = 3000; // time threshold in ms to differentiate word gaps

String inputString = ""; // initialise input string

unsigned long downTime = 0; // records the start time of state change
unsigned long upTime = 0; // records the end time of state change
unsigned long timeNow = 0; // records the current time
unsigned long changeDuration = 0; // records the duration of state change
unsigned long pauseDuration = 0; // records the duration of the last pause

int pauseFlag = 0; // initilise the flag to indicate whether a pause has already been evaluated

void setup()
pinMode(led, OUTPUT); // configure the pin connected to the led as an output
pinMode(keyPin, INPUT_PULLUP); // configure the pin connected to the morse key as a pullup
} // end of setup

void loop()
// start of IF loop
if (morseKey.update()){

if (morseKey.risingEdge()) { // if input from key has gone to 1 and model is still 0, update model


} else if (morseKey.fallingEdge()) { // if input from key has gone to 0 and model is still 1, update model


} // end of if update loop

} // end of loop

void keyDown()
downTime = millis();
digitalWrite(led, HIGH); // switch LED on

void keyUp()
upTime = millis();
changeDuration = upTime-downTime;
digitalWrite(led, LOW); // switch LED off

if (changeDuration>0 and changeDuration=dashThresh) {
inputString = inputString + "-";


pauseFlag = 1;


void checkPause()
timeNow = millis();
pauseDuration = timeNow-upTime;

if (pauseDuration>=letterThresh and pauseDuration= wordThresh and pauseFlag) {

pauseFlag = 0;


void newWord()

void evaluateLetter()

if (inputString==".-") {;
} else if (inputString=="-..."){;
} else if (inputString == "-.-."){;
} else if (inputString=="-.."){;
} else if (inputString=="."){;
} else if (inputString=="..-."){;
} else if (inputString=="--."){;
} else if (inputString=="...."){;
} else if (inputString==".."){;
} else if (inputString==".---"){;
} else if (inputString=="-.-"){;
} else if (inputString==".-.."){;
} else if (inputString=="--"){;
} else if (inputString=="-."){;
} else if (inputString=="---"){;
} else if (inputString==".--."){;
} else if (inputString=="--.-"){;
} else if (inputString==".-."){;
} else if (inputString=="..."){;
} else if (inputString=="-"){;
} else if (inputString=="..-"){;
} else if (inputString=="...-"){;
} else if (inputString==".--"){;
} else if (inputString=="-..-"){;
} else if (inputString=="-.--"){;
} else if (inputString=="--.."){;
} else if (inputString==".----"){;
} else if (inputString=="..---"){;
} else if (inputString=="...--"){;
} else if (inputString=="....-"){;
} else if (inputString=="....."){;
} else if (inputString=="-...."){;
} else if (inputString=="--..."){;
} else if (inputString=="---.."){;
} else if (inputString=="----."){;
} else if (inputString=="-----"){;
} else {;

inputString = ""; // re-initialise inputString ready for new letter


Automatic Magnetic Loop Tuner – Smaller Enclosure Green Display

I was trying to fit the automatic magnetic loop tuner into a smaller enclosure. It was only a partial success.

Automatic Magnetic Loop Controller

There is plenty of space for the display and buttons on the front, but I have to choose between the SWR bridge or the rotary encoder. This however is not an option. They both need to be present in the automatic magnetic loop tuner. So the only possibility I see for the moment is to look for a smaller box to accommodate the SWR bridge. If I can’t find a smaller box for the SWR bridge, I’ll probably have to stick with the larger Hammond enclosures.

I also used a green display instead of the blue ones I usually use. What’s your favorite color?

How Are PCB’s Made?

There are about 10 working days between finishing the PCB design in Eagle and the reception of the finished product at my doorstep. I have always wondered how the Sontheimer bridge PCB and the A4988 PCB were manufactured.

Scotty Allen from Strange Parts went on a factory tour and made a pretty extensive video about the production process of a PCB. If you have 26 minutes of time, check out his youtube video below. (If you have less time you can fast forward some parts 😉 )

Automatic Magnetic Loop Tuner – Another Soldering Session

I took some time to solder another PCB for an Automatic Magnetic Loop Tuner. I made some pictures of the final result which I would like to share with you.

This is a view from the top of a populated PCB. The Teensy 3.2 and the A4988 stepper module are not yet installed. This loop controller won’t need the end stop feature. Therefor D2, D3, R25, R26, C19, C20, C21, C22, T3 and the 3 pin header for the end stop connector, are not installed.

C1 is located underneath the Teensy 3.2. This capacitor can be soldered upright. There is plenty of space, so no need to lay it flat on the board.

Populated PCB for Automatic Magnetic Loop Tuner

Here we have both the Teensy 3.2 and the A4988 stepper module installed. Note that a jumper is placed over JP1, but that JP2 is left open. JP1 connects “Sleep” and “Reset”. JP2 is for future use. When using a DRV8825 stepper module it gives us the possibility to connect the unused Teensy 3.2 pin 19 with pin MS3 of the DRV8825. With some additional programming to the software, this could enable the 1/32 step stepper resolution. This however has not yet been programmer, nor tested.

Populated PCB for Automatic Magnetic Loop Tuner

If there is one thing I would change to this board it’s the re-positioning of the LM7805 voltage regulator. The ground plane in facing inward which makes it difficult to attach a heat-sink. This can be solved easily by bending the legs of the LM7805 so the ground will face upwards, or by connecting it from the underside of the PCB and connecting the ground to the metal enclosure the whole PCB will be put in.

Populated PCB for Automatic Magnetic Loop Tuner

On this last picture, you can see capacitor C1 has plenty of space and is enjoying the company and security of the Teensy 3.2 😉

Populated PCB for Automatic Magnetic Loop Tuner

Automatic Magnetic Loop Tuner – Printed Circuit Board (PCB)

Using the original schematic as a starting point, I reworked the electric diagram and incorporated a A4988/DRV8825 module.

You can download a pdf file of the reworked schematic here: MagLoopTuner.pdf

Automatic magnetic loop controller PCB

The two jumpers in the schematic deserve a little explanation:
JP1 connects the sleep and reset pins of the A4988/DRV8825 module board. I’ve seen schematics where these pins are soldered together, but I preferred to use a jumper. This way you have the possibility to add a reset switch, or if you think it’s not needed, just bridge the two contacts.
JP2 was incorporated for future use. It connects the unused pin 19 of the Teensy 3.2 with pin MS3 of the A4988/DRV8825 module. Without this connection, the maximum resolution of the magnetic loop controller is 1/8th step. With some extra coding, we could drive the stepper motor as precise as 1/16th step (with the A4988) or even 1/32th step (with the DRV8825). This coding is not yet done, and I’m also not sure if this fine stepping is useful for this project, but I thought it was a nice idea to experiment with it. So for now, you can leave JP2 open.

If you are not using end stop switches,then there is no need for D2, D3, R25, R26, C19, C20, C21, C22 and T3.

Depending on the type or brand of rotary encoder, the A or B phase can be reversed. However, the VCC and G must always be respected. You can check the correct wiring of A and B when you scroll through the menu. Turning the rotary encoder clockwise must increase the menu option, the steps and the frequency. When this is correctly done, you can start checking the wiring of the stepper motor. In order for the backlash and auto-tune function to work correctly, the capacity must go down, when you turn the rotary encoder clockwise.

Don’t need the SWR / power meter function? Then you don’t need R15, R16, R17, R18, C25, C26 and R20, R21 and R22 (and their corresponding switches) either.

Please check Loftur’s project page for a more detailed explanation, the BOM and building instructions:

For any inquiries or questions about the PCB, please send an email to Add my email address in your contacts to prevent my response email from landing in your spam folder.

Automatic Magnetic Loop Tuner – A4975STB, A4988 or DRV8825

The design Loftur published on the project site was built around two A4975SBT ic’s. Although they are available at they are rather expensive if you only need 2. even doesn’t have them in stock. When you need more of them to build multiple automatic magnetic loop tuners, you could start looking for them on AliExpress. A starting seller (who needs good reviews for credibility) will offer you 10 pieces for less than 12 euro. They have a 1,5 A continuous output current and have a step sequencing from 1 full step until an eighth of a step. When you are using a multi turn variable vacuum capacitor or any capacitor connected to a geared motor, this will do just fine.

Allegro A4975SBT
Allegro A4975SBT.

If the steering cable is too long, and it’s resistance is becoming too high, you need to provide more than 1,5 A so your motor would still receive enough current to generate sufficient torque for turning the capacitor. Depending on the type of capacitor, you might need more than 1/8 of a microstep. In both cases you should look out for something more powerful or precise than the A4975STB’s. Two alternative stepper driver modules are the A4988 or the DRV8825. On top of being more precise and / or more powerful, they are more easier to find and a lot cheaper than two A4975STB’s. Just like with the NEMA 17 stepper motors, these modules are widely used in all kinds of 3D printers and DIY CNC machines. There are plenty of suppliers on AliExpress, offering them for prices close to one euro.

The A4988 is capable to deliver 1A per phase without a heat sink or forced airflow and is rated for 2A per coil with sufficient additional cooling. On top of all kinds of over- and under-protection intelligence (voltage, temperature, current, crossover-current, short-to-ground and shorted-load) it features five different step resolutions: full-step, half-step, quarter-step, eighth-step, and sixteenth-step.

A4988 stepper module
A4988 stepper module.

The DRV8825 has a pinout and interface that are nearly identical to those of the A4988 stepper driver module, so it can be used as a higher-performance drop-in replacement for those modules in our automatic magnetic loop tuner. It can deliver up to approximately 1.5 A per phase without a heat sink or forced air flow and is rated for up to 2.2 A per coil with sufficient additional cooling.

DRV8825 stepper module.

It will not sound as a surprise to you when I tell you these two modules don’t fit in the original PCB layout Loftur designed. Joerg, a user in the loop controller yahoo group found a solution for that and made an adapter board to use a A4988 or DRV8825 module with Loftur’s print.

Joerg made me realise it wouldn’t be to difficult to adapt the original design and make a new PCB especially for the A4988 or DRV8825 stepper driver modules. After some hours redrawing the schematics and moving around the components I came up with following PCB design.

Automatic magnetic loop controller PCB

It’s 67mm x 100mm and features besides the space for a A4988 or DRV8825 module, 3 (T1, T2 and T3) 2.2 A common mode chokes (CMS1-8-R). Loftur proposed these chokes as an upgrade for the 1 A common mode chokes of Wurth Electronics (744227S) originally used in his first design.