Automatic Magnetic Loop Tuner – New Firmware Available

Loftur TF3LJ/VE2LJX released a new firmware version for the Automatic Magnetic Loop Tuner. You can find it at the bottom of his web page: https://sites.google.com/site/lofturj/to-automatically-tune-a-magnetic-loop-antenna

Firmware version 4.09 fixes stepper motor hiccups that might occur when you move the stepper motor a lot at high speed forward or backwards.

The PCB’s I designed earlier for the DRV8825 or A4988 stepper motor drivers are compatible with this new firmware. I recommend upgrading to this new version if you are using one of mine PCB designs. In the rare case where you would encounter issues, you can always revert back to firmware version 4.08.

Automatic Magnetic Loop Tuner – Smaller Enclosure Finished

When our first batch of automatic magnetic loop tuners was finished, I started looking for another enclosure. One that was sturdier, better looking and cheaper. I ended up looking on AliExpress and found this aluminium box. After some measuring, drilling and filing I test fitted the components.

I quickly understood this enclosure would be a very tight fit. Using the bulkier rotary encoder together with the larger tin box for the SWR bridge was not possible. In parallel, we started working on our second batch of automatic magnetic loop tuners, and I needed the buttons and screen bezel to finish another tuner. Having no spare screen bezel any more and in need of extra internal space, I ditched the screen bezel idea and let the LCD come out of the enclosure. It wasn’t even looking that bad.

Automatic Magnetic Loop Controller

Yet, the little extra space I gained on the inside of the enclosure was still not enough to fit the SWR bridge in it’s RF shielded tin box. I had to go and find a smaller box, which I did on a local ham fair.

SWR Bridge
SWR Bridge in small enclosure

The SO-239 connectors were also replaced by SMA connectors. These are also a lot easier to mount as you only need to drill one round hole.

SWR Bridge

When I made the A4988/DRV8825 version of the automatic magnetic loop tuner PCB, I made it exactly 100mm wide. This way it fits nicely in the PCB slot in the aluminium box. When the PCB is positioned completely to the left against the tin box of the SWR bridge, there is plenty of room for the rotary encoder on the right. The rotary encoder is positioned between the power button and the fuse and serial connector.

Automatic Magnetic Loop Tuner

When the box is closed and the power is switched on it looks very nice 😉

Automatic Magnetic Loop Tuner

The knob on the rotary encoder is a full aluminium knob which you can find here on AliExpress.

Icom IC-7300 External Keyboard

Introduction

Endlessly calling CQ during a contest or special call activation can give you a sore throat. Voice keyers were invented for this particular matter. A voice keyer is even built-in in the IC-7300, so at first, there is no need for an external device.

This voice keyer has 8 presets and can be used as a keyer for voice, CW or RTTY. The only drawback is that this keyer is only accessible when the voice keyer option is visible on the display. And at that time you can’t see any other screen that might be more of an interest to you than the voice keyer buttons such as a larger scope, the audio input and output and your meters (SWR, ALC, COMP and I). An external keyboard would be of great help.

Strange enough this external keyboard is not provided by Icom, you are forced to buy an aftermarket device, or… build it yourself. The schematics for this are made available by Icom in their manual on page 12-2.

A prerequisite for me was that I could still use the original mic when the keyboard was attached and that when I don’t use the original mic, I still have the same capabilities as if I’m using the original mic. So both schematics need to be combined.

Gather the needed components

Enclosure

Except for the resistors all I needed was bought on AliExpress. For the enclosure, I choose for an aluminium box measuring 122(W) x 66.5(H) x 39.5(L)mm. Guitar enthusiasts use these enclosures to make so-called stomp boxes or effects units. Manufacturer Hammond brought an enclosure with these dimension to the market as model 125B/1590N1. If you search on AliExpress with these model numbers, you get some options to choose from.

125B/1590N1
125B/1590N1

Buttons

You can choose whatever momentary switch you like for this project. I went for black plastic 12 mm momentary push-buttons.

Microphone connectors

