Tag Archives: RTL SDR

USB RTL SDR 28.8 MHz Reference: VCXO

One of the shortcomings of the USB RTL SDR devices is the build-in oscillator. It is actually very stable and sufficient for all kinds of everyday uses, but I am using these SDR devices for narrowband applications, with down-converted microwave signals. So utmost frequency stability is a must.

Not only needs to frequency be stable, it is also a good idea lock all oscillators to a common reference, which typically is derived from a 10 MHz rubidium source (like in my lab), or a GPS-controlled VCXO.

How to get from 10 MHz to 28.8 MHz – well, not all that difficult, but needs quite a few parts. First, we need a circuit that can receive 10 Mhz signals, and clean them up and prepare them to be used by a PLL. Then, we need a VCXO (voltage controlled quarz oscillator) that can be tuned by the loop filter of the PLL to keep it at 28.8 MHz. The loop BW will be very very narrow, a few Hz at maximum. Comparator frequency can be up to 400 kHz, the largest common divider of 10000 and 28800; but I might select a value more like 100 kHz which can be readily derived from a 10 Mhz reference. There are plenty of programmable PLLs around, but I might just use a hardware solution here (only need to put together :288 and :100 dividers using some TTL logic).

The circuit-
rtl sdr 28-800 MHz ref pll

– nothing too fancy, and still needs some fine tuning. The xtal, it’s the original part de-soldered from the RTL SDR stick. These are actually pretty stable and well-behaved, at least for the devices I sourced from China.

The circuit employs a Pierce oscillator, build around a J310 FET. This is coupled into a common-bias amplifier, another J310, which provides the low output impedance. A matching network is added the make the circuit rather insensitive to changes in the load impedance. The circuits draws about 20 mA at 12 V. Not quite a power safer, hey, but this is not the objective here.

The items circled are just temporary parts, will need further optimization.

The big question – tuning range (pullability) of the xtal. Ideally, it should be a few 10s of ppm, to give the PLL some room to operate, and to account for aging effects over the years. Temperature-induced changes are on the order of a few ppm (see earlier post); but there is also drift, and other factors.

A quick test with some capacitors, and, stable oscillation can be found in a range of -1.8 to about 1.8 kHz around the 28.8 center frequency, this is quite satisfactory.

rtl sdr ref vcxo circuit

At the moment, still run with fixed capacitors, but I will add a varactor network to provide about 8 to 40 pF tuning capacity, by voltage input.
In an effort to keep phase noise down, I might employ a circuit used a lot for earlier projects, with anti-parallel varactor diodes.

rtl sdr ref 10 pf

rtl sdr ref 37 pF

The spectra look pretty clean, and the power is as expected, about -10..-6 dBm. I will use this output to drive the PLL, and add another amplifier to drive the RTL SDR R820T reference input – well shielded from everything else to avoid spurs from the divider and PLL circuits.

A quick test of the phase noise – hooked it up to a 3585A Spectrum Analyzer – there are some mains spurs, which will be reduced by adequate filtering once the circuit is fitted to a shielded box. Other than that, nothing really suspicious. All very close or at the noise floor of the 3585A.

10 pF sdr ref0

3585a noise floor

Micro-Tel MSR-904A Microwave Receiver: phase lock test, YIG driver bandwidth modification

Some final parts added to the MSR-904A digital interface/PLL: the actual PLL circuit (frontend), an Analog Devices ADF4157 fractional-N PLL, together with an ADF5002 8:1 prescaler. The phase detector is set at 1.25 MHz, to allow 10 MHz integer-only steps. Some experimentation with other phase detector frequencies might follow later.

Here – the schematic of the PLL frontend. The circit is wired point-to-point, sure enough, with VERY short wires, soldered using a microscoped – hope you have a steady hand. After a quick test (using the MUX output of the ADF4157), the wires and the very tiny ADF gadgets, all sealed with a few drops of epoxy.

msr pll adf5002 adf4157 schematic

On the main board, the PLL loop filter. Build around the remaining half of the already installed OPA2703 (other half used for the DAC output buffer).

msr pll loop filter

