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. 

18 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 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
    2. This may be an interim solution...
      http://ca.startech.com/Cards-Adapters/Laptop-docking-stations/Thunderbolt-Laptop-Docking-Station~TBDOCKHDPBC

      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. This comment has been removed by the author.

    ReplyDelete
  9. To make a long story short, you may hack the Dongles to achieve high dynamic range from the Dongle's Tuner. Since you hacked the Timebase to sync the 2 Dongles, go to the next level; attach a good Audio Card's inputs directly to the Dongle Tuner's output, bypassing the RTL digitizer chip's low resolution. This will provide 192 k (or 96 k) samples per second with 24 bit dynamic range.

    ReplyDelete
  10. Another observation; many FM Stations broadcast 2 Digital Sidebands for High Resolution Audio and more content streams. It may be possible to overcome the problems with pauses in the modulation causing correlation inconsistencies, with focusing the tuners on the Digital modulation and not the FM modulation.

    ReplyDelete
  11. Could you please list any parts you removed other than the XTAL? It is difficult to tell if you removed others from the photo. Thanks.

    ReplyDelete