What is RTL-SDR direct sampling mode?

15,670 views
Skip to first unread message

KD9GN

unread,
Jul 15, 2012, 1:52:33 PM7/15/12
to ultra-c...@googlegroups.com
Hi Everyone,

I recently saw a video on YouTube which had the title RTL-SDR + SDR# in
direct sampling mode. The description reads as follows:

"RTL-SDR + SDR# in direct sampling mode and MixW32 decoding RTTY on 147
kHz. No downconverter plugged in. Wire is directly soldered to pin 1 of
RTL2832."

I don't have a data sheet for the RTL2832, what is PIN 1 for and where
would it go to?

Anyone seen this video or have any idea what they are doing?

73's
Dave - KD9GN

Adam Nielsen

unread,
Jul 15, 2012, 6:00:34 PM7/15/12
to ultra-c...@googlegroups.com
> "RTL-SDR + SDR# in direct sampling mode and MixW32 decoding RTTY on 147 kHz.
> No downconverter plugged in. Wire is directly soldered to pin 1 of RTL2832."
>
> I don't have a data sheet for the RTL2832, what is PIN 1 for and where would
> it go to?
>
> Anyone seen this video or have any idea what they are doing?

I'm quite interested in trying this out, but I haven't been able to get a
response from those involved. All I know about it is this commit to the main
rtl-sdr repository:

http://cgit.osmocom.org/cgit/rtl-sdr/commit/?h=steve-m/direct_sampling&id=4b49512fccbba68670f86942cc457be0c87d6871

It seems you just connect your antenna directly to pin 1 or 2. You must have
this experimental code running though, and I'm not sure whether any of the
released RTL drivers include it.

It seems to disable IQ (quadrature) mode, so I'm not entirely sure what that
means. Maybe you can't demodulate FM?

Cheers,
Adam.

KD9GN

unread,
Jul 15, 2012, 8:36:24 PM7/15/12
to ultra-c...@googlegroups.com
Thanks for the info, if I get another dongle, maybe I will try it. I
dont want to mess up the ones I have.

I would like to get an HF converter but not sure if any of them are
verified to work with anything other than the Fun Cube.

jdow

unread,
Jul 15, 2012, 10:30:11 PM7/15/12
to ultra-c...@googlegroups.com
On 2012/07/15 17:36, KD9GN wrote:
> On 07/15/2012 10:00 PM, Adam Nielsen wrote:
>>> "RTL-SDR + SDR# in direct sampling mode and MixW32 decoding RTTY on 147 kHz.
>>> No downconverter plugged in. Wire is directly soldered to pin 1 of RTL2832."
>>>
>>> I don't have a data sheet for the RTL2832, what is PIN 1 for and where would
>>> it go to?
>>>
>>> Anyone seen this video or have any idea what they are doing?
>>
>> I'm quite interested in trying this out, but I haven't been able to get a
>> response from those involved. All I know about it is this commit to the main
>> rtl-sdr repository:
>>
>> http://cgit.osmocom.org/cgit/rtl-sdr/commit/?h=steve-m/direct_sampling&id=4b49512fccbba68670f86942cc457be0c87d6871
>>
>>
>> It seems you just connect your antenna directly to pin 1 or 2. You must have
>> this experimental code running though, and I'm not sure whether any of the
>> released RTL drivers include it.
>>
>> It seems to disable IQ (quadrature) mode, so I'm not entirely sure what that
>> means. Maybe you can't demodulate FM?
>>
>> Cheers,
>> Adam.
>>
>
> Thanks for the info, if I get another dongle, maybe I will try it. I dont want
> to mess up the ones I have.

Actually I have one that would be idea. And I have a station that could
desolder the Elonics tuner that is mounted incorrectly. (It is twisted
about 5 degrees plus or minus from the proper orientation and is not
found by the RTL chip.) This has me thinking.... But without a converter
or tuned circuits ahead of the RTL chip it's going to be a low band or
AM broadcast tool. For hams it'd receive WWV on 2.5 MHz (poorly) and
could be used fairly well on 160 meters.

{^_^} Joanne, W6MKU

Adam Nielsen

unread,
Jul 15, 2012, 11:37:23 PM7/15/12
to ultra-c...@googlegroups.com
> Actually I have one that would be idea. And I have a station that could
> desolder the Elonics tuner that is mounted incorrectly. (It is twisted
> about 5 degrees plus or minus from the proper orientation and is not
> found by the RTL chip.) This has me thinking.... But without a converter
> or tuned circuits ahead of the RTL chip it's going to be a low band or
> AM broadcast tool. For hams it'd receive WWV on 2.5 MHz (poorly) and
> could be used fairly well on 160 meters.

