Making a Raspberry Pi based Amateur Radio WSPR Go-Kit

A couple of weeks back I got a Raspberry Pi setup with TAPR’s QRPi low pass/band pass filter board, running WsprryPi, providing a low-cost, low power, WSPR transmitter. For my first attempt everything was hooked together temporarily. I wanted to see if I could get the Pi and a USB battery pack packaged in a weatherproof box with connectors for an antenna so I can take it out and leave it outside in the yard transmitting for a day (or at least as long as my USB battery pack will last for – I currently have 10000mAh USB pack that seems to last at least 8 hrs or so with a 1/4 charge remaining).

This is what my second attempt looks like:

  • 10″ Tactical Weatherproof Equipment Case, from MCM
  • on the sides of the case I drilled through and added banana jacks to connect each side of the wire dipole on the outside of the case. On the inside I soldered a short wire from each jack which connects into the QRPi board connector
  • the battery is a 10000mAh Anker USB battery pack (hard to see in the photo but it’s at the back of the case)
  • battery and the Pi are velcro’d into the case

There’s plenty of free space on the inside of this case, I probably could have gone with a smaller one. I have some other Pi related projects in mind though, so will probably use this size case again for another Pi + Packet radio related project.

So, the results, how does it perform. Well the first couple of weekends I ran this I didn’t get any spots, so I suspected something was up with my antenna connections. I had already run with the same wire dipole connected directly to the board, so I knew it would radiate a signal. The first test I roughly cut the wire dipole using the 468/MHz formula but I didn’t bother to check it on an antenna analyzer. So next step, where is the resonant point of this antenna?

Hooking up my YouKits analyzer, the center line is showing 14.1 MHz, but the low point is clearly to the left, so the wire is too long:

 

 

 

 

 

Trimming off about 6 inches from each side got us more in the ballpark – now we’re looking good: wp-1464669440438.jpg

Getting the Pi back out in the yard, I hung the antenna from a couple of bushes at approx 5ft off the ground. This is very low for a dipole on 20m, but I know from previously running with this antenna at the same height that I still got spots all the way out to the East coast, so I’m not too worried about getting it up higher.

To keep things in perspective, remember we’ve only running 100mW, so we’re running low power, definitely QRP by any definition. At this low power, any spot is a good spot for me.

So, what about the spots? I didn’t get anything all afternoon, but then I got a number of spots from Texas, so if anything, there was a good propagation path between California and Texas early evening, but the spots dropped out shortly after sunset:

Since every day on HF is different, this is definitely an ongoing experiment 🙂 So far, this works pretty good and I’m happy with the setup!

NOTE: to transmit on Amateur Radio frequencies requires an Amateur Radio license, with the appropriate privileges for the frequency/band you are using. Also, per recommendations for the WsprryPi software, ensure you are using appropriate low pass/band pass filters so the Pi is not generating unexpected harmonics on other frequencies. 

For future reference, current solar conditions (from http://www.hamqsl.com/solar3.html ):

SFI=86, SN=25, A11, K=2. 20m day/night was fair

Running headless WSPR on the Raspberry Pi

I’ve tried a few times to compile and run WSJT on the Pi in order to decode JT65 mode transmissions – I think I got close, but I ran into other issues with the soundcard configuration that has tripped me up, like configuring WSJT to listen and transmit to my soundcard’s inputs and outputs.

I’ve seen some other posts on getting WSPR running, so this looks like it’s more possible.

From going through the WSJT dependencies, I’d already installed all the libportaudio and python-* dependencies. If you’re following this from scratch through, I’d start with George Smart’s article here. To get a working config I followed George’s article first and then picked up LX3KR’s article here to get the soundcard config working – I also wanted to run WSPR in headless mode, so I picked up the steps at this point:

cp WsprMod/w.so WsprModNoGui/

I’m not sure the suggestion for the .asoundrc file worked for me, as referencing the input as 2#audio and output as 3#radioconv in the WSPR.INI didn’t work.

At this point I did some guessing. When wspr starts up, it writes a list of audio devices to audio_caps file in your wspr dir. Here’s what mine looks like with my Rigblaster Advantage attached:

pi@raspberrypi ~/amateur_radio/wspr $ cat audio_caps
0    1    2       0       0  RIGblaster Advantage Audio: USB Audio (hw:0,0)
1  128  128       0       0  sysdefault
2    0    2       1       0  front
3    0    2       1       0  surround40
4    0    2       1       0  iec958
5    1    2       0       0  spdif
6  128  128       0       0  default
7    0    2       1       0  dmix

So I’m guessing the Rigblaster is device 0 and sysdefault is 1.

From the suggested config in WSPR.INI, it configures the in and out like this:

AudioIn 2#radio
AudioOut 3#radioconv

2 and 3 don’t seem to match up with anything I’m seeing, but since the other earlier step changed the USB sound card devices to be default, I set these instead:

AudioIn 1
AudioOut 1

Before starting up wspr I also ran alsamixer and set the vol and mic levels to be roughly 3/4 volume.
Now when starting up it looks like wspr sees my devices and off it goes:

pi@raspberrypi ~/amateur_radio/wspr $ python wspr_nogui.py 
******************************************************************
WSPR Version 3.00_r2326, by K1JT
Run date:   Thu Apr 17 05:14:05 2014 UTC
setting g.Win32
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
Audio config ok
2014 Apr 17
05:14:06
Rx Noise: -30  dB

The last few lines repeat for a minute or so then it starts reporting the actual volume level. You want to adjust the radio volume or volume on the Rigblaster so that the level is close to 0db. +/- a few doesn’t seem to make much difference.

The other values I changed are:

PctTx 0

This is percent tx time. Leave it at 0 for rx only, otherwise change to a %age of time value that you want to send your own transmissions. I changed it to 5.

iband 2

This represents the band you’re listening to, counted from the list of freq values. 600m is 1, 160m is 2 and so on.

Start it up and off you go!

python wspr_nogui.py