With all these parts now put together, to do some basic tests on the PLL – a Gigatronics 605 Microwave Synthesizer was connected to the MSR-904A input, and the LO sample output of the MSR-904A connected to PLL. A sample of the “LO sample” taken by a broadband -10 dB coupler is used to monitor the frequency, using an EIP 545A. The 10 MHz reference output of the EIP is used as the ADF4157 reference.

msr pll phase lock test setup
msr pll test setup 2

The MSR-904A down-converts the signal to a first 250 MHz IF (by fundamental LO), the 250 MHz IF is then mixed with 410 MHz (this can be locked to a 5 MHz signal – not locked at the moment, but the signal is very clean and stable anyway).

The 160 MHz 2nd IF is available at the rear panel, and connected to a R820T RTL SDR. This is a very handy method to monitor noise, and do some basic adjustments on the PLL. Using headphones – and the human ear as a phase noise meter… more quantitative analysis to follow.

Here, the transition from manually controlled CW mode, to PLL controlled mode.
msr-904a locked at 7250 mhz lo

A close-up:
msr-904a locked at 7250 mhz lo 2

For these tests, the LO was locked at 7.25 GHz, receiving a signal at 7.0 GHz (SDR offset set to about 160 MHz).

Note – same as for the Micro-Tel 1295, and the SG-811 – the YIG driver has a bandwidth limit (by a 100 uF Tantalum capacitor – and a 499 k resistor!) that is controlled by a reed relais on the YIG driver. This doesn’t allow low phase noise operation, even with the best PLL. Well, 100 uF is a bit too much. Therefore, a 100 n capacitor was added – this is enough to suppress most of the noise of the YIG driver stage, and still the circuit remains fast enough for full band sweeps at moderate scan rates. Might modify this later, by adding a bit of logic that adds the 100 n capacitor only when the external frequency control is active, but disconnects it during full band sweep, etc.
msr-904a YIG driver board

The 0 to 40 GHz SDR: Micro-Tel 1295+R820T USB RTL SDR

Having repaired two Micro-Tel 1295 microwave receivers recently, I noticed a IF (intermediate frequency) test port – this as a sample of the 30 MHz IF signal, from fundamental mixing of the input with the LO, for 0-18 GHz. Using 2nd and 3rd harmonics, and external mixers, the full range up to 40 GHz can be covered.

micro-tel 1295 if port

The 1295, despite its sensitivity, is actually not build for reception of real-world signal – it is an IF subsititution attentuation measurement receiver. However, this doesn’t mean it can’t be use to receive GHz signals… Recently I have been working on a 2-20 GHz digitally controlled preselector, and adding this to the 1295 will already help to get pretty much excellent selectivity.

0-40 GHz rtl-sdr using a Micro-Tel 1295

Now, a quick test: the IF test port, which is normally terminated in 50 Ohms, needs to be connected to the RTL USB SDR. To avoid overload of the RTL SDR by mirror signals, a little Micro-Circuit PBP-30+ filter was added, the silvery can, on the ESD foam, on top of the receiver.

pbp-30+ elliptical bandpass filter

This filter has a 6 MHz passband, 10 MHz 3 dB bandwidth – plenty for the USB SDR. Using a test signal at 11.02 GHz, with neither the receiver nor the source phase-locked, this is the result:

sdr at 11.02 GHz

Divisions are 100 kHz, so there is a bit of drift. But keep in mind: 0.1 MHz for 10000 MHz, that’s just about 10 ppm! – and a PLL will be added to the 1295 anyway.

After all, maybe a good idea to build a little 2-20 GHz downconverter, using a YIG pre-selector (currenty being developed anyway), a mixer and a LO (possibly using harmonic mixing). Stay tuned!

R820T, RTL2832U SDR USB stick: some more findings about temperature sensitivity.

Another hack you can do with the SDR USB sticks – mount the clock crystal (28.8 MHz) remotely, feed a stable RF signal at any frequency you desire, and use it a as a thermometer. This will work great at room temperature and up to about 50 deg C, but beware, the ready will be ambiguous at higher temperatures. Here is a quick experiment:

Signal was supplied at 1000 MHz, from a virtually perfectly stable source. At some point, the crystal was touched with a finger (making sure not to touch any of the traces or components, as this could capacitively affect the oscillator). Surprisingly, the frequency first goes down (-0.6 ppm), and then up (+2.5 ppm).
temp effect (hot to cold to hot) ppm

