tiistai 31. maaliskuuta 2015

Software defined radio 3/4. SDR software for windows

I found out that these R820T/RTL2830U based SDRs are not simple plug and play devices. Installing drivers and setup is not impossible mission but some kind of guide is usually required. I did find one Finnish site that was very useful for me. (Thanks for Pentti Sarajärvi for all in all interesting page).

Step 1. Download this bunch of programs:
Zadig is driver package for R820T+RTL2830U. Windows automatic drivers won't do.
SDR# is one of the easiest SDR softwares you could find. It is a good "starter kit".
<- this is bare minimum you'll need.

There is wide variety of SDR softwares to choose from but SDR#  and HDSDR are two that I can ensure to work with direct sampling mode and thus make it possible to listen shortwave broadcasts.
I also recommend install HDSDR. You have to do some manual work in install but it pays out I'll promise.

HDSDR is a bit more capable software than SDRsharp. But it will need extra plugin to work. Here we have two option: 
a) Jose Maria Arauju's ExtIO_RTL.dll. This is my favorite plugin as it enables direct sampling mode.
or
b) Balint Seeber's ExIO_USRP.dll. I have tried this plugin only few times as I have not find a way to enable direct sampling using this. Compelling aspect is that this enables remote control of SDR by using BorIP server.
* Install only ExtIO_RTL if you want tune to shortwave.

Step 2. Drivers for hardware.
There are many good guides for driver installation. So will not try to invent wheel again. You should follow one of these:
Adafruid in English
Sarajarvi in Finnish

Step 3. HDSDR plugins (optional) 
This step is short one but necessary if you want to use HDSDR. Unzip downloaded plugin files to HDSDR softwares folder. To use ExIO_USRP you'll also need to install MicrosoftVisual C++ 2008 Redistributable Package (x86).

Step 4. Run SDR# and get ready to enter invisible highway of the radio frequencies as an inspector.
Below you can see basic view of SDR# with definitions for user interface.

SDR# view

There are only few initial settings. First select your receiver from source list. Then open configure window and select sampling rate and sampling mode. I have read that R820T+RTL2830U combination is cable to handle 2.8MSPS samplerate with out problems. You will notice effect of sample rate as an maximum bandwidth you could see in displays. Sampling mode in turn enables or disables direct sampling mode. Try selecting one of the two direct sampling modes if you want to tune to shortwaves (MF-HF). Use quadrature sampling for VHF-UHF.

SDR# configure

Now you can start receiving. My local radio stations are using wide frequency modulation in broadcasts so I had the modulation setting adjusted for WFM.

SDR# runnig. Local radio stations at VHF band

To listen shortwave broadcasts I changed sampling mode for direct sampling and modulation for AM. BBC's shortwave news read loud and clear. And if one is interested to listen Chinese music these SDRs are must to have :)

SDR# runnig. BBC shortwave news for west and central Africa

It is possible to enhance SDR# features by adding plugins.

Step 5. Get familiar with HDSDR.
If you installed both ExIO plugins the HDSDR will make you choose one or an another before starting main program. Just select your favorite dll from offered folder.

HDSDR interface is somewhat different than SDR#. In addition to RF spectrum and RF waterfall displays you also have audio spectrum analyze display (audio FFT) and audio waterfall. These are very useful when tuning in for example CW signal. 

HDSDR full view


HDSDR user interface

Again you have to make few initial setting before starting receiver. Click ExtIO configure to open RTL settings window. This is almost similar to SDR#'s equivalent so I won't bother to explain it again.

 ExtIO_RTL plugin configure for HDSDR (for shortwave)

Now you can start receiver.

I made short video to demonstrate how different kind of transmissions looks at waterfall display. Video is shot at midday so signals were not so clear as they had been at night. I will not get tangled with shortwave propagation as that is another story. I'm sorry for lousy voice in video. I should had it made with screen capture rather than phone.

Shortwave example video using HDSDR 


*** Forgive me those errors I have made in text and help me to fix them. Please leave comments with link to source if possible.***

sunnuntai 29. maaliskuuta 2015

Software defined radio 2/4. Antennas

One down from my RTL-SDR posting series and three to go. This post is a guide to build simple and cheap antennas for HF/VHF radio.

As I told in my previous post. RTL-SDR receiver I bought came with 28cm whip antenna. It is not a surprise that one can not get decent signal with that kind on antenna. Using it I could hardly hear local radio station at 90.000MHz. Signal was Ok as I touched the antenna to adjust it but after releasing my fingers there was lots of distortions and cracks in audio.

Original antenna

After initial tests I replaced small whip with 10 meters of 1.5mm2 copper wire and hang the element to the ceiling. This antenna was able to receive some strong Russian HF transmissions and local radio stations quite well. Few times I could also hear local airport traffic calls at 123.550MHz.

Switching between HF band and VHF band was a bit frustrating because I had to change the coaxial cable to different connector. Also these bands require very different kind of antennas and antenna end of existing coaxial did not made it possible to connect decent HF antenna. To patch this problem I ordered another coaxial cable. I found suitable cable from England using Ebay. Seven meter cable is longer, more robust and had necessary SMA male & N-male connectors.

7m coaxial cable with SMA-male and N-male connectors

Firstly I decided to build horizontal dipole to receive HF signals. I did not want to use money to buy balun for my antenna so I soldered two 20 meters 1.5mm2 wire elements directly to female N-connector and cover all joints with lots of hot glue.

