Category Archives: Amateur Radio

Single Letter Beacons, with some QRM

I like using my SDR-IQ software defined receiver for listening to short wave and ham bands. It’s a great way to look at a bunch of frequencies all at once, and to isolate the signals you are interested in. I had heard that there were new versions of the SDR-Radio application and Spectravue which I hadn’t tried out yet, so last night and this morning I tried them both out.

I’ll defer SDR-Radio to a later time (I think I screwed up something in the configuration, and my tired brain couldn’t figure it out), but Spectravue has a nice new AGC control that really works well. In any case, that’s what I used for this morning’s mucking around.

Here is what the main screen looks like. You can see that I’m scanning a segment of spectrum 10khz wide, centered on 7.0392Mhz. That corresponds to the frequency of the Russian “F” beacon. You can see the trace of its signal in the waterfall down the display. Just to the right of it you can see another dashed line. That’s at about 7.0394Mhz, and is the Russian “M” beacon. And you can see a bit of blobbiness all around them: that’s a voice signal which is overlapping them. I can’t make out what they are saying or doing. But here’s my recording anyway.

It’s a .wav file, but only 8khz sampling and 60 seconds long.

I decoded this with a typical CW filter with 500hz, which isn’t wide enough to decode the signal, but it isn’t strong enough to really work out. Perhaps some more knowledgeable types could tell me who operates voice down this low.

Addendum: A few minutes later, the voices were much stronger. Spanish speaking, it would appear. Here’s a bit of it, recorded with a more appropriate filter setting of 2.7khz LSB:

Spanish voices, on 7.040Mhz LSB

Addendum2: Upon listening to it some more, I’m actually not 100% sure it is Spanish.

VK2ZOI’s Flower Pot Antennas

I made a brief mention of this website a few weeks ago on Twitter, but thought I should also archive a link to it here. If you are looking for some nice VHF and/or UHF antennas, these seem pretty neat, with clear directions. They also have the benefit of being stealthy: disguised mostly as flower pots.

VK2ZOI’s Flower Pot Antennas

As is true of many things that I find interesting, Alan, VK2ZAY has also been down this road, and constructed one of these for 2m himself. Check out his notes here.

Mini hack o’ the day: Making IRC talk…

Okay, it’s been a while since I posted anything: I’ve been busy with travel and the holidays, and now I’m trying to get my home office/shack setup so I can pursue some other projects. It is one of those rooms that has piles of crap, some of which I haven’t seen in years, so I’m carefully working through it, tossing stuff that is useless and organizing the remainder.

As a result, I’m trying to also make the space a bit more engaging, so I’ll spend more time there. My eventual goal is to get some of my radios in here so I can listen to more shortwave and ham traffic, but I also spend a fair amount of my off hours on IRC (mostly on the #hamradio channel on irc.freenode.net using my callsign K6HX as my nickname). Instead of forcing me to sit reading a screen, I thought it would be less intrusive and allow me to get more work done if I could monitor the channel by having a voice synthesizer read the msgs that appear in the #hamradio channel. That way, I could just go about my business, but still hear the conversations.

So, that was my idea.

My first thought was to simply run pidgin (a fairly nice IRC client that runs on multiple platform) and just use the pidgin-festival plugin for voice synthesis. But it turns out it was more difficult than I had hoped: nothing I tried seem to make it work. When I cracked open the source code after an hour of flailing, I was annoyed to find a bunch of really questionable code (hence my comment on twitter earlier about chimps writing code), and I soured on the idea. I turned off the computer and went to bed.

On the drive home from work yesterday, I thought about the problem again. I knew that festival could do the speech synthesis. I knew that the curses based irc client epic5 could write a log file of each msg. I then hatched a simple idea: I’d write a little bit of Python glue that would basically act like tail -f: it would repeatedly scan for new lines at the end of the irc.log file, and then use popen to the festival voice synthesizer, spew out what needed to be read, and then continue.

So, here’s the code!

[sourcecode lang=”python”]
#!/usr/bin/env python

import sys
import os
import select
import time
import re

msgpat = re.compile("<([A-Za-z0-9_]+)> (.*)$")
actpat = re.compile("\* (.*)$")

def say(nick, s):
p = os.popen("festival –tts", "w")
p.write(”’%s says %s”’ % (nick, s))
p.close()

def act(s):
p = os.popen("festival –tts", "w")
p.write(s)
p.close()

def process(s):
m = msgpat.match(s)
if m:
say(m.group(1), m.group(2))
else:
m = actpat.match(s)
if m:
act(m.group(1))

f = open("irc.log", "r")
f.seek(0, 2)

while True:
l = f.readline()
while l:
process(l.strip())
l = f.readline()
time.sleep(1)
[/sourcecode]

It works fairly well. There are a couple of things that I need to work on. First, I think the main loop is fairly inelegant. What I want is a version of readline() that works more like a read from a pipe: blocking when there is no further data to be read. But overall, this code mostly prevents the busy wait that would result without the sleep call.

There really isn’t any reason not to use an irc client library and capture the events that you want to speak directly. I didn’t go that way because frankly I didn’t want to spend more than 10 minutes testing out the idea. I’ll probably code up that soon though.

Other things:

  • It doesn’t do good things with emoticons like :-). You could build a dictionary to map things like that to words like smile or grin. Ditto for things like “hmmm” and “hahaha”.
  • It announces the speaker before every message. If the next message is the same person, it could just say what they said without the redundant introduction.
  • It doesn’t generalize to reading my twitter feed.
  • It should also drop things that look like URLS (they aren’t interesting to hear read out loud.)

