SDR - Software Defined Radio


SDR – Software Defined Radio


I love to play with new gadgets and since the age of 12 I used to build radios from valves, transistors  and other electronic components. Then my father acquired a BC-348 (No, not a BC348 transistor) A behemoth of a valve radio receiver a BC-348! I have been interested in Amateur Radio ever since and indeed began a career repairing radios, HiFi, TV sets, satellite and Disco equipment that spanned 26 years. Recently with the advent of single board computing (Raspberry Pi etc.), I have been getting more into merging electronics with computers.

When I first came across the initials SDR I was intrigued. A quick Google search followed by some Youtube watching piqued my interest enormously. Software Defined Radio is where budget Electronics in the shape on a USB radio meets software packages, much of which are free or open source. Do you remember those radio VHF/UHF Scanners that are used to listen to Shortwave transmissions or essential services, these multi £hundred receivers were always on my wish list. Well for a measly £20-30 you can get a USB stick and get into this new wave (OK so it has actually been around since 1984) radio snooping. You buy a stick, download some drivers, install SDR-Radio software and away you go.

Now to get anything useful out of SDR requires a different set of skills to computing, though that will help enormously. SDR is a platform onto which you can build a customised set up that can do a lot more than listen to Amateur and PMR (public mobile radio). You can do radio astronomy, track aircraft routes, pull weather data, decode pagers and utility meters and countless other things. The only real limits is your imagination. You can also setup an SDR server and allow multiple users to use it at the same time. That said you will need to learn about how radio frequency spectrums are used and different demodulation techniques. I will cover the basics below.

Software Defined Radio replaces most of the electronics associated with complex signal processing with software on your PC or Raspberry Pi. This decreases the cost and increases the versatility of the radio receiver. It also allows people to develop their own decoders and demodulators to handle a very wide variety of signals and visualisations.

NooEelec SDR USB Radio receiver inclides 3 aerials/antennae and magnetic mount

So what did I buy? I bought this NooElec NESDR for around £27. I chose this rather than a cheaper one for the following reasons.
  • Multiple aerials to optimise reception on different wavebands
  • Aluminium enclosure to keep interference from PC/laptop out (PC’s radiate tons of interference)
  • A USB extension lead or 1-2metres is a good investment too
  • It covers from frequencies from 25Mhz to 1.7Ghz continuously
  • Popular RTL2832U & R820T2 Realtek chipset
  • Designed to work with Raspberry Pi and Linux as well as Windows
  • Robust enough for portable use as I live in a city and have limited reception
Of course you can buy one much cheaper, but what is 20 odd quid these days. If you want to listen to frequencies below 25Mhz you will need a frequency convertor and they cost more than the SDR.

Aluminium case gets quite hot!

So how do we get SDR up and running?

Linux/Raspbian INSTALLATION

If you are running Linux then you need to read Chaim Kraus excellent articles on Ubuntu and Raspberry Pi. If you are running any other Debian distro you should be able to use the same info.
If you are running Windows you will be disappointed by the lack of drivers or a manual, this is because the SDR is aimed at the hobby market and the permutations are unlimited. Do not worry,

Windows Installation

Driver
Plug in the SDR and the aerial into the USB SDR. Then download Zadig, this will detect what version of hardware you have and download the correct driver. Simply follow the instruction on their website.
Software
To control the radio we need software and there is a massive choice, you will undoubtedly use many different packages as you become more accomplished and discover new uses for SDR. A great starting one for Windows as SDR#, pronounced SDR sharp. Download this from Airspy.com.
Unzip the sdrsharp-x6.zip folder and copy the extracted sdrsharp-x86 folder to C:\program files\.
Go to that folder and right click SDRSharp.exe, create a shortcut on your desktop but leave this folder minimized as you may need to add more programs and dll’s into it. Right click the desktop shortcut and select the ‘compatability mode’ tab, select ‘Run as Administrator’ at the bottom and close it. Then double click the SDRSharp shortcut. At the top left hand corner select the first dropdown control and select ‘RTL-SDR (usb)’ there is a great video on Youtube. You will find a lot of controls to twiddle, don’t worry I will take you through the basics.

Modulation and Demodulation

AM FM