You are right! One should consider antenna impedance and element lengths but this will do for now. I could fit total length of 40 meter antenna to my plot but no more. So I used all space I could. And luckily I was able to use chimney as route for coaxial as it was located near center of the plot. And for now I am only receiving so SWR is not so important.

As always. Fastening line is totally tangled

Horizontal dipole and coaxial connection

Then it was time to build VHF antenna. My kids were already sleeping that evening so using lathe, cutting sturdy pipes or welding was out of the question. I had to manufacture something really simple. I found from my shelves 20mm thick teflon puck with 45mm diameter and some 3.5mm diameter 1.2m long metal pipes. I also find tips for antenna construct from this site, but had no exact model in mind when I began putting this together. I used cordless drill to make five holes to puck. One to the center for coaxial cable, one straight up near center for element that is connected to center wire and three to bottom side in 45 degree angle for ground plane radials. Picture below is worth more than thousand words. I cut the four pipes to length of 80cm, used epoxy glue to attach them to holes, solder radial pipe ends together with coaxial cable shield, solder center wire to up pointing pipe and screw plastic clamp to one side of puck for antenna fastening. After epoxy was dry I ones again cover all joints with hot glue.

So why to use 80 centimeter elements? It was mostly coincidence. It fit out of the doors and was easy to carry :)  I checked optimal frequencies for my antenna only when I was writing this text. Full wave length 375MHz, half wave length 187MHz and quarter wave length 93Mhz. So actually it is quite perfect for me: quarter for local radio stations and half for AIS (162MHz).

 DIY VHF antenna with plastic clamp for fastening

Seven meter coaxial for horizontal dipole was perfect length but original three meter cable for VHF antenna was way too short. Here comes really good thing about SDR size. I fitted the whole radio to ventilation chimney to get it close enough to antenna. Only USB cable comes inside my house.

 How to locate RTL-SDR? Close to antennas of course

VHF antenna at roof

My "antenna field"

I should have bought two ten meter coaxial cables to be able to locate antennas farther from chimney and roof. But these antennas seems to work quite well. Maybe I will upgrade these some day.

Price for these antennas? Only thing i had to bought was another coaxial cable for 23€. Price for one female N-connector is 1€, clamp was 1€ few years ago in local hardware store and wire was bargain 300m for 30€ or something like that. HAM radios as hobby are cheap as dirt! If you want so.


*** Forgive me those errors I have made in text and help me to fix them. Please leave comments with link to source if possible.***

Software defined radio 1/4. The hardware

Have you ever considered why it has been predicted that in future radio frequencies will be more valuable than oil?
Even now there are ship loads of information on air, all the time. I wanted to grab some and see the "traffic jam". This guide will offer you a way to follow up my lead.

This is my first post in English. I'll use global language of English to offer guide also for others than Finns. Reason for this guide is that I was able to find many sites about RTL-SDR radios but most of the tutorials seemed lack some aspects for full system. This won't either be complete guide but I'll try to do my best ;)

I will post four chapters:
- 1. Hardware (R820T + RTL2830U)
- 2. Antennas (HF & VHF)
- 3. SDR software (SDR# & HDSDR)
- 4. AIS & ADSB

First of all. What is software defined radio? I'll let Wikipedia answer for that: SDR
Briefly: radio device is only used to receive / transmit RF and to do A/D or D/A converting as computer does all the decoding / encoding of the the signals.

My choose for software defined radio apparatus is the cheapest of them all. It has Rafael Micro R820T tuner chip + Realtek RTL2830U demodulator. Commonly this combination is called RTL-SDR. Good places to by one are Ebay and AliExpress. You can find this kind of receiver under 50€ including shipping but even cheaper option is to buy TV-dongle and make some modifications to it.

Mediatek chips R820T and RTL2830U were originally manufactured for digital television USB-dongles for computers. But some amateur radio operators find out that it is possible to use this hardware also as wideband receiver for other radio signals.

My receiver was advertised as being able to tune from 100KHz  to 1.7GHz. Package included: receiver, 3m (10´) coaxial cable, usb cable and aprox. 30cm (1´) long whip antenna  for "GSM" with magnet stand.

Receiver has SMA female connectors for HF and VHF (UV?) antennas and USB mini-B connector for computer connection. There is also one green led next to USB port to show if receiver is ON.

Receiver is very compact

Datasheets and many sites tells that R820T + RTL2830U combination is not able to tune below 20MHz. After testing my hardware, this seemed to be true. So why in earth is this device being sold as 100kHz to 1.7GHz? I was very keen to be able to receive HF (shortwave) transmission so this bothered me a lot.

I did not receive manual with the receiver and after awhile it became clear that there exist none. No paper manual nor online. So answers did not come that easy.

Neither was I able to find answers by googling. I did find some clues from internet that it is possible to get this hardware tuned below 20MHz by making hardware modification called "direct sampling mode" but it requires some soldering work and extra filters. Another possibility is to buy 75-100MHz upconverter. So I decide to dismantle the receiver to find out it's secrets.

After some hours of internet investigation and exploring the receivers circuit board I find out that Chinese manufacturer had made the direct sampling mode for this receiver all ready at factory. Hooray, no need to warm up the soldering iron or squander some 50€ for upconverter.

Original 1 foot antenna and circuit board 

Circuit board is build so that direct sampling modification is connected to HF connector and VHF connector to tuner chip. After figuring out the use of direct sample mode I found guide how to enable direct sampling in software. I will guide the setup for this in SDR-software post.


*** Forgive me those errors I have made in text and help me to fix them. Please leave comments with link to source if possible.***