Thursday 26 September 2013

$16 dual-channel coherent digital receiver

I have been playing around with the cool RTL dongles (more on rtl-sdr dongles on superkuh's web page or rtl-sdr.com) that you can buy on e-bay for about US$8 (including shipping). These are very capable 8-bit digital receivers that have up to 2.4 MHz bandwidth and can tune anywhere between 24 MHz and 1850 MHz.

I recently came up with a trivial hack to build a receiver with multiple coherent channels using the RTL dongles. I do this basically by unsoldering the quartz clock on the slave units and cable the clock from the master RTL dongle to the input of the buffer amplifier (Xtal_in) in the slave units (I've attached some pictures).

I originally drove the master crystal with both dongles, which also worked. However, Ian Buckley pointed out to me that a more typical way of doing this is feeding the signal into Xtal_In (in the pictures below). So I tried that too, and it also worked. I'm still not sure what the optimal setup is, as there is no schema for the dongle, but both methods I've tried so far have worked in practice.
This is how you make a dual coherent channel digital receiver with $16.  The clock drive probably won't be enough for many of these, but this can be fixed with a buffer or some other active splitter. 

The oscillator is wired using a piece of 75 Ohm antenna coax that came with the dongle. It's like they designed the dongle for  multi-channel coherent applications. 
This has some implications for low cost geophysical instruments. It will be possible to use this receiver for the 150/400 MHz beacon satellite receiver, as this only requires that the receivers have clocks that are locked with each other. Interferometry and passive radar are other application examples. With more than two locked channels, applications such as imaging start to become possible.

I've made some relative phase noise measurements, and the systems don't have detectable sample drift over two hours, and their relative phase is also pretty stable.

Spectrum at 1 Hz sample rate of the relative z_1/z_2 phase signal going into two receivers. 

IQ plot of the z_1/z_2 relative phase signal over ~6000 seconds at 1 Hz sample rate. 
And oh, by the way, I found this nice usb hub, which I'm going to use to hopefully get a 7 channel coherent rtl system.
Hub with the right usb port orientation for rtl dongles. 
Stay tuned for more results. I already have some pretty nice passive radar results using the system, which I'll be posting in a few days.

Update: Apparently three dongles will also run fine from one master clock. I know the clock isn't split correctly, but adding any components would increase the total cost and the whole point of this exercise is to determine what the lower bound is for software defined radios.

Three channel coherent RTLSDR receiver. 

21 comments:

  1. Replies
    1. Thanks. I was very happy that I tried this out. I am thinking about doing some more experiments in the future, but I've got so many other things on my plate now too.

      Delete
    2. I'm confused as why you are concerned by the fan-out of the oscillator. When you remove the crystal, you have access to two pin, XTAL_IN and XTAL_OUT. So, why not just daisy-chain the dongles. The first one is the Master, the second is fed at XTAL_IN, and XTAL_OUT fedd the third one,and so on.

      Delete
    3. The problem with daisy chaining are things like accumulating jitter and parasitic reactance which is amplified again and again in a daisy chain, a kind of distortion, like recording a recording, the undesirable properties of the Chip are handed to the next chip, and those then added again. Since these dongles are so cheap, it would take a very good Network Analyzer to determine the proper configuration to get the best performance. More expensive SDRs use Phased Locked Loops with self correcting 1PPS GPS Timebases to synch multiple Tuners. Sharing high frequency Timebase signals across the space of just a few inches is a fitful enterprise at best and not fun.
      You can find details of my Dongle Modifications here.
      http://radar.salsburg.com/index.php?p=/discussion/4/software-defined-radi

      Delete
  2. i like it !
    i tried 4 different USB hub with USB Sound + serial to USB + flash stick memory and work nice, but when i added RTL dongle, this don't start..
    you have luck with this :)

    ReplyDelete
    Replies
    1. I have managed to get this working on a hub and directly on a computer. However, there are two USB hubs that don't work for me.

      Delete
  3. Just wondering, how do synchronize the two USB data streams? I guess you need to invoke two separate USB transfers, with a random initial delay between them, and any lost samples thereafter will also change the relative delay in whole samples, of course). Do you inject a reference signal?

    ReplyDelete
    Replies
    1. I cross-correlate the FM radio signal. This gives me the correct sample delay, which is a good enough delay measure to do the passive radar. Luckily in this application, both antennas share a strong common signal.

      I have also tried injecting white noise (it is better, but requires fiddling around with cables, which I dislike). Luckily the ADCs stay sample accurately locked with each other (assuming no lost packets), so I only need to find one delay in the beginning.

      For another application that uses two different bands, I'm thinking about injecting a pulse or to blank the signal using a pin diode switch driver using a serial port signal.

      Delete
  4. Incredible!

    You won't be able to use 7 dongles on a single USB hub. The limit is 3 reliably working at the maximum sample rate and maybe 4 or 5 at lower sample rates. You can buy USB expansion cards for your computer which will have another controller, getting you another 3 (or more) dongles per card.

    ReplyDelete
    Replies
    1. I wonder how many USB hubs you could fit on a single computer?

      I hope somebody comes up with a thunderbolt or usb3 version of this dongle soon (with an external clocking option :)

      Delete
  5. Congratulations, Juha! I woud like to know more about this. The idea to have a radar with low cost is very excitant!!!

    ReplyDelete
    Replies
    1. Thanks. I'm writing a book for CRC Press ("Practical Software Defined Radar and Radio Remote Sensing") with an code and explanation on how to implement the passive radar. Unfortunately this chapter isn't yet even started, but I'll get there eventually.

      Delete
  6. Hello Juha!
    We all very impressed by your experiment and need a bit more information.
    Can we try to repeat it? What kind of software do you use and is it available?

    ReplyDelete
  7. Can you post your GRC setup for this?

    ReplyDelete
    Replies
    1. I'm not using GRC for this. I'm just dumping data to disk using a filesink and then processing that with the numpy and scipy libraries for Python. I'll post some example code at some point in the future when I get a chance.

      Delete
  8. Have you had any luck scaling this?

    ReplyDelete
  9. We're trying to replicate this setup, and we're not sure about the wiring. We know we're supposed to connect the two xtal_in, but what's happening with the second wiring. Thanks.

    ReplyDelete
  10. Just curious....other than passive radar what would this be used for? and why the need to remove the xtals?

    Thanks, mark kc9zhr

    ReplyDelete
    Replies
    1. Multiple Tuners must use the same Timebase.
      http://radar.salsburg.com/index.php?p=/discussion/4/software-defined-radio

      Delete
    2. Antennae Arrays require a set of Synchronized tuners, one for each Antenna to create a Beam-forming receiver. Radio Astronomy especially interferometry comes to mind, and Study of the upper Atmosphere.

      Delete
  11. Hello Juha!
    I am very impressed by your experiment and need a bit more information.
    Could i try to repeat it? What kind of software do you use and is it available?

    ReplyDelete

Note: only a member of this blog may post a comment.