Why is this so surprising – let’s have a quick look at typical crystal oscillators, there are several types, AT-type (most common), SC-type, and closely related IT-type, and others, less common. Nearly exclusively have I come across AT-type so far, for all kinds of cheap clock application. AT type means: inversion point at room temperature, then the frequency decreases a bit with temperature, to about 60 degrees C, then it increases again. See the black curve in this diagram (note that the absolute values are just typical, arbitrary, and change with cut angle tolerance):
r820t quartz ref osc temp dependence
Red line shows the typical characteristics of a SC (or IT)-cut crystal.

Rather than the expected AT-typical transition through a minimum frequency, when going from about 60-70 deg C, down to 35 deg C (body temperature), we observe just the opposite behavior (more like SC-type) – reference frequency goes through a maximum (which is a minimum of the shown signal frequency, if the signal is a constant 1000 MHz).

So it seems, the manufacturer did actually consider a relatively high operating temperature of this device when selecting the crystal, which is running at about 60 degrees – just the rough temperature of the board/crystal.
An AT-type would have been much counter-productive, because this is optimized for constant frequency over a broad range of temperatures, say, -10 to 60 deg C. However, for the SDR USB stick, the temperature related frequency change should be minimal at and around the hot operating condition of the board – I don’t think this is just coincidence, but somebody acutally put some thought into getting a device frequency stable, without any ovens or other compensation devices.

R820T, RTL2832U SDR USB stick: gain accuracy tests

The R820T has the nice feature of a build in pre-amplifier, 0 dB to 49.6 dB nominal gain. Now, the question is, with all the nominal values, what is the acutal gain, and how does this change with frequency?

With the established setup, the frequency-stabilized SDR USB stick (28.8 MHz supplied by a HPAK 8662A, at 500 mV level), and the 8642B source, the gain of the R820T was set to the various values, step by step, and the RF input level varied to keep the SDRSharp FFT peak level at exactly -25 dB. The -25 dB reading can be taken to about +-0.2 dB, when looking at the FFT display.
The test was carried out at two frequencies, namely, 141 MHz and 1000 MHz. Don’t do such evaluation anywhere close to multiples of 28.8 MHz – there are some reference-related spurs that can affect the accuracy.

First, the RF input power needed to get a -25 dB reading:
r820t rf input power at -25 dB vs nominal gain
Interestingly, at 0 dB gain, a bit more power is needed at 141 MHz to get -25 dB, which means, the R820T is a little bit less sensitive at 141 MHz than it is at 1000 MHz, but only at the 0 dB gain setting. At higher gains, the data are more or less superimposed.

Note also that the 43.9 dB and 44.5 dB gain settings have actually identical gain! No idea why.

r820t acutal gain vs nominal gain
These are the acutal gains, calculated from above data, vs. the nominal gain. Pretty linear, but clearly some positive deviation at the low gains.

The full dataset:
r820t rtl2832u sdr usb gain check

This is even more clearly visible in the deviation plot:
r820t gain error vs nominal gain

Accordingly, the preamp provides a bit more gain at lower frequencies, say, 141 MHz, especially when set to high gain, above 35 dB nominal. Below 35 dB, gains for 141 and 1000 MHz are virtually identical.

If you have a SDR USB stick of a different type, and want to have some gains-levels etc measured, just let me know! I might be interested.

R820T, RTL2832U: narrow-range linearity

Some more linearity tests, now over a narrow range, with a precisely linear and calibrated source, measured at 1000 MHz, otherwise all the same is in the earlier post.

These tests were done at a 0 dB gain setting, and the input power was varied in 1 dBm steps.
r820t gain linearity (narrow range)

r820t linearity deviation (narrow range)
The results speak for themselves – the SDR USB stick is pretty accurate, if you want to do a relative comparison of power levels over a range of 10 dB or so. Accuracy might be in the range of +-0.5 dB, or better, provided that the slope has been determined for a given gain setting (don’t change the gain settings, if you need to do accurate measurements). If you want to measure insertion loss, the best way would be to vary the source power in calibrated steps (by a 1 dB high precision attenuator), and just use the SDR USB at a constant dB reading, over a narrow range of +-1 dB, then your measurement error will be limited to virtually the precision attentuator error only. For such tests, it is always good practice to have a 6 dB or 10 dB attenuator at the SDR USB input, to avoid artifacts caused by the non-negligible return loss (SWR) of the SDR USB stick input.