Alan Yates’ Laboratory – G3XBM’s XBM80-2 Trivial 80 Metre CW Transceiver

My “on-this-day” blog sidebar indicates that I was looking at Roger, G3XBM’s XBM80-2 transciever: a fiendishly clever low parts count CW transciever for 80m. I’ve been pondering it a bit as something I should just tack together (I think I have all the parts in my junk box) so I’ve been staring at the design a bit, and it surprised me not at all to find that Alan, VK2ZAY had already built one with some modifications.

Alan Yates’ Laboratory – G3XBM’s XBM80-2 Trivial 80 Metre CW Transceiver

I think I’ll spend some time today finding the parts in my junk bins, and maybe I’ll tack one of these together this week if I have time.

PA1B’s QRPP page

Thanks to Roger, G3XBM for the link to PA1B’s QRPp page. QRP operation is operating with an output power of 5w, QRPp operation is operating with output powers down in the mw range. Bert, PA1B has some nice links to this kind of operation, and includes some designs for 20db attenuators that are easy to build and effective. These can step your 5w QRP rig down to just 50mw, or the FT-817 on minimum power down to a teensy 5mw. Roger did 1310 km using just 5mw on 80m using the WSPR mode, which I think is pretty amazing.

Bookmarked for future reference.

PA1B page of VERON department Nieuwegein (A29) and surroundings..

Simulating a 40m bandpass filter in LTSpice

A few days ago, I created a small program to compute bandpass filters using the equations from Experimental Methods in RF Design. Basically, you can pick a given inductor value, and then it solves for all the necessary capacitors. What wasn’t immediately obvious from the equations and the values that are generated was how these values interacted to alter the shape of the filter, and how variations in their value (perhaps to match easy to find capacitors) could change the frequency response.

So, I decided to go ahead and play with it using LTSpice.

Here’s an example filter that I got by specifying a 7.1Mhz center frequency, with a 250khz bandwidth. The source and load impedance are both specified to be 50 ohms. Using the program that I posted before, I got the following component values:

I then could go ahead and simulate the filter using LTSpice’s AC analysis, which yielded the following frequency response:

It looks pretty good. Using LTSpice, it’s pretty easy to check how (for instance) variations in the source or load impedance change the shape of the filter, or how small variations in the value of components affect the losses.

One thing that I didn’t immediately figure out was how to employ the inductor Q. LTSpice doesn’t include a place to enter Q, but it’s easy to compute the necessary parallel resistance (it’s just 2.0 * pi * F * L * Q) which LTSpice can use.

I really need to build one of these for the DC40B.

Getting data from APRS-IS using ncat…