Please excuse my ignorance (very new to RF) but why would you need a
tuned circuit before the RTL chip? In this mode, as far as I understand
it, pin 1 is used simply as an antenna, and the RTL chip tunes between
DC and 30MHz, picking up the usual 1-3MHz bandwidth at that frequency.

What is actually happening is that normally the E4000 brings the signal
down to zero-IF, and the RTL picks it up at zero-IF. But the RTL is
capable of using an IF up to 30MHz, so in this direct-sampling mode it's
actually the IF being changed in order to set the listening frequency.

So if the RTL chip is doing the tuning, would you need anything else
ahead of it?

Thanks,
Adam.

Robert Nickels

unread,
Jul 16, 2012, 12:26:37 AM7/16/12
to ultra-c...@googlegroups.com
Here's a link to the SDR#-RTL demo on 147khz using an antenna connected
directly to pin 1 of the RTL-2832:

http://www.youtube.com/watch?v=gmbqwgezg-g

This was based on an experimental branch of librtlsdr:
http://www.reddit.com/r/RTLSDR/comments/ujbzl/theres_an_experimental_branch_of_librtlsdr_that/

As you will see from the comments, there are many flaws in this
simplistic approach, but it shows the potential, other than for
experimentation, using an upconverter ahead of a DVB-T dongle will
produce far better results. HF signal levels are generally strong
enough that the problem isn't hearing them, but in hearing only the one
that is of interest. In the amateur radio world, SDR-based
transceivers and receivers still can't match the selectivity-related
performance of conventional RF designs using roofing filters, but the
gap is narrowing quickly.

Until the guys at Osmocom discovered the "Radio" mode of the RTL-2832
that provides raw I/Q sample output at 2 megasamples/sec, all low-cost
SDR hardware operated at soundcard rates -- an increase of more than 20x
for $20 is pretty incredible. It's frustrating that the datasheets are
not more readily available, but there will be future hardware with even
better capabilities -- based on discussions at Dayton I'm anticipating
FPGA-based solutions in the $100 range before long.

73, Bob W9RAN





jdow

unread,
Jul 16, 2012, 12:33:54 AM7/16/12
to ultra-c...@googlegroups.com
OK, perhaps I need to upgrade my understanding. As I understood it the
DVB-T dongles were two chips, a tuner and a sampler plus IR detector to
USB chip. Is the RTL chip itself actually tunable? And how is it tuned?

Presuming it is tunable rather than a baseband sampler one "obvious" way
to work it is a set of DBMs and phase shifters plus an LO to feed the
baseband I-Q samplers. Now, suppose the LO is at 2 MHz. What is to stop
reception of 6MHz, 10MHz, 14MHz, etc as well as 2MHz? You'd need a
tuner or a very linear mixer to avoid rampant spurious. In a DVB-T
configuration this may not be a significant problem. (Although I have
a suspicion the front ends have a bit of a spurious problem of the same
sort unless they use sine waves somehow for the mixers.)

Does anybody have a block diagram for the RealTek chip that can be shared?

{^_^} Joanne, W6MKU

jdow

unread,
Jul 16, 2012, 12:39:41 AM7/16/12
to ultra-c...@googlegroups.com
Bear in mind that the DVB-T dongles provide 8 bit samples. This sharply
restricts the real dynamic range over which the dongles are usable. There
might be a bit of a problem using it on busy HF frequencies during a
contest. It's mostly a learning tool and a "getting your feet wet" tool.
It's a Digital S-38B, sorta kinda. (Go ahead and look up that old
Hallicrafters series if you draw a blank on S-38. It's worth a quick scan.
They got a lot of people into ham radio on the cheap in the bad old days.
Erm, I had one, too. The step up to an NC-109 was a breath of fresh air!)

{^_-} Joanne, W6MKU

Bob R

unread,
Jul 16, 2012, 5:58:22 AM7/16/12
to ultra-c...@googlegroups.com
I'll repeat what I've heard with the full understanding of the macaw I'm emulating...the RTL ADC's are internally sampling pins 1 and 2 at 28.8Msps.  The samples are then digitally down-converted to the .25-3.2MHz slice of interest before shuttling it to the USB.  