Icom uses an 8-pin microphone connector. These GX16 connectors, sometimes also referred to as circular aviation socket plug, can be found in abundance on AliExpress. Search for GX16 8 male female because we want two male sockets and 2 female sockets. The male sockets are to be placed on the enclosure, the female sockets are needed to build the cable to connect the external keyboard to the radio.

Cable

Finding a suitable cable that has sufficient inner strands, is not to thick and looks good was not so easy. Mini Din 8 pin extension cables can be found easily, but they do often come in an ugly beige colour. As we only need 6 inner strands, I figured out a Mini Din 6 pin cable would do the trick as well. I still had 1 meter of this cable in my stock as I once used it to build a data interface for my trusty Yaesu FT857-D.

Resistors

We need one 470 Ohm, one 4,7k Ohm, one 2,2k Ohm and two 1,5k Ohm resistors. All 5% and 1/4 Watt.

Audio Jack Sockets

When looking for audio jack sockets, look for those with a screw on the inside of the enclosure. Not only do they look better, but I also have the impression the quality is a bit better.

Preparing the enclosure

20190120_154014

On the top of the box 7 holes needed to be drilled. 4 on the top row, 3 on the bottom row. Each hole has to be 12mm.

20190120_154038

On the left two 20mm holes are drilled for the GX16 connectors and on the front 2 7mm holes were made for the 3.5mm stereo jacks.

20190120_154059

On the back, another 7mm hole was drilled for the 3.5mm jack that will be used to connect a foot-pedal for handsfree PTT operation.

Once all holes are drilled and all components are test fitted, you can start sanding the box and give it some layers of spray paint.

Put everything together

First, make sure you solder long ends of wire to the GX16 connectors. It would be a real challenge to solder them when they are already mounted in the enclosure.

20190303_103033

I opened the original Icom MH-219 to know what colour code they use and tried to use the same as much as possible.

Pin 1: Mic input = white
Pin 2: 8V = not used for this project
Pin 3: Frequency up and down = red
Pin 4: Squelch = not used for this project
Pin 5: PTT = brown
Pin 6: PTT Ground = green
Pin 7: Mic Ground = Black
Pin 8: AF output = Blue

2019-03-09_11-03-29
Everything wired up.

Now fix a connection cable with two female GX16-8 connectors, using an SP/2 extension cable and some clear tubing as stress relief. The colour scheme of this cable is different from that of Icom, but as long as you connect each wire to the same pin on the opposite side of the cable, you’re good to go.

2019-03-09_11-22-29

The finished product

20190303_214110

In this picture, the original mic and the foot pedal are not connected. I’m using an in-ear Sennheiser and a 1€ condenser boom mic from AliExpress. Maybe not the “best” solution, but for the moment good enough.

Everything works as it should and the magic smoke remained in the components where it belongs 😉

I will put this keyer to the test during the March 2019 CQ WPX contest. Hope to meet you on the band!

73 de ON5IA

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

Now 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 Transceiver 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 Serial Port Signals to TTL and the Serial Data Rate to 19200 b/s.

Exit, the menu, and if everything went well, 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 you know the exact forward coupling attenuation and the exactly reversed coupling attenuation of the directional coupler you are using and 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.

20181031_131338

20181031_131349

And save the adjusted calibration values.

20181031_131432

This picture was taken without proper signal input. I’m one of those OM’s without a signal generator. However, I know an 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.
PSWR_T_202_ON5IA

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 too 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 https://github.com/nomblr/morse/. 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()
{
checkPause();
// 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

keyUp();

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

keyDown();

}
} // 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 + "-";
Serial.println("DASH");

}

pauseFlag = 1;

}

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

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

evaluateLetter();
newWord();
pauseFlag = 0;

}
}

void newWord()
{
Keyboard.press(KEY_SPACE);
Keyboard.release(KEY_SPACE);
}