I wanted to log a bunch of APRS-IS traffic for analysis, but didn’t really want to write any code (my brain hurts today), so I tried to figure out what the magic incantation is. It wasn’t necessary for me to inject any new info into the network, so it’s actually pretty easy.

Type:

ncat -C noam.aprs2.net 14580

This should connect you to a Tier 2 APRS server for North America. If you are in some other part of the world, google for “APRS Tier 2 Servers” and fine one for your local area. 14580 is the port number, and probably will be the same whatever server you choose.

Now, you need to login. Type:

user callsign pass -1 vers ncat 1.0 filter r/lat/lng/dist

Your callsign should be your amateur radio callsign. Specifying a password of -1 means that you are asking for a receive-only feed. The vers keyword introduces the software name and a software version, which is followed by a server command. In this case, we are following it by a “range filter”. If you insert a latitude and longitude, and a range expressed in km, the server will only return the information for sites within range of the specified latitude and longitude. There are other potential commands you can use, but I’ll leave that to another time. For instance, I entered:


user K6HX-15 pass -1 vers ncat 1.0 filter r/38/-122/1500

And then the necessary feed data started to spew:

# javAPRSSrvr 3.15b08
# logresp K6HX-15 unverified, server T2SJC, adjunct "filter r/38/-122/1500" OK - Filter definition updated
KC7FFI>APU25N,KINPRT*,WIDE3-2,qAR,KB7KSU:@170733z4254.31N/11235.35W_218/019g024t045r000p012P000b10100h74FWXNWS-POCATELLO {UIV32N}
K5MTS>APK102,WIDE2-2,qAR,W5AOX-10:=3500.04N/10620.91W_234/010g   t034r000p000P   h64b10182KDvs
WB6YTE>APU25N,WIDE1-1,qAR,KD6DCN-5:=3238.05N/11702.01W-Monitoring all local repeaters {UIV32N}
k2lca-14>APRS,TCPIP*,qAC,THIRD:@170737z3736.00N/12206.00W_340/013g020t023r000P000h64b10198
VA7MXA>BEACON,qAS,VA7TWM:>146.960T100 CAMPBELL RIVER VOICE REPEATER
SLIDE>APNU19,qAR,KB7PUX:!3918.76NS11953.03W#PHG7831/W3,NVn, WA6TLW, Slide Mtn., NV A=009700
K9AZZ-10>APS227,BRNSVL*,WIDE2-1,qAR,AB7FS:@170735z4408.72N/12235.25W_234/004g008t054r000P000p000h88b10245
KD6LAY>APW285,WA6YLB-5,WA6TK,WIDE2-2,qAR,W6MIN-15:_01170738c054s000g000t050r000p000P000h90b10174wU2K
KE6JDC>APRS,TCPIP*,qAC,T2TUS:@170737z3347.47N/11806.50W_360/002g...t052r...p...P000h87b10133.DsVP
VE7ZKI-10>APWW05,TCPIP*,qAC,T2VAN:>170737zAPRSISCE/32 Testing Status report
W7KZO-1>APRS,TCPIP*,qAC,MTAPRSNET:@170737z4528.87N/10942.87W_282/031g043t055r000p000P000h29b09997.DsVP
N7OKG>APU25N,TCPIP*,qAS,N7OKG-1:@170737z4805.12N/11725.93W_123/000g000t041r000p014P012h92b10047uLCrs
WA7ZVY-4>APRS,NEWPRT*,LINCON,qAR,W7KKE-6:@073702z4438.50N/12403.36W_214/009g019t052r006p448P047h00b10219.WxDG
KOPEAK>APN382,SOMTN,WIDE2*,qAo,WE7U-3:!4627.66NS12332.96W#PHG5660/W2,WAn,KOPEAK WA7RW
KC7HXC-9>APOTC1,W7PFR-1,WIDE1*,WIDE2-1,qAS,WW7CH:/170737z4725.71N/12206.70Wj263/004/A=000471 12.7V
NI6M-2>APNU3B,WIDE2-1,qAR,K6TJS:!3703.52NS11924.41W#PHG5360 Mile High, Ca 4690'
KD6RSQ-5>APRS,XE2K-1,KF6ILA-10*,WIDE3-1,qAR,N6EX-3:$ULTW005E00DC026600C027B7FFFC8B0F00010233000F058C00000039
KD6RSQ-5>APRS,XE2K-1,INDIO*,WIDE3-1,qAR,K6JV-11:$ULTW005E00DC026600C027B7FFFC8B0F00010233000F058C00000039  
DIAMON>APN391,BEAR*,WIDE2-1,qAR,CRVLS-1:!4314.44NS12206.59W#PHG5700/W7ZQD OR DIAMOND LAKE APRS
W0LTA>APRS,TCPIP*,qAC,T2BERN:@170737z4007.00N/10456.23W_178/004g006t038r000p000P000h66b10042.DsVP
XE2K-1>APN391,KF6ILA-10,WIDE2*,qAR,N6EX-3:!3238.88N/11530.04W#PHG73604/Mexicali B.C Digi @ XE2K's Station DM22fp www.xe2k.net
W8GWP-7>SV2PXP,WA6YLB-5*,WIDE2-1,qAR,K6MAR-10:`/CDl!>/`"4d}_#

