CAT control via microprocessor

So I have a bit of a new mini-project: I have decided to turn my attention to adding (limited) μ-(microprocessor)-control of my radio to the list of things I am working on.

Arduino Uno

Arduino Uno microcontroller board

This whole idea stemmed from my desire to make a one-off microprocessor all-in-one satellite tracking and Doppler tuning apparatus. Essentially, a dedicated microprocessor would track a selected satellite and then tune the radio’s downlink frequency to match the Doppler shift during the pass. All of this can be done via some Kepplerian elements stored on an SD-card and some moderately sophisticated calculations.

Due to the sad state of amateur satellites (in my humble opinion), I have decided not to pursue the tracker functionality (for now).

Having already done some research on the Doppler tuning portion of the project, I was well aware of what could be done with an Arduino board (I am too lazy to solder a purpose-built board), CAT (computer) control protocols, and the microphone jack of a Yaesu FT-857D radio.

FT-857D mic pinout

FT-857D mic pinout

Yes I could have done the easy thing and decided to use the CAT jack on the rear of the FT-857D but what fun is that? Honestly though, I wanted to keep that port clear for other uses (such as a tuner which may not have a CAT-port pass-thru). While browsing the various Yaesu FT-8*7 manuals, I noticed a little gem on page #60 (PDF page #62) of the FT-897D (not 857!) manual. Also, browsing the function menus (specifically selection #59) indicated:

“MENU MODE No•059 [MIC SEL]”

So long as you do not plan to use the mic, it is possible to pass CAT protocol data to the radio through the microphone port (ie. digital modes!) if you select: CAT in the MIC SEL menu.

RJ45 plug for FT-857D CAT control

RJ45 plug for FT-857D CAT control

To make the appropriate cable, I took a piece of 2-pair telephone cable and connected the RX, TX and GND pins to an RJ45 connector. In the photo, you will also see the yellow conductor connected in the RJ45 plug. This is NOT necessary for the CAT connection, and it will be unused in this example.

The green conductor (let us call it RJ45 pin 1) is connected the RX port of the Arduino (normally that would be pin-0) and the red conductor (RJ45 pin 2) is connected to the TX port (normally, pin-1) while the black conductor (RJ45 pin 7) is connected to any available ground (GND) on the Arduino.

To control the radio, various commands may be issued to the radio using a variant of the Yaesu CAT control protocol. After packet sniffing the serial data, I learned many of the codes which I later found in the FT-897D manual on page #64 (PDF page #66). The commands must be issued as a five-byte serial data packet. As an example, to change the frequency of the radio to 144.390MHz for APRS work, you would issue the command as:

14 43 90 00 01       (the 01 is a “command” byte)

In the standard Arduino development environment, I store the command in a byte array:

// set constant variable to the N.A. APRS frequency of 144.390MHz
const byte aprs[5] = {0x14,0x43,0x90,0x00,0x01};

and then issue that command to a software-based serial port (named rigCat) as follows:

for (byte i=0; i<5; i++) {
 rigCat.write(aprs[i]);
}

which then tunes the radio to 144.390MHz as desired.

Initially, everything was working just fine as it was connected since the FT-857D CAT uses TTL level logic (+5V) and the Arduino is compatible with these levels. Not long after I had some success, the setup stopped working. Now I am in the troubleshooting stages. With 10-hour days at work, I am only interested in short-duration project sprees at the moment. I’ll post updates to the project as I solve the μ-control interface issues.

Posted in Project | Tagged , , , , , , , , , | 3 Comments

Update …

Well, its been a while since I’ve been able to play radio, however, a few changes have been made. For starters, I upgraded my Linux netbook to Ubuntu 12.04 (touch pad was freezing on me in previous version). Unfortunately, the upgrade had disastrous results for my radio platform. For the time being, I have reinstalled Windows 7 on the netbook and in the future I will likely dual-boot.

Temporary antenna installation

Temporary antenna installation

