Friday, 19 August 2016

Setting up a Raspberry Pi WSPR Station

In some of previous posts, I've discussed how it is possible to generate RF directly from the Raspberry Pi using the clock pin, and I've also mentioned the excellent LPF kits for the Raspberry Pi available from Language Spy. In this post, I'm going to bring this all together and show you how to setup a simple WSPR station using the Raspberry Pi.

WSPR is a QRP semi automatic "beacon" mode developed by Joe Taylor, K1JT and is an excellent way to determine propagation conditions, or to test the effectiveness of an antenna system

I would recommend starting off with an up-to-date version of Raspbian Jessie which can be downloaded from RaspberryPi.org.

The first thing to do is to check your Pi has the correct date and time. You can force your Pi to update it's internal clock by typing the following at the command prompt and pressing Enter:

pi@raspberrypi ~ $ sudo ntpd_

You can check the time is correct by typing "date" at the command prompt and pressing Enter.

pi@raspberrypi ~ $ date_

Use "git" to fetch a copy of the WsprryPi code from the Git repository by typing the following at the command prompt and pressing Enter:

pi@raspberrypi ~ $ git clone https://github.com/JamesP6000/WsprryPi.git_

Navigate into the folder where the WsprryPi code is by typing the following at the command prompt and pressing Enter:

pi@raspberrypi ~ $ cd WsprryPi_

Compile the WsprryPi code by typing "make" at the command prompt and pressing Enter.

pi@raspberrypi ~ $ make_

Install the code by typing the following at the command prompt and pressing Enter:

pi@raspberrypi ~ $ sudo make install_

Your WSPR station is now almost ready to go, however please note that in order to use this software and to transmit you MUST be a fully licenced radio amateur.

Decide which band you wish to transmit on, and install an appropriate LPF filter for that band. The photo below shows my Pi with one of Language Spy's 20m LPF filters installed.



You can get help on the wspr command by typing the following at the command prompt and pressing Enter:

pi@raspberrypi ~ $ wspr -h_

You need to use various options and enter some arguments when you run wspr. The command you'll need to enter will be in the following format:

sudo wspr -r -o -s CALLSIGN LOXX 10 BAND 0

But you must...

replace CALLSIGN with your amateur radio callsign

replace LOCATOR with your 4 digit Maidenhead Locator code.

replace BAND with the band you want to transmit on. Suitable entries would be "20m", "40m" etc

The option "-r" tells the WsprryPi software to repeat the transmission sequence indefinitely, until you press "Ctrl-C"

The option "-o" tells the WsprryPi software to use a random offset for each transmission

The option "-s" tells the WsprryPi software to self-calibrate

The "10" tells the WsprryPi software that your transmitter power is 10dBm (i.e. 10mW)

The final "0" tells the WsprryPi software alternatively transmit for 2 minutes and then wait for 2 minutes.

You can check to see who is hearing your transmission by going to the WSPRnet site and searching for your callsign. I find the "Map" feature very helpful - simply enter your callsign and the band you have been using and you will get a map of the world showing the locations of receiving stations.

Here's a screenshot of my results from as few days ago.


It's amazing the fun you can have with just 10mW!

Once you are happy that all is working as it should, you can run your Pi in "headless" mode and use SSH from another computer (or your phone) to launch the WsprryPi program.

Friday, 11 March 2016

Running the RPi Wobbulator under Raspbian Jessie

It has been a while since my last post, and the world has moved on in the meantime....

Raspbian "Wheezy" has been superceeded by "Jessie", which has extra bells and whistles and is, in many ways, easier to setup. Also, the Raspberry Pi Wobbulator has evolved thanks to the efforts of Gray Remlin, who has rewritten and developed the code. In this post I'm going to assume you are starting off with a fresh Raspian Jessie image and I'm going to go through what you need to do to run the latest vesrion of the Raspberry Pi Wobbulator software.

When Jessie first boots up, it will boot straight to the GUI, and you should see something very similar to the following screenshot.


The first thing to do is to expand the file system on your newly created SD card. This can be done by clicking on Menu -> Preferences -> Raspberry Pi Configuration as shown in the following screenshot.



The Raspberry Pi Configuration window will open up. Click on "Expand Filesystem"



After a short delay, you'll see the following message. Click on "OK"



Click "OK" again on the Raspberry Pi Configuration window and you will see the following message. Click "Yes" to reboot your Pi.


Wait for your Pi to reboot...

Now, if (like me) you are used to having the task bar (or menu bar) at the bottom of the screen, this can be done by clicking on Menu -> Preferences -> Appearance Settings as shown below


When the Appearance Settings window appears, click on the "Position" attribute and change it from "Top" to "Bottom"



This will give you a more conventional screen layout



Now you need to enable the I2C bus. Click on Menu -> Preferences -> Raspberry Pi Configuration as shown below


When the Raspberry Pi Configuration window appears, click on the "Interfaces" tab and enable the I2C bus by clicking "Enabled"


When you click on "OK" you will be asked if you want to reboot now.  Click "Yes" to reboot your Pi.


Wait for your Pi to reboot...

Open a terminal window by clicking on the "Terminal" icon on the task bar.



Now you need to install the “i2c-tools” package. Type the following at the command prompt and press Enter:

pi@raspberrypi ~ $ sudo apt-get install i2c-tools_

Go and make a cup of tea or coffee.....this will take a few minutes to complete.

When you get back to the command line,  install the “python3-smbus” package by typing the following at the command prompt and pressing Enter:

pi@raspberrypi ~ $ sudo apt-get install python3-smbus_

Now you're ready to download the RPi Wobbulator software from GitHub. Type the following at the command prompt and press Enter:

pi@raspberrypi ~ $ git clone https://github.com/mi0iou/RPi_Wobbulator.git_

When this has finished, close the Terminal window and launch IDLE by clicking on on Menu -> Programming -> Python 3 (IDLE) as shown below


When the "Python 3.4.2 Shell" window appears, click on File -> Open as shown below


...and when the "Open" dialogue appears, double click on the "RPi_Wobbulator" folder...


...and then click on the file "rpi_wobulator.py" and click "Open"


This will load the program and display the code in a separate window. To run the software, click on Run -> Run Module at the top of the code window


This will launch the main RPi Wobbulator window


The following screenshot shows the Wobbulator being used to examine the characteristics of a 30m Low Pass Filter built from a kit supplied by Language Spy.


Full details of the LPF kit from Language Spy are available here, and they supply a range of Raspberry Pi related kits in their shop, which is well worth a visit.