1 week ago

Pictures from space via ham radio

Have you ever wanted to receive a radio signal from space? It’s fun and a lot easier than you might think!

What is Slow Scan TV (SSTV), then? You convert a picture into sound (similar to fax machine or dial-up modem noise) transmit the sound via radio, and convert the received sound back into a picture at the other end. The International Space Station (ISS) has a long history of transmitting SSTV pictures for global events, each lasting several days, where people the world over tune their radios to the ISS and try to receive the pictures every time it flies over their home.

One such event is set to begin on 12 April 2019 to celebrate the anniversary – to the day – of the launches of Yuri Gagarin in 1961 and the first Space Shuttle, 20 years later, in 1981.

Note: The event took place on 12 April but there were problems with users reporting back using the #SSTV hashtag. There will be more space transmissions upcoming. Please keep checking the Slow Scan Television (SSTV) blog for more information.

You’ll need

  • Raspberry Pi 2B or later
  • 3.5 mm speakers or headphones
  • RTL-SDR USB dongle (search for ‘RTL2832U’) with a good whip or dipole antenna
  • Tape measure, at least 1 metre

Install prerequisites and set the time

We presume you are running a clean install of Raspbian Stretch Desktop edition and are online.

Firstly, switch the audio output to the 3.5 mm headphone jack. This is needed for the way PulseAudio loops back the system audio as an input device. On the Raspbian desktop, simply right-click the speaker icon in the menu bar and choose Analog.

Then, open a Terminal and install the required software for the project:

Next, set your time zone and pull the correct time from the internet. In the Raspbian main menu, go to Preferences > Raspberry Pi Configuration > Localisation tab > Set Timezone, change Area and Location accordingly, then click OK.

Finally, go back to the Terminal window to pull the time:

Note that the desktop clock in the top right only updates every minute.

Install and test the RTL-SDR dongle

Insert the RTL-SDR dongle into your Pi and screw in the antenna (it can sit on your desk at this stage). Then verify the RTL-SDR is working with the rtl_test program. In a Terminal window, enter:

If you see a ‘failed to open rtlsdr device’ error, remove the dongle, reinsert it, and try rtl_test again. Leave for about 30 seconds and look out for any messages about loss of samples. Press CTRL+C when 30 seconds has elapsed. The loss of 100 bytes or so is acceptable.

A good, but cheap, antenna which can pick up the ISS SSTV signal

Listen to a commercial FM radio station

Let’s tune into a commercial FM radio station to check that both the dongle and the antenna are working correctly. The command below pipes raw data from rtl_fm into ‘play’, which will then produce the audio output. Modify the value after the -f to specify your own FM station/frequency and don’t forget to put the capital M after the number so it knows you mean megahertz and not hertz (98.8MHz is BBC Radio 1 in the UK). In a Terminal, enter:

Note that the ‘Tuned to’ value in the output doesn’t match. This is due to a property of all SDR hardware, called ‘DC spike’, and can be ignored. Plug in your speakers/headphones and you should now be able to hear audio from the commercial FM station. Move the antenna around or select a different FM radio station with a closer transmitter if the audio is noisy. Press CTRL+C to quit from rtl_fm.

Set up QSSTV

QSSTV is the program that will listen to the audio output on the Raspberry Pi and decode the pictures from the fax/modem noise when the ISS is in range. Let’s just check the settings are all correct. In the main menu, select Internet > QSSTV, then select Options > Configuration and choose the following options in the Sound tab:

  • Audio Interface – PulseAudio
  • Input and Output Audio Device – default — Playback/recording through the PulseAudio sound server
  • Sound Input – From sound card
  • Sound Output – To sound card

Click OK. Next, run the Calibrate function and go make a cup of tea/coffee: Options > Calibrate. Click OK when both progress bars reach 99%.

Decode a picture from test audio

Now that QSSTV is set up, we can download a test audio file, play it, and see a picture slowly appear. In a Terminal, enter:

Select the Receive tab in QSSTV and choose the following settings:

  • Use VIS – on
  • Auto Slant – on
  • Autosave – on
  • Signals – Normal
  • Mode – Auto

Click the play ► button. Nothing will happen, but just click it to start the receiver.

Open sstv_test.mp3 in the Chromium browser. You can either drag and drop the file from File Manager, or enter file:///home/pi/sstv_test.mp3 into the address bar.

Let it play and watch the picture appear in QSSTV. Notice the waveform and waterfall display activity on the right of the screen. Other SSTV test recordings can be found online.

It takes about two whole minutes for a picture to be decoded. When they do this from the ISS, a picture is transmitted continuously for about two minutes, with two minutes of off‑time before the next picture starts

Prepare for the next SSTV event

To get pictures from the ISS you need to know three things:

  • When the ISS will be transmitting the SSTV signal. It’s not always-on.
  • What frequency the SSTV signal will be transmitted on (usually 145.8MHz).
  • When the ISS will fly over your location.

The ISS flies over most places a few times every day (unless you live in the Arctic/Antarctic). You can find out when the ISS is transmitting on the ARISS SSTV website.

Note that there is an SSTV event starting on 12 April 2019 celebrating the launches of Yuri Gagarin in 1961 and the first Space Shuttle, 20 years later, in 1981. These events usually last for a few days at a time, meaning you will get multiple ISS passes during which you can receive the SSTV signal.