The other notable changes have been with my FJ Cruiser installation. When I installed the FT-857D, I used two cables with PL-259 connectors on one end (radio side) and Larsen NMO mounts (on the antenna side). Initially, I had only intended to use one of the NMO mounts at a time for VHF/UHF work – I was going to try each location to see how well they worked versus the other. As it turns out, I never really used the location (shown in the photo to the right) since it would require installation and removal of the antenna(s) every time I went to park underground.

NMO rain cover

NMO rain cover

I ended up capping the mount with a plastic rain cover that I picked up at a radio shop in Durham for $3. The lower antenna section that I made a bracket for has a 1/4-wave whip for 2m permanently mounted to it (with the option of swapping it out for a 5/8-whip).

NMO to SO-239 adapter

NMO to SO-239 adapter

This past week, I finally decided that I would re-think my HF installation and that I would use the NMO-to-SO-239 adapter I picked up at the same time as the rain covers. The idea was that  I would use the adapter to connect my HF antennas via the permanently installed antenna mount. To prevent feedline losses, I decided that I would shorten the cable on the NMO mount.

Common mode choke

Common mode choke (aka. ugly balun)

As I had never actually installed a PL-259 connector before, I was a bit hesitant. I decided the best thing would be to do a practice connector on my current mode choke (ugly balun) to get a feel for the process.

The wire was many feet too long, so I placed the choke in the furthest mounting location from the NMO mount and marked the cable for cutting. The installation of the PL-259 was very straightforward and went fairly well (in my estimation). There was no continuity between the shield and the core (good thing!) and everything checked out in terms of visual inspection.

Eager to replicate my success with installing a PL-259 on some RG-8X, I turned my attention to the smaller RG-58/U. This one was definitely more difficult as there was much less braided shielding to work with, however, the connector was soon installed and tested fine.

ATAS-120A HF antenna

With the cable cut down to the appropriate size, I was excited to test the setup with my ATAS-120A HF antenna. I conected the NMO-to-SO-239 connector and a 3′ patch cable with the antenna on the other end. I fired up the radio and hit the tune button and … nothing! Knowing that the antenna used DC injected on the coax to extend and retract, I immediately suspected that there was a break (ie. open) in the signal path. After a bit of investigating, I turned out that the NMO-to-SO-239 adapter was the culprit.

Inside the adapter, there is a ring that connected the outer body to the threaded portion of the SO-239. The ring was not making electrical contact with the outer body and thus, the open circuit. Using this adapter would have been very bad (and frustrating) had this defect not be found.

With the adapter repaired, all was well with the modified installation.

I also bit the bullet and mounted the detachable face-plate of the FT-857D to the dash of the FJ using the plexi-glass bracket I hastily cut and bent while testing potential mounting locations. In the future, I will likely end up changing the bracket out for something which offers a more sturdy mount (the face-plate tends to bounce a tad at the moment). For now, the installation is good enough considering I had been simply leaving the face-plate in a cup-holder as an interim solution.

… more to come!

Posted in General, Mobile, Project | Tagged , , , , , , | Leave a comment

Easter Vacation = Mobile Ops

Once again, I was on the road with my wife to visit some of her family which provided me with an opportunity to do some mobile HF operating. This time, however, I did not have any success of HF.

For the first few minutes of my operating time, I was running Xastir (aprs software for Linux) and was sending out position packets just fine. I then swapped over to HF operating and tuned up the ATAS-120A antenna for 10.137MHz to give pskmail another shot. A few CQ calls and pings were sent out in an attempt to activate a listening pskmail station. Nothing was heard.

I then tried tuning up to 14.070MHz for some PSK-31 operating but was getting very little in the way of incoming signals. This seemed quite odd to me. I tried tuning around the bands a bit, looking higher each time, and saw some activity but mostly noise (S6-S8).

I then changed back to 2m for some APRS time while I pondered that was going on with the (normally great) HF setup I have. I then tried to tune up 30m again and the antenna was unable to make a match at all. The SWR was consistently high on all bands and did not change while attempting to tune the antenna. Bad news?!