An open item – to go further, one would need to check linearity at various frequencies of interest, etc., but this is all beyond the scope of the SDR USB stick – if it comes to below 0.5 dB accuracy, that’s something better done in a cal lab anyway, nothing that is necessary too frequently out in the field.
For comparison, with a high precision dedicated level measurement receiver (like the Micro-Tel 1295), achievable relative level accuracy (not linearity) over 10 dB is about 0.03-0.05 dB – over a much wider frequency range. Also note that most commonly available spectrum analyzers (Rigol, etc.) aren’t all that linear, see their specs.

R820T, RTL2832U SDR USB stick: using it as a “poor man’s” spectrum analyzer – level linearity, level accuracy

There are some good reasons to always carry one of the SDR USB sticks around – it’s a great little spectrum analyzer. But hold, what does it have in common with the purpose build-professional analyzers selling for USD 1k or more? It certainly has one particular advantage, the SDR USB stick is very small, a mere 10 gramms, and only needs about 1 Watt of power. And it covers the full span of frequencies of general interest (at least is you add an upconverter, for low frequency and HF stuff below 24 MHz).

Well, what are some key requirements of a good spectrum analyzer?

(1) No spurs, at least no unpredictable ones. Well, there are spurs, but mainly multiples of 28.8 MHz (reference), and some spures related to the sampling frequencies (always check if the spur changes, by checking out several sample rates that are not multiples of each other)

(2) Intermodulation distortion. More complicated, will be analyzed later.

(3) Low input return loss (otherwise, amplitudes will be inaccurate). Will be measured later, the VNA rests back home in Germany. But this limitation can be easily overcome by putting a 6 dB attenuator in front of the SDR USB.

(4) Frequency accuracy – this is not great, but stable within a few ppm. If you want to add a precision reference, see earlier post.

(5) Amplitude accuracy – it needs to be very linear (i.e., a 1 dB step in signal strength must convert to a 1 dB step on the readout, same for 10 dB steps, etc.), and this should not very too much with frequency. Absolute amplitude accuracy (i.e., if 1 dBm is fed into the RF input, it needs to read 1 dBm power) – not applicable to the SDR USB stick, it only shows power in nominal, un-calibrated dB.

Well, let’s tackle item 5, and work out some absolute calibration.

The R820T tuner of the SDR USB stick under consideration here has a build-in preamp. This has nominal gains from 0 dB, to 49.6 dB. Some gain curves have been reported for other SDR USB sticks elsewhere, let’s do some in-depth analysis.

How to get this measured properly? The setup and method:
With 1.024 MSPS, 65536 FFT bins, RF frequency of 1000 MHz (HPAK 8642B), reference at 28.80 MHz – 500 mV (provided by an HPAK 8662A) and gains set to values of 0 dB, 20.7 dB (about mid-range), and 49.6 dB (max gain), the input RF power (which is calibrated in absolute dBm, and fed to the SDR USB stick by a low-loss cable) is varied in 10 dB steps, and the dB reading taken from the SDRSharp FFT spectrum display. Note that fully accurate reading of the dBs is only possible if the frequencies (reference and signal) are dead-stable, otherwise everything will be drifting up and down, and the FFT bins won’t be in the same place all the time.

Here are the results:
r820t db output vs rf power input at various gains
Everthing is quite linear (a good fit with just a line), but you notice, the slope of the lines change a bit, depending on the gain setting. In other words, a 1 dBm chain will not always result in an exactly 1 dB change on the SDSSharp display, at high gain setting, it will almost fit, at 0 dB, there is only about 0.93 dB change (readout) for every 1 dBm power change at the input. Well, over 40 dB, that’s an error of about 3 dB, not much, but more than desirable.
r820t level accuracy

After some more measurements, at 38.6 dB nominal gain, it relationship of level slope vs. gain seems pretty clear, at least at 1000 MHz.
r820t linearity (slope) vs nominal gain

