tutorial on inexpensive sdr

Preview:

DESCRIPTION

a how to on inexpensive sdr

Citation preview

Inexpensive Software Defined Radio <$ SDR

David

AJ4TF

<$ SDR

• Basics

• SDR Concepts

• Softrock

– Construction

• Resources

Basics

• Caution: there are entire BOOKS on the subject of Software Defined Radio and Radio principles in general

• So, I won’t be able to teach the whole thing in 20 minutes

• This is not going to be a detailed lesson!

• However, I will give you some simple math to help illustrate

Basics

• Back to the past

• Superheterodyne concepts turned into practical reality by Edwin Armstrong in 1918.

Mixer, and a little bit of math • Multiply two AC signals (sine waves) together

• From trigonometry, multiplication of two sine functions:

• General expression for a sine wave of frequency f :

• Two sine waves at different frequencies f1 and f2, multiplied, and some algebraic manipulation:

• Now two sinusoidal frequencies, one at f1- f2 and one at f1 + f2

• If we filter the higher frequency, we end up with f1- f2

)cos(2

1)cos(

2

1)sin()sin( bababa

)2sin( ft

])(2cos[2

1])(2cos[

2

1)2sin()2sin( 212121 tfftfftftf

Simplified Radio

f1

f2

(f1- f2 ), (f1 + f2 ) (f1- f2 )

• If we want to tune, say, 14.000 MHz (f1), set the local oscillator to 13.545 MHz (f2), this gives an intermediate frequency of 455 kHz. This can then be mixed down again (demodulated) to generate an audio frequency.

Even more simplified Radio

f1

f2

(f1- f2 ), (f1 + f2 ) (f1- f2 )

• Advances in component quality and precision over the last 100 years allows more accurate oscillators and other components… why not mix the RF down in one stage? •14.000 MHz (f1), 13.997 MHz (f2), direct to audio frequency. • This is “direct conversion”

Quadrature Sample Detector

• Works much like a direct conversion receiver

• Also known as a “Tayloe detector” after the inventor

Quadrature Sample Detector

• Sample and hold: – When switch is closed, output tracks the input and charges up the

capacitor

– When switch is opened, the ouput is the voltage on the capacitor

Quadrature Sample Detector

• In the world of digital signal processing, the minimum sample rate at which you can completely recover the input signal is called the Nyquist rate, and it is 2 times the maximum input frequency.

• It can be shown that if the sample rate of the switch approaches the input frequency, mixing behavior will result, with the sample rate acting like a local oscillator

• For example, if the sample rate is 1000 Hz, the input is 1010 Hz, an output of 10 Hz will be seen

• If we sample above the input, say the input is 990 Hz, we will also see a 10 Hz output, but phase shifted 180°

• But, just by looking at the traces individually, it’s not obvious which one is which, since there isn’t a reference to compare to.

Quadrature Sample Detector

Quadrature Sample Detector

• If we now change our system to have two sample and hold circuits, which are phased apart in time by 90°, we’ll have two outputs.

• The output that is not shifted by 90° is called the “In-Phase” output

• The output that is shifted by 90° is called the “Quadrature” output.

90° phase shift

Quadrature Sample Detector

In phase

Quadrature

Quadrature Sample Detector

• By sampling the same input with both circuits, we can look at the relationship between the In phase (I) and Quadrature (Q) and determine if the input frequency is above the sample rate, or below it: – If the I leads Q by 90° we know the input frequency is less than

the sample rate

– If the I lags Q by 90° we know the input frequency is greater than the sample rate

Quadrature Sample Detector

I leads Q

I lags Q

Implementation

• In practice, it’s not too hard to implement a QSD with an appropriate oscillator, some digital logic to generate the I /Q sample rates, and some analog switches, filters, etc.

Software Defined Radio

• To put it simply, replace one or more of the blocks above with a computer program, processing the signal in the digital domain (Digital Signal Processing, or DSP)

• Today’s PCs generally have plenty of DSP horsepower to work in the amateur radio bands

Softrock <$ SDR

• One simple, inexpensive implementation of a QSD is called the “Softrock” series

• Designed and sold by Tony Parks, KB9YIG

• There are several varieties, ranging from a single frequency receiver, to a multiple band receiver / transmitter

• I’ll show details of the Ensemble RXTX, which is a multi-band transceiver (1 watt transmitter)

Power Supply

USB interface,

CW keyer

4X Local Oscillator

D Flip-Flops,

Divides Local Oscillator by 4

and generates I and Q sample

clocks

QSD receiver

(2 sample and holds)

TX encoder

(QSD in reverse) 1 watt power amp

Construction

Power Supply, USB interface,

and programmable oscillator

100 MHz

5 MHz

Construction

Construction

Software • Of course, this is the ‘brain’ of a software-defined radio

• I started out by using “Rocky”, which is a Windoze-based program

• There are plenty of others out there

• The software uses the sound card of the PC to digitize the mixed-down I / Q signals, and perform all demodulation in the digital domain

Software - Listening to WWV

10MHz carrier

USB LSB

1 minute tone

$$$

• Softrock Ensemble RX/TX kit: $89 – Receiver only kits cheaper… a single band receiver kit is just $21

• Enclosure (TenTec ) $10

• Software (Rocky 3.7) Free

• PC with sound card You probably already have this

http://kb9yig.com/ - Web site for ordering kits… but they sell out

fast. Best way to get a kit is to subscribe to the Yahoo group “softrock40”, availability of kits is announced there. http://groups.yahoo.com/group/softrock40/

Resources • http://groups.yahoo.com/group/softrock40/ (Yahoo group)

• http://www.wb5rvz.com/ (Softrock assembly instructions)

• http://www.dspguide.com/ Excellent FREE guide to digital signal processing

• http://www.arrl.org/dsp-digital-signal-processing DSP articles from ARRL (QEX)

• http://www.arrl.org/files/file/Technology/tis/info/pdf/020708qex013.pdf A series of articles by Gerald Youngblood, K5SDR, founder of Flex Radio.

• http://www.dspguru.com/sites/dspguru//files/QuadSignals.pdf Mathematical background for quadrature signal processing

Questions?

• Play videos…

Recommended