void evaluateLetter()
{

if (inputString==".-") {
Keyboard.press(KEY_A);
Keyboard.release(KEY_A);
} else if (inputString=="-..."){
Keyboard.press(KEY_B);
Keyboard.release(KEY_B);
} else if (inputString == "-.-."){
Keyboard.press(KEY_C);
Keyboard.release(KEY_C);
} else if (inputString=="-.."){
Keyboard.press(KEY_D);
Keyboard.release(KEY_D);
} else if (inputString=="."){
Keyboard.press(KEY_E);
Keyboard.release(KEY_E);
} else if (inputString=="..-."){
Keyboard.press(KEY_F);
Keyboard.release(KEY_F);
} else if (inputString=="--."){
Keyboard.press(KEY_G);
Keyboard.release(KEY_G);
} else if (inputString=="...."){
Keyboard.press(KEY_H);
Keyboard.release(KEY_H);
} else if (inputString==".."){
Keyboard.press(KEY_I);
Keyboard.release(KEY_I);
} else if (inputString==".---"){
Keyboard.press(KEY_J);
Keyboard.release(KEY_J);
} else if (inputString=="-.-"){
Keyboard.press(KEY_K);
Keyboard.release(KEY_K);
} else if (inputString==".-.."){
Keyboard.press(KEY_L);
Keyboard.release(KEY_L);
} else if (inputString=="--"){
Keyboard.press(KEY_M);
Keyboard.release(KEY_M);
} else if (inputString=="-."){
Keyboard.press(KEY_N);
Keyboard.release(KEY_N);
} else if (inputString=="---"){
Keyboard.press(KEY_O);
Keyboard.release(KEY_O);
} else if (inputString==".--."){
Keyboard.press(KEY_P);
Keyboard.release(KEY_P);
} else if (inputString=="--.-"){
Keyboard.press(KEY_Q);
Keyboard.release(KEY_Q);
} else if (inputString==".-."){
Keyboard.press(KEY_R);
Keyboard.release(KEY_R);
} else if (inputString=="..."){
Keyboard.press(KEY_S);
Keyboard.release(KEY_S);
} else if (inputString=="-"){
Keyboard.press(KEY_T);
Keyboard.release(KEY_T);
} else if (inputString=="..-"){
Keyboard.press(KEY_U);
Keyboard.release(KEY_U);
} else if (inputString=="...-"){
Keyboard.press(KEY_V);
Keyboard.release(KEY_V);
} else if (inputString==".--"){
Keyboard.press(KEY_W);
Keyboard.release(KEY_W);
} else if (inputString=="-..-"){
Keyboard.press(KEY_X);
Keyboard.release(KEY_X);
} else if (inputString=="-.--"){
Keyboard.press(KEY_Y);
Keyboard.release(KEY_Y);
} else if (inputString=="--.."){
Keyboard.press(KEY_Z);
Keyboard.release(KEY_Z);
} else if (inputString==".----"){
Keyboard.press(KEY_1);
Keyboard.release(KEY_1);
} else if (inputString=="..---"){
Keyboard.press(KEY_2);
Keyboard.release(KEY_2);
} else if (inputString=="...--"){
Keyboard.press(KEY_3);
Keyboard.release(KEY_3);
} else if (inputString=="....-"){
Keyboard.press(KEY_4);
Keyboard.release(KEY_4);
} else if (inputString=="....."){
Keyboard.press(KEY_5);
Keyboard.release(KEY_5);
} else if (inputString=="-...."){
Keyboard.press(KEY_6);
Keyboard.release(KEY_6);
} else if (inputString=="--..."){
Keyboard.press(KEY_7);
Keyboard.release(KEY_7);
} else if (inputString=="---.."){
Keyboard.press(KEY_8);
Keyboard.release(KEY_8);
} else if (inputString=="----."){
Keyboard.press(KEY_9);
Keyboard.release(KEY_9);
} else if (inputString=="-----"){
Keyboard.press(KEY_0);
Keyboard.release(KEY_0);
} else {
Keyboard.press(KEY_MINUS);
Keyboard.release(KEY_MINUS);
}

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 favourite colour?

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 😉 )