When is the ISS flying over me?

There are many websites you can use for this, but your author’s personal favourite is heavens-above.com.

Click ‘Unspecified’ in the top right to set your location. Type your postal code and country into ‘Enter place to search for’ and click Search. Scroll down and click Update. You’ll now be back on the homepage; under Satellites, click ISS. For ‘Passes to include’, select ‘all’.

The table now showing lists the times of the upcoming ISS passes for your location. The Alt value under ‘Highest point’ is the maximum elevation of the pass above the horizon; 90 would mean it goes directly overhead. Passes with higher maximum elevation will give better results than lower ones. Clicking on any row in the table shows the sky chart for that pass. Imagine holding that picture above your head and aligning it with the compass directions. The line shows the flight path of the ISS and this is useful for roughly positioning your antenna. It can also be useful to look at the ‘Ground track’ (see link in top right). Plan ahead and set up your ground station with time to spare before the ISS flies over.

Imagine holding this picture above your head and aligning it with the compass directions. The line shows the flight path of the ISS across the sky above you

Adjust your antenna

If you are using the RTL-SDR kit antenna, please read the getting started guide for it.

It’s a good idea to adjust the length of the telescopic arms based on a dipole calculator to match the antenna’s resonant frequency to 145.8MHz. This will help pick up weaker signals from low elevation passes.

Under Desired Frequency, enter 145.8. Under Select Antenna Calculation, select One Side. Click Calculate. The answer should be 48.9 cm.

Remember, there is about 2 cm of metal in each side of the antenna base. So take 48.9 and, before screwing in the arms, use a tape measure to make them both this length minus 2 cm (excluding the screw threads). It doesn’t have to be perfect, but make it as close as possible.

Deploy your antenna

As a general rule, try to get your antenna up as high as possible with a good view of the sky in all directions. Outside is always better, but you can still get the signal from inside a house – you’ll just see more noise in the pictures. Then, with the dipole arms flat, roughly align them with the flight path of the ISS that you find on heavens‑above.com and bend the two arms upwards into a right-angle V-shape. You don’t need to realign it for every pass, but it will yield better results if you do.

Antennas and their performance are sometimes a bit of an art form as opposed to an exact science. Experiment with different configurations on different ISS passes. Try one arm horizontal and one arm vertical, for instance.

Set the correct time again

QSSTV saves the decoded images with a UTC time file name and this is useful later when working out which ISS passes they are from. In a Terminal, enter:

Tune into the ISS frequency

We’ll use rtl_fm again for this, but note that the command is different to the commercial radio station one. A commercial radio station uses wide band FM whereas the ISS SSTV transmission uses narrow band FM and so we have to set rtl_fm up differently. In a Terminal, enter:

You should be able to hear white noise now (don’t forget the capital M for megahertz), but this will change to the fax/modem noise when the ISS flies over with the transmission active. Keep this window open. A picture is transmitted from the ISS continuously for about two minutes, with another two minutes of off-time before the next picture starts.

  • Start QSSTV
  • In the Raspbian main menu, select Internet > QSSTV. Select the Receive tab in QSSTV and choose the following settings:
  • Use VIS – on
  • Auto Slant – on
  • Autosave – on
  • Mode – Auto
  • Save if Complete (%) – 10

Click the play ► button. The waveform and waterfall display on the right should show noise coming from rtl_fm. Leave QSSTV running.

What is Doppler shift?

A common example of Doppler shift is the change of pitch heard when a police car or ambulance speeds past you. Compared to the emitted frequency of the siren, the frequency you hear is higher during the approach, identical at the instant of passing by, and lower during departure. The same thing happens with radio waves as with sound waves. The ISS is moving at 7 km per second!

To compensate for this, ground stations must continually retune their receiver as the ISS approaches (starting ~3.5kHz above 145.8MHz), passes overhead (reaching 145.8MHz exactly), and flies away (ending ~3.5kHz below 145.8MHz).The good news is that QSSTV is clever and can compensate by tracking the centre frequency of the audio signal as the ISS flies over. So you don’t need to do anything!

The ARISS VHF antenna installed on the bottom of the Columbus module Credit: NASA/ESA

Compensate for Doppler shift (optional)

It doesn’t make much difference, but if you want to have some fun with this, your author has created a Python script to compensate for Doppler shift. It tracks the ISS using ephem, computes the corrected frequency for when the ISS is passing over, and retunes rtl_fm using a UDP socket.

To use it you’ll first need to run sudo pip3 install ephem and then just start the script in another Terminal window. But first you will need to modify the code to set your location. See the LATITUDE, LONGITUDE, and ALTITUDE variables at the top. Get the values from the top right of heavens‑above.com and just estimate your altitude.

Wait for the ISS to arrive

You may want to leave your ground station overnight or over the weekend to capture several passes. When you return, select the Gallery tab in QSSTV to see what images were received. Alternatively, it’s always exciting to watch the pictures coming in live as the ISS is above you!

Get an SSTV award!

On your Raspberry Pi, the decoded pictures can be found in /home/pi/qsstv/rx_sstv. You can upload them to the ARISS SSTV website for verification and recognition.

Check the information for the event on ariss-sstv.blogspot.com to find out how to apply for the award certificates. This will be a PNG file that is emailed to you and will show a unique number. Good luck!