After applying the slope correction (comparing a linear fit, with the acutal measured data), these are the residuals:
r820t linearity deviation (wide range)
Less than 1 dB – that’s within the measurement error of the calibration apparatus!

Next interesting item for practical use, the RF input power needed to get a 0 dB reading – the absolute power calibration for this SDR USB stick. This seems to vary from stick to stick only by 2-3 dB, but I don’t have a big set of sticks, multiple lots etc. – so this might be shifted depending on the exact device you are using, but trends should be the same, for all R820T sticks.
r820t 0db equivalent rf input power vs gain
According to this diagram, for any measurements above -40 dBm, you need a good set of attenuators, to bring the signal level down. In fact, the SDR USB might actually make a very decent subtitution type attenuation test receiver, if you put it in line with a precision attenuator, and only use a few dBs of span of the SDR USB (well-calibrated) to determine the signal levels. I checked quickly for drift of the level calibation vs. R820T temperature – there doesn’t seem to be any strong effect, which is a good sign that there is no need to re-calibrate the levels all the time.

R820T, RTL2832U SDR USB stick – sensitivity, dynamic range

After looking around in the web, there doesn’t seem to be a whole lot of information out there on the sensitivity and dynamic range of the SDR USB devices, at least not for the type I’m using here. Even the R820T datasheet isn’t all that clear – there are various versions of the R820T, also using different clock frequencies, with 28.8 MHz, being the most popular lately.

Therefore, time for some measurements.

The setup:

(1) HPAK (formerly HP, then Agilent, now Keysight) 8662A Signal Generator as the reference source, 28.800 MHz, 500 mV level.

(2) HPAK 8642B Signal Generator as the test signal source. This has a calibrated output from -140 dBm to +20 dBm, and very clean and free of spurs, and provides up to 2.1 GHz.
Absolute amplitude accuracy is about 1 dB, linearity is considerably better. As it says on the instrument cover – 70 pounds, “two person lift”.
The 8642B is phase locked to the 8662A clock, via a common 10 MHz reference signal. So even with drift, there can’t be any frequency errors getting into the way of our precision testing.

(3) Some well-shielded test cables, RG223/U, and adapters to link to the MCX connector (use a good test cable, but not your best – most of the SMA to MCX connectors aren’t all that precise, and may damage precision SMA connectors).

(4) The modified SDR USB stick, see earlier post.
r820t rtl2832u sdr usb dut

(5) Laptop PC, running SDRSharp. 1.024 MSPS, all automatic gain and frequency adjustments disabled, I/Q correction enabled.

r820t rtl2832u sdr usb test setup

First, the sensitivity check. Tuned the SDR USB to various frequencies, and measured the input power (dBm needed to get a -40 dB reading, at max gain of the SDR USB – 49.6 dB nominal), this is about 15 dB above the noise floor, and still a signal level that is very stable and can be accurately measured. Afterwards, set gain to 0 dB, and increased RF input power until 0 dB reading was obtained – this is the maximum power that can be reasonably fed to the SDR USB (no damage will occur up to +10 dBm; and even +20 dBm doesn’t seem to do much, at least not if only applied for a short time).

Power levels for -40 dB reading at max gain, and 0 dB reading at 0 dB gain:
r820t input sensitivity and max power
Sensitivity is quite constant over a pretty large range, up to 1500 MHz, no problem. Lowest frequency the thing can handle is about 24 Mhz (doesn’t tune any lower). Note that there are some spurious signals present around 28.8 MHz, (internal) ref clock leakage, and its 2nd harmonic.
R820T usb sdr dynamic range and sensitivity

The RF input power (about -130 dBm) to get -40 dB amplitude, at max gain of the SDR USB, this is quite remarkable, and still about 15 dB above the noise floor. So the R820T exhibits very high sensitivity, no doubt.
Here is an estimation of the dynamic range – “useful” because, it is still has some margin for noise. For the full dynamic range, add about 15 dB.
r820t sdr usb dynamic range
About 93 dB (108 dB full range, from noise floor, at 49.6 dB gain, to 0 dB at 0 dB gain).

R820T, RTL2832U: SDR USB stick hack – clean and stable reference!