The basic RF (radio frequency) signal that a radio transmits is called the carrier, it is a sine wave and it gets varied somehow to carry the information to the end user. You have probably heard of AM and FM radio (not the frequency wavebands, the modulation).

AM (Amplitude Modulation) modulates the signal by varying it’s strength in time with the voice or music.

FM (Frequency Modulation) transmits information by varying the frequency of the carrier by a relatively small amount. On SDR radio you will see NBFM which is around 12.5Khz variation and WFM or WBFM which is 75Khz (or 50Khz in USA) .

You can also tweak the bandwidth of the demodulator either by the settings, or right clicking the side of grey area on the frequency marker and dragging it. Generally speaking broadcast public radio is WFM and private radio is NBFM as it it speech only and this allows channels to be closer together. FM transmission is generally used from 50Mhz upwards, though there are exceptions.

SSB – DSB - Sidebands


Every RF carrier that is modulated has sidebands, this is where the information is held, the actual sine wave remains constant, the higher the frequency that modulates the signal the further apart form the carrier the sidebands become. So if a 1Mhz signals is modulated by 10Khz, the sidebands will be at 990Khz and 1010Khz (1000Khz to 1Mhz). Now if we want to use the broadcast wavelength efficiently we are actually transmitting a lot of redundant data. The carrier is not really necessary as it is just a constant sine wave, if we get rid of it we will have DSB or double side band. (More correctly known as DBSC double sideband suppressed carrier).

Now both sidebands are identical but mirrored, so we could lose one of those too. If we lose the upper sideband we will just transmit Lower sideband or LSB. Conversely if we lose the lower sideband we will transmit only the Upper sideband or USB. Now as we have lost the carrier that was about 90% of the signals strength we can transmit very long distances. But to get our audio back, we will have to re-inject the carrier in our receiver. This is done with a very low powered oscillator and some electronics (normally, software can do this too) it is called a beat frequency oscillator (BFO).

As we tune our radio to get the best reception we will hear the audio frequency shift from squeaky voices to booming. We will adjust it so it is more pleasant to our ears. Generally single and double sideband transmission is only done for speech due to this weird effect. Both USB and LSB are generically known as SSB – single sideband.

CW


CW stands for continuous wave, which is actually a misnomer. Remember the rhythmic Morse code in all those world war two war films and the ITV series Morse. When the guy presses the key the carrier frequency is transmitted and when he releases it it turns the carrier off. The Morse code is either a dot, or a dash. A dash is three times longer than a dash and a space is seven dots long.This can be heard as a clicking sound on an AM receiver, so how can we tell which is information and which is a space? By switching on the BFO from the SSB above, now we can make the carrier frequency beat with our BFO and make an audible note when there is a carrier, and silence (relatively) when it is not. Our Morse code is now readable to a trained person, or some software. This used to be a requirement of the RAE amateur radio license, the intention was that in the event of a world war the amateur radio operators could send information across the country. We hate the term HAM’s in the UK, that is American slang.

Others – Vestigial sideband, ISB, QPSK, Tetra, Quadrature modulation, Frequency scatter and more

Digital Data, television signals, pagers can also be transmitted. This is too in-depth for a beginner. Also encryption systems can be applied to prevent you listening in or at least making sense of what is being said. When you are ready to start applying add-ons to your SDR kit and software, that will be the time to do your own research.

What’s the frequency Kenneth?

So how do we look for airplane/tower radio, weather balloon transmission or PMR (public mobile radio like the ones used by security officers in shopping arcades)? Well it is regulated in the UK by OFCOM and their Frequency Allocation Table is here. This will tell you what bands to look at, but for local information you can try UKRadioScanning and if you live in Derby or Nottingham areas you can peek at M3FON.Tripod.com. Of course information changes all the time, but if it was too easy it wouldn’t be any fun would it?

3 Whip aerials, two tuned, one adjustable

Aerial

Now there are a couple of things that you really need to know about aerials or antennae. There are some very fancy ones called Yagi’s, multiple element arrays (like TV aerials) and disc-cones. There are three things that will prevent disappointment for the scanner (that’s you).
  1. Height – the higher the better
  2. Ground plane – all these aerials made for mobile use are designed to be magnetically clamped to a car or van. The performance of any aerial is enhanced if there is electrical contact with the ground plane. See my notes below on how to improve the aerial you just bought with your SDR.
  3. Wavelength – the wavelength of a signal is inversely proportional to its frequency. Most aerials are designed to work at ¼ of the signal’ wavelength. See below. This is why I bought a kit with three in.
