FT-817 Automatic Loop
April 30th 2012 Update: Version 1.0 Released on Google Code
Introduction
First things first:
"I live in the US" Legal Disclaimer:
Magnetic Loops are extemely dangerous. The extremely high voltage that develops can cause serious injury or even death. Use Magnetic Loop at your own risk. Actually, you should never use a Magnetic Loop. Please don't. If you do I will not be responsible in any way.
Also CAT interfaces are very dangerous. The undocumented 0xBD command could damage your FT817 in an irreparable way. You should never use the CAT interface of your FT817 in the way presented in this article. Please don't. If you do I will not be responsible in any way.
I really like my portable magnetic loop antenna and I believe it is the best compromise in terms of performance and portability. My Loop for HF is so small and light than I normally transport it on my bike. Some others use their Magnetic Loops as pedestrian mobile.
There is, however, something unpleasant about the Magnetic Loop experience that the user cannot avoid noticing: tuning. If you ever tried one you know what I'm talking about: each time you change the operating frequency - even just by a few KHz - you will have to tune the antenna again. What a nuisance! Wouldn't it be nice to have a loop that magically tunes itself?
Well, here it is! This project is a proof of concept for an Automatic Magnetic Loop Antenna: you press a button and the antenna is ready to be used. Such a loop will be portable, cheap and finally also easy to operate.
Hardware
The project is based upon arduino Arduino, more specifically an Arduino UNO but I think any other variant will be just the same.
The initial idea was to use a SWR directional coupler and use the feedback to drive the logic of an Arduino board. While investigating the various options for the coupler I realized that my FT817 already measured the SWR so started asking myself if it was possible to somehow "read" such information from the outside. Apparently it was possible thanks to an undocumented CAT command (0xBD) that was created by Yaesu just to do that. Moreover, an Arduino CAT library for the FT817 had already been written by VE9QRP and published under GPL.
The necessary Servo to drive the variable capacitor is a Hitec HS-322HD and Arduino has a Library for it that works right off the box. The Servo will position itself within a range of 180 degrees in just a few second. Just add a LED and a pushbutton and you are ready to go.
Software
The VE9QRP library doesn't compile on latest one (Arduino 1.0) so I had to port it.
Then I added the missing 0xBD command that is necessary to read the SWR from the radio. After some debugging (done with a USB / TTL interface and a terminal emulator) I was ready for the actual tuning script.
The first attempt sampled the entire 180 degrees - one degree at a time - and performed an SWR sampling for each step: the lowest SWR sample indicated the position I was looking for.
It worked almost immediately. Then, in order to obtain faster tuning, I modified the procedure: first the capacitor moved in "big steps" of 5 degrees each, then in "small steps" of 1 degree. At the end I opted for yet another solution, which sampled continuously the SWR to determine the arean in which the tuning was possible.
Thanks for reading, best 73's de Alain WW3WW
No related posts.

febbraio 10th, 2012 at 4:03 am
Hey Alain, this is beyond cool.
Congrats.
febbraio 12th, 2012 at 12:25 am
Thank you MIchael!
febbraio 20th, 2012 at 4:58 pm
Thank you for your right up on this project. I am attempting to replicate the frequency control part of the application. But I am not getting the serial port to work.
I am using Arduino 1.0 IDE and the Arduino Nano v3.0.
I have CAT pin 4 connected to Arduino digital pin 8, and CAT pin 5 connected to digital pin 5. Both the CAT TX ground, and the other CAT ground pin are connected to the Arduino ground. I have tried switching the TX and RX pins. I have also tried it without the ground since you do not have your connection grounded in the schematic above.
The error I get in debug mode is:
67331280100003timeout on getfreqMode
sent in: 43218000
got out: 0
Rigcomm error: failed setfreqtest
I am using your FT817 libraries, and the following script:
#include
#include
#define rxPin 5 // Red wire
#define txPin 8 // White wire
FT817 rig;
long x;
void setup() {
Serial.begin(38400);
SoftwareSerial mySerial = SoftwareSerial(rxPin,txPin);
rig.assignSerial(mySerial);
rig.begin(4800); // I double checked to make sure that this is the right baud.
}
void loop() {
testFrequencyChange();
}
void testFrequencyChange() {
x = 43218000;
for (long i = 0; i < 1000000; i++) {
rig.setFreqTest(x+i);
delay(10);
}
}
Any suggestion is appreciated. Thank you.
febbraio 20th, 2012 at 6:01 pm
Elliot,
let me ask you something: do you see the frequency changing in the radio? Do you have any USB/TTL adapters?
When I first started trying the commands where going to the radio and executed successfully, however the responses were not being correctly read.
I did a lot of debugging using a USB/TTL converter that I already had to program my Kenwood TH-F7A. Basically, I sent the commands using the Arduino, and at the same time I read the radio's responses using the USB/TTL converter hooked to a terminal emulator for Mac (Roger Meier's CoolTerm). This is exactly the same advice that I received from the original author for those libraries when I initially run into troubles.
Anyway, FYI another ham replicated this work in Italy and he got it up and running at first try. He is using another Arduino UNO.
Let me know how
Alain
febbraio 26th, 2012 at 2:06 am
Hello Alain , tnx fer your cool project! it's very interesting.
i announce to you that your tube video is linked on
http://www.arifidenza.it/forum/topic.asp?rand=7055475&whichpage=0,54&TOPIC_ID=178495񜎿
The most readed italian forum will be very pleased if you can write us some other information about your well done job!
--------------------------------------------------------------
Ciao Alain, come butta li?
Grazie per la bella idea di robotizzare l'accordo di una magnetica... sicuramente il sogno nel cassetto di molti possessori di 817. (me compreso )
Ti comunico ( non lo avessi gia visto ) che il tuo video pubblicato su you tube è stato linkato sul forum di AriFidenza (credo il piu letto in italia e con parecchi visitatori anche esteri ).
http://www.arifidenza.it/forum/topic.asp?rand=7055475&whichpage=0,54&TOPIC_ID=178495񜎿
Sarebbe davvero bello se tu potessi fornire qualche ulteriore spiegazione riguardo alla tua bella realizzazione ( in pratica la pappa pronta piace a tutti....me compreso! hi hi )
Grazie per il tempo che mi hai dedicato.
A presto rileggerti.
72 de ik2ulb, paolo , como -italy-
febbraio 26th, 2012 at 3:50 pm
Hello Paolo,
I have already provided the schematic and the souce code,what else do you need? Please let me know
Ciao
Alain WW3WW