Direct sampling HF with rtl2832 (!)

606 views
Skip to first unread message

Bob R

unread,
May 30, 2012, 6:44:09 AM5/30/12
to ultra-c...@googlegroups.com
Hi folks,

I was just perusing the rtl-sdr git repository and noted this branch:


In it, Steve M. left this note:

[experimental] enable direct sampling for frequencies < 30 MHzsteve-m/direct_sampling

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.

Signed-off-by: Steve Markgraf 

Has anyone tried this yet?  Is it as simple as soldering in a jumper from the antenna to 'pin 1 or 2'?


Ton Machielsen

unread,
May 30, 2012, 7:09:21 AM5/30/12
to ultra-c...@googlegroups.com
Now it gets interesting!!!



--
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/-/j7HAHLmQOZ0J.
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.

henry zuckerman

unread,
May 30, 2012, 7:20:50 AM5/30/12
to ultra-c...@googlegroups.com
I don't know if you have looked inside one of these dongles - the pins on both the e4000 & rtl2832 are quite small & closely spaced.  You'd better have a steady handy for this soldering job!  Nevertheless - very intriguing possibility for additional SDR goodness. 

Adam Nielsen

unread,
May 30, 2012, 7:32:31 AM5/30/12
to ultra-c...@googlegroups.com
> I don't know if you have looked inside one of these dongles - the pins on both
> the e4000 & rtl2832 are quite small & closely spaced. You'd better have a
> steady handy for this soldering job! Nevertheless - very intriguing
> possibility for additional SDR goodness.

There might be something else connected to that pin you could solder your
antenna onto instead - maybe the coupling capacitor mentioned in the commit note.

If the RTL device is set to 2MHz sample rate though, it would seem it would
only get you listening to broadcasts between 0Hz and 2MHz. Not sure why the
commit message says this mode becomes active when you tune under 30MHz then,
you would think it would only need to activate when tuned to 0Hz!

Cheers,
Adam.

Laurent Haas

unread,
May 30, 2012, 12:57:39 PM5/30/12
to ultra-c...@googlegroups.com
Hi


On Wednesday, May 30, 2012 1:32:31 PM UTC+2, Adam Nielsen wrote:
 
If the RTL device is set to 2MHz sample rate though, it would seem it would
only get you listening to broadcasts between 0Hz and 2MHz.  Not sure why the
commit message says this mode becomes active when you tune under 30MHz then,
you would think it would only need to activate when tuned to 0Hz!

Actually, the code of this fork modifies the way the RTL demodulator works (not Zero-IF anymore).

OTOH, only one ADC seems to be used, instead of two (quadrature).

Wait and see ;-)

 

Guido

unread,
May 30, 2012, 4:16:22 PM5/30/12
to ultra-c...@googlegroups.com
Hello Adam,

Yes, it is sampling at 2MSPS with one ADC instead of two, but looking in the code patches it seems that the IF frequency of the RTL2832 can be set anywhere below 30MHz. This is remarkable as Realtek specifies:Supports multiple IF frequencies (4.57MHz or 36.167MHz) and spectrum inversion.
I am thinking of the following improvements:
  1. disabling the tuner (think currently it is still enabled in direct sampling mode), and 
  2. program a steep narrow band FIR filter to attenuate strong out of IF band broadcast stations.

Anyone tried the code yet?

73, Guido

+ if ((freq < 30000000) && (dev->cached_rate == 2048000)) {
+ if (!dev->en_direct_sampling) {
+ rtlsdr_init_direct_sampling(dev, 1);
+
+ /* for some reason the output rate is different
+ * when using only one ADC, setting 2310000 results
+ * in almost exactly 2048000 samples/second */
+ rtlsdr_set_sample_rate(dev, 2310000);
+ dev->en_direct_sampling = 1;
+ fprintf(stderr, "Enabled direct sampling mode\n");
+
+ if (dev->tuner && dev->tuner->exit) {
+ rtlsdr_set_i2c_repeater(dev, 1);
+ r = dev->tuner->exit(dev); /* deinitialize tuner */
+ rtlsdr_set_i2c_repeater(dev, 0);
+ }
+ }
+
+ if_freq = ((freq * TWO_POW(22)) / dev->rtl_xtal) * (-1);

Adam Nielsen

unread,
May 30, 2012, 5:33:19 PM5/30/12
to ultra-c...@googlegroups.com
> Yes, it is sampling at 2MSPS with one ADC instead of two, but looking in the
> code patches it seems that the IF frequency of the RTL2832 can be set anywhere
> below 30MHz. This is remarkable as Realtek specifies:Supports multiple IF
> frequencies (4.57MHz or 36.167MHz) and spectrum inversion.

Interesting. I think the E4000 supports non-zero IF as well. I wonder
whether changing this and using a higher IF (for normal reception) might help
reduce the noise?

Cheers,
Adam.

imo

unread,
May 31, 2012, 2:38:25 AM5/31/12
to ultra-c...@googlegroups.com
Yes you can place an IF filter between e4k and realtek then - ie. 10.7MHz one (~150kHz wide bandpass) or narrower when required :)
i.
Reply all
Reply to author
Forward
0 new messages