And so on. The format of the individual lines is beyond the scope of this informational post, and is left as an exercise for those who like to read software specifications.

Addendum: Playing with this basic idea, I decided to limit output to just those stations reporting their symbol code as a balloon (APRS primary symbol “O”). I found out that station DL2FX-11 was reporting its position, with its status of “in der Luft” which even in my primitive knowledge of German I know to translate as “in the air”. So, I surfed over to aprs.fi to find out if the station was in fact a balloon, and it was. Apparently it was on its way down too, after reaching a height of 112K feet. Very neat.

Here’s the aprs.fi screen grab:

Morse on Arduino code, now at Arduino Playground

A long time ago, I wrote some code to send simple morse messages by toggling a pin of an Arduino. It could either blink an LED, or if you wired a bias resistor and transistor to it, you could use it to (say) act like a key for the FT-817. But then I lost the code (it’s probably on my old laptop somewhere).

So, I rewrote it. This time I included some additional code so that it could generate a PWM signal that would beep a small speaker or buzzer. Some people seemed to like the code and thanked me for writing it. No biggie. I got some requests to reuse the code, I placed no restrictions on its reuse, but said that it would be great if they mentioned my name and blog when they redistributed it.

Erik Linder, SM0RVV, did just that. He tidied up the code, and submitted it to the Arduino Playground. Awesome! Thanks Erik. Hope others find this little code fragment to be of some use.

Arduino playground – Morse.

Codec 2 good for voice, but not so much for CW

I’ve been thinking about making a kind of “codec2 robot” that people can telnet to and get responses from, and toward that end, I thought I’d see how it did on synthetic speech, since I thought being able to use a speech synthesizer for responses would be good. I had a file generated from my “mscript” Morse code tutorial generator thingie lying around, and passed it through Codec2.

Original sound clip, voice generated on MacBook, downsampled to 8khz.
Compressed via Codec 2.

It’s quite starting, but the segments containing morse simply disappear. I’m not sure I’d call that a flaw, but it may limit the usability of the codec in certain cases (like the CW practice nets held on some repeaters). Does anyone know if D-Star/AMBE does a similarly bad job of reconstructing these relatively pure tones?

Just curious.

My Morse Code practice generator…

A while ago, I worked up a simple little program that could generate both computer generated speech and Morse code at various speeds to make up some sample recordings I could use to brush up on my Morse skills. I apparently left it in a pretty broken state though: it could use some work. But it does generate pretty pretty reasonable sounding audio using the voice synthesis system on the Mac and my own relatively nicely filtered morse wave forms. I should clean this up, and then use it to brush up on my code skills.

On an LC Bandpass Filter for receivers…

I had some time yesterday, but no enthusiasm for melting solder (hey, some times, you just don’t feel it) so I thought I’d spend some time, well, learning stuff. So, I dusted off EMRFD and looked at the design equations for creating bandpass filters for receiver inputs. On my second printing, these occur on page 3.14 (π!). Rather than laboriously work through the possibilities, I decided to just code up a small python program. Here’s the result.