I don't quite understand how we have access to the full 28.8MHz by feeding the raw RF to one of the two pins, as I thought it was the complex samples coming in from the tuner that let you nod to Mr Nyquist as you pass 14.4MHz...but all of this is so far above my head that it's pretty much magic anyway.

I do wonder if this couldn't be exploited to reduce the latency of re-tuning short hops, as it seems that setting different filters (?) is faster than slewing an oscillator up or down.

Adam Nielsen

unread,
Jul 16, 2012, 7:39:23 AM7/16/12
to ultra-c...@googlegroups.com
> I don't quite understand how we have access to the full 28.8MHz by feeding the
> raw RF to one of the two pins, as I thought it was the complex samples coming
> in from the tuner that let you nod to Mr Nyquist as you pass 14.4MHz...but all
> of this is so far above my head that it's pretty much magic anyway.

You don't have access to the full 28.8MHz. I'll try to explain it as best as
I understand it, so my apologies if I'm over simplifying it for you - maybe it
will also help someone else figure out how it works.

Normally, the E4000 tuner (or whatever tuner IC you have) selects a block of
frequencies up to 8MHz wide and downconverts them to baseband (zero-IF) before
passing them on to the RTL2832. So if you tune to 400MHz, 400-408MHz on the
airwaves gets passed to the RTL at 0-8MHz instead. The RTL then samples from
0-3MHz (assuming a 3MHz sample rate) and passes that block of data over to the
PC for processing.

Because the RTL2832 was designed to work with different tuner chips, and not
all of them can work with baseband/zero-IF like the E4000 can, the RTL has its
own tuner capable of going from baseband up to 30MHz. This means if you
didn't use the E4000 and had some other tuner IC that spat out its
downconverted signals at (for example) 10MHz instead, you could just tell the
RTL to use a 10MHz IF and there would be no problem getting signals from that
tuner - you, the user, would never know the difference.

What this direct sampling patch does is switch off the E4000 entirely so it's
not sending any signals at all to the RTL, and gets you to attach an antenna
to that signal line instead. The RTL then thinks it's getting a signal from
the E4000 tuner, but it's actually getting it direct from the airwaves instead.

This is similar to what you can do with a PC sound card to pick up signals
from 0-96kHz, however for the RTL it would mean if you used a 3.2MHz sample
rate, you'd only be able to pick up signals from 0Hz to 3.2MHz - no higher.

But since the RTL has this variable IF thing, you can adjust the IF from
baseband/0Hz all the way up to 30MHz, allowing you to receive anything in that
whole band. If you set the IF to 15MHz, it thinks it's listening to some
tuner IC outputting signals at 15MHz, but because you've stuck an antenna
where the tuner should be, you're actually listening to signals at 15MHz
direct from the air instead.

Perhaps another way of thinking about it is that the RTL2832 is an SDR capable
of receiving the 0-30MHz band only, and to extend that range they stuck an
E4000 downconverter on the front. All this patch does is disable that
downconverter and give you the original 0-30MHz range built in to the RTL itself.

Hopefully this makes it clear what's going on, and my apologies again if I've
over-simplified.

One thing that does come to mind is why they chose baseband to get the signals
between the E4000 and the RTL. I've read that there's quite a lot of noise
there, so I wonder whether you'd get less noise if you used a higher IF?
Assuming of course the E4000 supported it, which I seem to recall it did from
one of the marketing leaflets.

Cheers,
Adam.

jdow

unread,
Jul 16, 2012, 3:46:36 PM7/16/12
to ultra-c...@googlegroups.com
Ah, I'd like it nicer if it could even ignore the lack of presence of the
E4000 chip. Then my broken dongle could work. (The E4000 is physically
present, rotated about 5 degrees, and not seen at all by the RTL2832.)
Ideally it'd look for the E4000, if present operate normally. If not
drop to the direct sampling mode without bailing out presuming it can
find the RTL2832. Currently the standard rtlsdr.dll just throws up its
hands and says it can't do anything.

I suspect there are other people who may have had static destroy their
tuners. This would give their devices a limited second life.

{^_^} Joanne, W6MKU.

Adam Nielsen

unread,
Jul 16, 2012, 6:52:48 PM7/16/12
to ultra-c...@googlegroups.com
> Ah, I'd like it nicer if it could even ignore the lack of presence of the
> E4000 chip. Then my broken dongle could work. (The E4000 is physically
> present, rotated about 5 degrees, and not seen at all by the RTL2832.)
> Ideally it'd look for the E4000, if present operate normally. If not
> drop to the direct sampling mode without bailing out presuming it can
> find the RTL2832. Currently the standard rtlsdr.dll just throws up its
> hands and says it can't do anything.