One of the shortcomings of these handy and cheap SDR USB sticks is the offset of the reference, and the drift. First, lets see what we have: in the meantime, I have two more or these little units to play around, and all have about 70-100 ppm offset, positive.
The reference is derived from a small 28.8 MHz crystal, and while such crystals are pretty much suitable for clock generation, they do drift with temperature, and the SDR USB stick is getting hot during use… Quick look inside (case can be easily opened, no damage):

r820t sdr usb stick opened
The small silvery metal can is the crystal. Any temperature change will cause this to slightly change frequency.

So, what about the crystal drift? Easy enough, just hooked up one of the sticks to a counter (with stable timebase; you need to use high impedance probe, otherwise, proble will pull the crystal frequency), and logged the frequency values for an hour, after “cold” startup (stick with no case).
The result:
r820t ref clock drift
1 to 2 ppm, that’s not all that bad! Still, in the world of precision oscillators, it’s ridiculously drifting. So for any precise characterization of the SDR USB device, we need to get this under control. Some have tried to replace the crystal by a TCXO, but even with this, it will be challenging to break the 1 ppm (1 kHz at 1 GHz!) mark.

A quick look at the datasheets reveals that pins 8 and 9 of the R820T are the input/output of the xtal drive circuit, and pin 10 forward the clock signal to the RTL2832U, to safe some parts, and cost.

That’s how the oscillator output looks like, probed at pin 9, with a 10 Meg probe (0.5 V/div, 10 ns/div)
r820t ref clock signal 0.5 v-divy 10 ns-divx
The signal, amplitude is about 1.5 Vpp, with a DC bias of 1.2 V.

Therefore, if we want to substitute the crystal, we have to feed a few dBms of power at 28.8 MHz into pin 8, and leave pin 9 unconnected. The feed line (50 Ohms) requires some adequate termination. We also need to provide a DC block, with a little coupling capacitor.
That’s the little hack:
r820t sdr usb ref clock hack
A SMC connector, terminated with 82 Ohm (which will be in parallel with the impedance of the R820T, hopefully giving about 50 Ohm, or close enough), and with 0805 10 nF capacitor, connected to pin 8 of the R820T.

As for the new reference source – nothing less than a HPAK 8662A, which is a real marvel of engineering and one of the best sources I can suggest for any tests that require low phase noise close to the carrier. It is stable to better than 0.0005 ppm, per day – compare this to the 1 ppm, per hour…..
Sure, not the mention – the 8662a carries 80 pounds of electronics, a big fan, and uses about 300 Watts of power to keep things clean.

The new clock source for the SDR USB stick:
r820t new clock source 8662a

The reference level needed to drive to R820T oscillator – just by trial and error, things start to work at about 400 mV, and up to 1 V of signal doesn’t seem to change anything. So I set the level to 500 mV into 50 Ohm, and this seems to work well.

Interestingly, the R820 T seems to work from about 28.75 to 28.85 MHz reference, with no change in performance (at least nothing obvious), except, of course, for the frequency shift. At frequencies below about 28.72, and above 28.89, the stick crashes-no more data comming.

Some tests: 28.800 MHz reference, 1 GHz signal (note the small frequency shift, which is related to SDRSharp software, not to any hardware offsets)
28800

28.75 MHz reference – still 1 GHz signal
28750

28.85 MHz reference – still 1 GHz signal
28850

Checking the math, this all makes sense – for 28.75 MHz, a reading of 1001.739 MHz would be expected, and 998.267, for the 28.85 MHz reference.

Clear skies!

Look at that!

20140825_130913

Just received some imagery from NOAA-19. Not perfect, but good enough for now. Clear skies above (yellow cross, that’s where I am). Just looked out of the window, confirmed!

WXtoIMG – that’s the software that you might want to give a try, to convert the NOAA sounds into something more useful.
SDRSharp – set to W-FM, 40 kHz bandwidth.

It’s just amazing – earlier on, you would need to open up a receiver, do a little mod, etc., to change the bandwidth – unless you had dedicated equipment. Nowadays, just a software setting! Still, I am thinking about getting a good old analog pre-selector into the RF signal chain, prior to the magic USB stick.