[sourcecode lang=”python”]

#!/usr/bin/env python

# An simple program to compute the value of components needed for a
# Doubly Tuned Circuit LC filter that can serve as a bandpass filter
# for homebrew receivers. The equations come from the sidebar equations
# presented in EMRFD (I have the first edition, where it appears on page
# 3.14)
#
# Written by Mark VandeWettering

from math import sqrt, pi

F = 7050000. # frequency of operation in Hz
B = 100000 # bandwidth
R0 = 50 # load resistance
L = 0.000001156 # inductance of the two coils
Qu = 250. # "Q" of the coils, approximate

k = sqrt(2.)/2. # I hardcoded the Butterworth filter equations
q = sqrt(2.)

omega = 2.0 * pi * F
c0 = 1. / (omega * omega * L)
c12 = c0 * k * B / F
qe = (q * F * Qu) / (B * Qu – q * F)
ce = 1.0 / (omega * sqrt(R0 * qe * omega * L – R0 * R0))
ct = c0 – ce – c12

print """
CE C12 CE
+—||—+—+—||—+—-+—||—+
| | | | | |
< ( | ( | <
> R0 ) L – Ctune ) L – Ctune > R0
< ( – ( – <
> ) | ) | >
| | | | | |
V V V V V V

"""

print "F = %.2f" % (F / 1e6), "Mhz"
print "B = %.2f" % (B / 1e6), "Mhz"
print "R0 = %.0f" % (R0), "ohms"
print "L = %.1f" % (L * 1e6), "microhenries"
print "C12 = %.1f" % (c12 * 1e12), "pf"
print "CE = %.0f" % (ce * 1e12), "pf"
print "Ctune = %.0f" % (ct * 1e12), "pf"
[/sourcecode]

If you run it, you can find a filter designed for 40m with a bandwidth of 100khz. I haven’t had time to run the results through LTSpice for analysis, but the values computed match the values printed in the table in EMRFD, so I suspect things are reasonably well behaved. My choices of the constant k and q select a Butterworth filter instead of a Chebyshev, which given the application I suspect is just fine. According to EMRFD, the choice of L is fairly arbitrary, They suggested 10. / frequency (in Hz) as a good starting value. I used a Qu of 250 because, well, that’s what they used, and I suspect it’s fairly typical over toroidal coils that you’ll wind yourself.

Hope this helps someone.

DC40B update

Previously, I noted that the oscillator on my DC40B kit (supplied by Doug Hendrick’s qrpkits.com was rather sluggish to start. Reading the messages on the Yahoo! groups, it seems that adding additional capacitance to the Colpitts oscillator was the correct fix, so today, I dug some 47pfs out of my junk box and soldered them in parallel to the existing caps on the backside of the board. Now, the oscillator starts right up! I still haven’t the transmitter calibrated, but it seems to work thus far. I just need to put the final transistor in place, and then I can mount everything in the case.


Once the sun went down, I started getting large amounts of short wave broadcast interference (some kind of Christian radio). It appears that this kind of interference isn’t unknown. It appears that I need some kind of bandpass for the input. I remembered that the GQRP had a technical page listing some easy input filters: a few minutes Googling yielded this link which has a bunch of designs which use TOKO inductors. I might even have some of those in my junk box.

First test of Codec 2

I’ve previously mentioned David Rowe’s excellent work on a patent free codec for amateur radio, Codec2, but today is the first time I actually downloaded the code and gave it a shot. You can find the code and the quickstart here:

Codec 2 « Rowetel

My own voice has some fairly low frequencies in it, so I was intrigued to find out how my own voice would do. David’s page mentions that Kristoff, ON1ARF, has a voice where the existing AMBE voice encoder does a much better job, largely because the low frequency encoding of AMBE is much more effective, so I took a short message that I used for some companding experiments I did a while ago, and gave it a try.

The original, as recorded via my iPhone, and downsampled to 8khz using sox.
The same clip after encoding/decoding with codec2.

As you can probably tell, the fidelity isn’t all that stellar with my own voice either. I have nothing to add other than that base observation, but perhaps this will serve as incentive for me to look into this stuff more.