If you have a look at the source repository, the latest commit appears to do
just that:

http://cgit.osmocom.org/cgit/rtl-sdr/log/?h=steve-m/direct_sampling

"[experimental] allow direct sampling even if no tuner was found"

Sounds like that's the one for you to experiment with :-)

Cheers,
Adam.

jdow

unread,
Jul 20, 2012, 10:57:55 AM7/20/12
to ultra-c...@googlegroups.com
When might this get folded into the Windows "RelWithDebInfo" package?
The extra AGC command is somewhat useful for getting more control over
the little beasties.

{^_^} Joanne, W6MKU

Bob R

unread,
Jul 20, 2012, 2:47:55 PM7/20/12
to ultra-c...@googlegroups.com
Thanks Adam, great explanation.

Seems you could work in a non-zero IF mode already, couldn't you?  Just tune the RTL to 10mhz or whatever and deduct that from the commands sent to the e4k.

Adam Nielsen

unread,
Jul 26, 2012, 8:42:39 AM7/26/12
to ultra-c...@googlegroups.com
> Seems you could work in a non-zero IF mode already, couldn't you? Just tune
> the RTL to 10mhz or whatever and deduct that from the commands sent to the e4k.

I don't think you'd even have to do that. If you set the E4000 to output its
signal on an IF of 10MHz and then set the RTL to read its input signal at
10MHz, then the rest of the tuning would work as per normal.

Unfortunately I don't have any way of reliably measuring noise and signal
levels so I wouldn't know if it makes any difference.

@Joanne: I'm not sure when the Osmocom team plan to integrate this into their
official release. I guess for the moment you have to compile it yourself.

Cheers,
Adam.

jdow

unread,
Jul 26, 2012, 8:46:15 AM7/26/12
to ultra-c...@googlegroups.com
Somebody needs to apply one each clue-bat to the fine folks at Osmocom. It's
well worth having it working correctly.

{^_^}

jdow

unread,
Jul 26, 2012, 8:47:22 AM7/26/12
to ultra-c...@googlegroups.com
By the way - I seem to have missed seeing the source for this change
anywhere. What did my aged mind skip over by mistake.

{^_^} Joanne W6Molly'sKinkyUndies

On 2012/07/26 05:42, Adam Nielsen wrote:

Adam Nielsen

unread,
Jul 26, 2012, 8:53:26 AM7/26/12
to ultra-c...@googlegroups.com
> By the way - I seem to have missed seeing the source for this change
> anywhere. What did my aged mind skip over by mistake.

It's in the Osmocom repository under the steve-m/direct_sampling branch:

http://cgit.osmocom.org/cgit/rtl-sdr/log/?h=steve-m/direct_sampling

That, and a couple of YouTube videos, is about all the info out there about this.

If you meant the AGC stuff then I don't know if it has made it in yet, I'm
only going by discussion on the Osmocom mailing list:

http://lists.osmocom.org/pipermail/osmocom-sdr/2012-July/000137.html

Cheers,
Adam.

Bob R