A pit stop was made to verify that the antenna was in fact extending and collapsing as it attempted to find the lowest SWR. I loosened the antenna connection and re-tightened everything to ensure that the connection was good. We were soon on the road again, however, the problem was not yet solved. I should have tried tuning the antenna while parked!

In any event, no successful HF contacts were made which is frustrating, however, this learning experience will allow me to work out any glitches in my mobile setup. I’ve got some testing to do before we head back to Ottawa tomorrow morning – hopefully I will figure out what the problem is/was.

Posted in Mobile, Operating | Tagged , , , , , , , | Leave a comment

More Linux & Radio

Day two of my field-testing the Linux netbook. The machine I use is an Asus eeePC Seashell netbook with an Intel Atom 1.5GHz processor and 2GB RAM. It will last ~8 hours on a charge and is plenty powerful enough to multi-decode in Fldigi.

eeePC Linux ham radio computer

eeePC Linux ham radio computer

Yesterday I was successful in sending out APRS beacons using the Linux soundmodem AX.25 (TNC alternative) driver. The soundmodem driver uses a computer sound card as the modem (modulator / demodulator) by performing some digital signal processing on the audio data. Thus, to use packet radio (and therefore APRS) all that is needed is a radio, a sound card (with interface cable) and a computer. No need for a TNC!

Garmin GPSMAP 62S

Garmin GPSMAP 62S

Yesterday evening, I played around with my Garmin 62S and gpsd – a Linux gps server daemon which allows multiple simultaneous logical connections to a GPSr.

As an aside, a close friend of mine might remember something I once muttered while first playing around with (ie. learning) Linux back in 1995:

“What the hell is a server daemon? … and what the hell are daemons doing in my computer?”

Garmin 62S setup help

Garmin 62S setup help

I had mucked around with /dev/ttyUSB0 (my GPSr’s logical device) for some time yesterday, trying to get gpsd and xastir playing nice together – no luck. Well, a fresh set of eyes later in the evening proved helpful as I managed to get the GPSr talking nicely with gpsd. The stumbling point? Getting the GPSr to output data in real-time over the USB connection. How did I manage it? Garmin Spanner format (with mass storage disabled).

garmin GPSr -> setup -> system -> interface -> Garmin Spanner
USB cable detected. Would you like to go to Mass Storage? -> NO!

With the above change in place, I restarted the gpsd daemon and tested the output using a command-line tool called cgps:

$ sudo gpsd /dev/ttyUSB0
$ cgps
xastir configuration hints

xastir configuration hints

Success! The gpsd server was now seeing packets from the GPSr which meant I could now pipe that data into xastir (the Linux APRS client I use) via an interface setting. With xastir now querying the gpsd server, my current coordinates were properly being reported in real-time and thus, my APRS station was set up.

Next on the docket was getting pskmail up and running. My objective was to connect to a pskmail server and send a test email to myself to verify correct configuration.

I fired up Fldigi, followed by pskmail 1.5.7 (the order of operations matters as pskmail is not smart enough to check that Fldigi is running first – it simply throws a lame error message). I tuned my radio to 10.147MHz (USB) and listened for a few minutes for some pskmail server announcements. Lo and behold, a PSK250R signal appeared at 1000Hz on the waterfall which corresponds to 10.148MHz (the center frequency for pskmail).

The server announced itself as KB2PNM (North Carolina) and so I added that callsign to my server connection list in pskmail. Once the station was added, I clicked on connect and sure enough I was in business!

I poked around pskmail a bit and managed to discover how to send an email so I fired off a few test messages to see how well the system works. I have to say, it was pretty darn quick all things considered!

What is neat is that pskmail can also use gpsd to obtain your current coordinates and send your APRS data via HF to a listening igate. I took the opportunity to update my VE3BUX position via HF and the reporting station is listed as KB2PNM (as should be expected).

This looks like a pretty robust HF communications suite! I’ll have to play around a bit more to really learn the ins-and-outs and I will certainly post my experiences on here.

Posted in Mobile, Operating | Tagged , , , , , , , | Leave a comment