The mag mount. Magnetically attracted to metal ground plane

Fix the aerial’s groundplane.

The base of the magnetic mount on cheap aerials does not make contact with anything, this does not help it stick or work at optimum electrical efficiency and reduces your reception a lot.

I have added a wire alongside the magnet, disck shown on the right side

Now it looks painful to take your brand new toy apart, but the aerial as supplied is often worthless in terms of performance, so if you screw it up it will cost about a tenner for a new one. I was impressed with the difference after fixing it.
  1. (optional) Acquire a multimeter or continuity tester, a cheap multimeter can be had for about £5 on Ebay and is ideal for little projects like this and Raspberry Pi stuff.
  2. You will also need some copper wire with the insulation removed.
  3. (optional) Measure the continuity on 200 ohm range between the outer of the aerial’s SO-239 connector and the base. The base probably does not conduct electricity, mine didn’t.
  4. Remove the self adhesive base disc carefully, you will need it later.
  5. (optional) Check the continuity from the outer SO-239 connector and the magnet in the base.
  6. If that is good, carefully prise the magnet out with a thin screwdriver, do not use a knife.
  7. You should see the earth wire at one side. Slide your copper wire alongside the existing earth connection and trap it in place with the magnet. When you push the magnet back, only push it far enough to refit the disk flat. The smaller the earth gap between it and the groundplane, the better it’ll work.
  8. Refit the self adhesive disc.
  9. From the copper wire somehow across the base disc so that it will make contact with the ground plane. You can attach self adhesive copper foil if you want to do a real professional job,. (But then you would just spend money on a decent aerial)
  10. Find a biscuit tin or filing cabinet or some sheet iron as a ground plane to mount the aerial on.
  11. Be impressed at your handy work and your new found knowledge of radio!
Basic groundplane - it is better than nothing

Try it all out
So switch it all on and tune in to your favourite FM radio broadcast station. This will allow you to familiarise yourself with the software, tweak the aerial and confirm that your kit works OK. At first I had issues where I could barely pick up BBC Radio 2 FM. After installing on Windows 10 I found that there was a sensitivity or gain control in the software I could adjust to make it more sensitive. I also messes with the AGC – automatic gain control until I was happy. i then did the grounplane mod and I was able to pick up local private security services in the shopping centre. My location just outside a city in flats does limit what I can do, but as I bought portable kit I intend to take it to my computer group and see what else I can receive.

At first I was very disillusioned with the performance, but radio projects always need experimentation to get the best from them. I will probably invest in a decent aerial and frequency convertor in due course. Also bear in mind that private radios only transmit for a minute or less every hour. This is where the ‘waterfall’ display is handy to monitor a band. You will still need to click up and down a few Mhz until you become familiar with what frequencies are used in your location. If you like to travel then take your SDR up a local hill or on a canal boat as the open countryside is much better than a town or city for radio reception. I never did sit the RAE examination due to getting married and starting a family. I did however work at Racal Dana in Warrington, Cheshire UK for a short period as a test technician and and took part in their after work amateur radio clubs. I have also worked with several Amateur Radio enthusiasts. It was all valuable experience for Radio, SDR and WiFi. I hope to indulge more now that I have the time to do it.

Whip and groundplane for testing
This is as far as I have got in a weekend with SDR.
Radio is a massive subject that needs patience and learning new skills to get the best from it. But if you do, the rewards are immense and you will become part of an ever-growing trend in technology and be able to peek behind the doors of your community.

Some resource websites
https://hackaday.com/2017/09/05/19-rtl-sdr-dongles-reviewed/
https://www.rtl-sdr.com/
http://rtlsdr.org/
http://www.nooelec.com/store/
http://ukradioscanning.com
https://www.tapatalk.com
http://www.transmission1.net
https://ranous.wordpress.com/
https://airspy.com/
https://www.facebook.com/rtlsdrblog/
http://www.radioforeveryone.com/p/coketenna-easy-cheap-effec.html
http://www.ads-b.com/