unread,
Jul 26, 2012, 12:54:27 PM7/26/12
to ultra-c...@googlegroups.com
The rtl AGC changes are in the librtlsdr master (I believe it's disabled by default but the tuner AGC is enabled) and should be available in the relwithdebinfo.zip file.

The direct sampling mods are still only in the branch that Adam linked below. It does not appear to have the AGC changes, however it's not terribly difficult to merge the direct sampling changes into the master branch.

jdow

unread,
Jul 26, 2012, 1:28:22 PM7/26/12
to ultra-c...@googlegroups.com
If I can get the silly thing to build with Visual Studio rather than
trying to install all that 'ix stuff on the Windows machine I can do
that. But - my understanding is that it's all wound up tight with
the 'ix world.

{^_^} Joanne, W6MKU
> <http://lists.osmocom.org/pipermail/osmocom-sdr/2012-July/000137.html>
>
> Cheers,
> Adam.
>
> --
> You received this message because you are subscribed to the Google Groups "Ultra
> Cheap SDR" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/ultra-cheap-sdr/-/cg74GUqfqRsJ.
> To post to this group, send email to ultra-c...@googlegroups.com.
> To unsubscribe from this group, send email to
> ultra-cheap-s...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/ultra-cheap-sdr?hl=en.

Bob R

unread,
Jul 27, 2012, 8:29:24 AM7/27/12
to ultra-c...@googlegroups.com
Install cmake (http://www.cmake.org/cmake/resources/software.html), grab the source, make 'build' directory under root, enter that directory and run 'cmake ../', it will generate a VS2010 project that compiles cleanly.

You may run into libusb/pthread/etc dependencies.  If you do, go to the base directory of the librtlsdr source in a dos window and run 'cmake-gui'.  It will provide a neat little UI that you can supply include directories to at the bottom.


> To post to this group, send email to ultra-cheap-sdr@googlegroups.com.
> To unsubscribe from this group, send email to

g0nbd

unread,
Aug 19, 2012, 3:23:36 PM8/19/12
to ultra-c...@googlegroups.com
ALL

What is the  latest situation  with  this  direct mode  for  LF/MF  use ??  this looks to  be  the  ideal  situation  for  LF band  usage  , not  having the  problem  of the  mixer oscillator  when  tuned to the  low end of the  band  . . .

are there any  details at to  what  pin to  connect  to  / drivers  etc to  load  .  one  question  how is the  frequency  is  set  ? on the  video  SDR#   has the frequency  of the  tune  point  displayed ?

running   windows-xp-pro 

Tnx -Graham
G0NBD
> To post to this group, send email to ultra-c...@googlegroups.com.
> To unsubscribe from this group, send email to

Adam Nielsen

unread,
Aug 19, 2012, 6:55:08 PM8/19/12
to ultra-c...@googlegroups.com
> What is the latest situation with this direct mode for LF/MF use ??
> this looks to be the ideal situation for LF band usage , not having
> the problem of the mixer oscillator when tuned to the low end of the
> band . . .

No change, as far as I'm aware. I don't think an rtlsdr.dll has been released
yet (for Windows) which supports this mode.

> are there any details at to what pin to connect to / drivers etc to
> load . one question how is the frequency is set ? on the video
> SDR# has the frequency of the tune point displayed ?

The only info we have (which does answer your questions) is the commit message
itself:

http://cgit.osmocom.org/cgit/rtl-sdr/commit/?h=steve-m/direct_sampling&id=ab37b1c52a495e024c6eb5ce3a1e4ceb237bfc82

Quote:

"This is highly experimental code for using the RTL2832 as a direct sampling
receiver. The mode is only enabled when the sample-rate 2.048 MS/s and a
center frequency < 30 MHz is used.

This mode disables the tuner, and by attaching a long wire to the In-phase ADC
input (pin 1 or 2 of the RTL2832, whereas pin 1 is at the molded dot) it is
possible to listen to shortwave radio stations. The coupling capacitors can be
left in place, but for better results they should be removed."

Cheers,
Adam.

g0nbd

unread,
Aug 20, 2012, 11:40:04 AM8/20/12
to ultra-c...@googlegroups.com
Thanks  for the  update Adam ,
 
Im running   win-xp-pro , so  its a  no-go  at the  moment  then :(  
 
however .. time to  visit the  wb  shop  for  dongel number  2
hopefully  windows  version  will  be out  soon(ish) 
 
qrg ...  With  windows  I dont have  access  to the  driver's  as  such  , see  that  with the  sample  rate  to   give  a  'carrier'  frequency  reading  
will  have to  wait  and  see  ...  
 
Once this  takes  hold , its  going to  be  very  popular with the  new  access  to the  477 KHz  band  for  all  and the  existing  136 KHz bands
the  harware soulutions  will  probably  be  double conversion  superhets  to  solve the  local  osc  'punch through' problem .:)  .
 
this  with a ..zero k > 500K  filter, to  remove the  MW  b/c   game  over  !
 
Thank's  All
 
Graham
G0NBD
Message has been deleted

V. Sears

unread,
Jun 6, 2019, 1:21:08 AM6/6/19
to Ultra Cheap SDR
Pins 1-2,  and 4-5 on some  allow you to bypass the R820T tuner and connect a non DC shorted long wire antenna. the RTL-SDR.com/ Blog v3 lets you tune lower than 500khz using direct sampling in Q-Branch instead of Quadrature sampling.  Iread its best to use a 9:1 unun  the direct solder method bypasses all static protection.
Reply all
Reply to author
Forward
0 new messages