多个RTL2832同步的可行性?
zx-165332017/07/01无线电 IP:广东

RTL2832作为成本最低的SDR接收设备,要是能够互相同步工作就可以开发出很多玩法,例如可以做成干涉式测向机或者MIMO多天线接收机之类的东西。RTL电视棒成本便宜,按照淘宝上50一个的价格组个有十几个单元的阵列也比一台HackRF便宜。于是上网查找到了如下的一些资料:

  • RTL2832这个芯片没有公开的datasheet,RTL-SDR库的作者是对官方库进行逆向工程弄出RTL-SDR的。。 作者还透露了其他的一些信息:
<code>Well, Realtek developed the driver themselves, so I'm pretty sure they just used their internal documentation that will probably never leave Realtek. The datasheet I've seen is more aimed at the people doing the layout of such DVB-T sticks, like pinout, power requirements etc. Some registers and the general USB commands are described as well, but that's about it.

(1) The USB interface is on-chip. The RTL2832U contains an 8051 core which handles the USB control side of things, like enumeration, I2C transfers, IR receiver, and a hardware FIFO which handles the bulk transfers. So the 8051 never sees the actual samples.

(2) Yes. In fact, the demodulator is a sub-chip on the die of the RTL2832U, and its registers are exposed via I2C. This I2C bus is shared, you can enable a repeater so that the tuner is 'attached' to the bus. Since you may need to communicate with the demodulator while receiving, you don't want to have the I2C activity leaking into the tuner as noise.

(3) Well, the point of librtlsdr is abstracting the whole dongle so it can be used with little to no knowledge of its inner workings. But all code in the tuner_*-files accesses the tuner, everything in librtlsdr.c accesses the RTL2832U + demod subchip. There is one exception, for the detection of the tuner we access it directly from librtlsdr.c.

(4) There is more to it. First of all, it depends if you use a zero-IF tuner like the E4000 or a low-IF tuner like the R820T. In the first case, both I and Q ADCs are used, in the second case only one of them is used. The ADCs sample the signal with a fixed rate of 28.8 MHz, which is then passed through a DDC (digital downconverter), a lowpass-filter and into a resampler (which then downsamples to our desired samplerate, 3.2 MHz at max.). The DDC only comes to play for low-IF tuners or the direct sampling mod, and it shifts and filters out the desired part of the spectrum, generating I/Q samples from real samples.

(5) You can look up quite a few registers in the Linux kernel driver I mentioned, but some things were figured out by playing around with it. I tried setting almost every bit in every register and see what happens. Most interesting things (like the counter mode that is used to check for lost samples in rtl_test) were figured out this way. I haven't seen it being mentioned anywhere else.

(6) Yes, just take a look at rtl_eeprom. It doesn't contain code, only parts of the USB descriptor, a few uninteresting settings, and the keymap for the infrared remote. What I did though, is dumping the maskrom of the RTL2832U which contains the 8051 code. Nothing really interesting in there, some USB initialization, reading the EEPROM, some IR-receiver-related stuff, the USB->I2C bridge and that's about it. And no, the code cannot be changed.

(7) Depends on which AGC. There's an AGC in the tuner, and a few more AGCs inside the RTL2832U: The RF-AGC, IF-AGC and DAGC. Both the RF-AGC and IF-AGC are disabled, since we control the gain of the tuner directly or let the tuner handle the gain control. They are only used for DVB-T reception so that the demodulator can generate an analog control voltage to control the tuner RF and IF gains to achieve the best SNR. The DAGC (Digital AGC) does nothing more than scaling the sample values, and is exposed through rtlsdr_set_agc_mode().

(8) This mode is used for the direct sampling mod, where you bypass the tuner and directly feed the RF signal to the ADC input. If enabled, the IF mode is activated and calls to rtlsdr_set_center_freq() actually set the IF frequency of the DDC. This can be used for HF-reception from 0 to 14.4 MHz.
</code>

不过作者提到的类似“The datasheet I've seen is more aimed at the people doing the layout of such DVB-T sticks, like pinout, power requirements etc. Some registers and the general USB commands are described as well, but that's about it.”这样的手册我也没有在网络上找到。

  • 虽然RTL-2832本身没有官方的公开datasheet,但是电视棒里常用的配合RTL2832使用的射频前端芯片R820T和E4000的手册都很容易找到,例如这是其中一页的框图 r820_diag_thb.jpg

  • 不过经过多次查找,还是找到了电视棒的框图和实际电路

框图(应该也是猜测的): Fpgu3bO.png 电路: 140317075718660037225_R820T_20140619183917.png 140317102568976083225_RtL2832U.png 电路图的说明:

<code>少し前から、実験の為に、「DVB-T DAB+FM」のドングルについて、回路図が必要でした。
すこしずつ回路をトレースしながら、水魚堂さまの「Bsch3V」の勉強を兼ねて、書き溜めてきました。
バイパスコンデンサは面倒なので書いてありませんが、かなり実用的になってきたので、皆様に間違いを指摘して頂けたらなと思い、公開することにしました。
購入した物を見て、リバースエンジニアリングで作成したので、著作権はGNU General Public License (GPL) に準拠します。個人で利用することはかまいませんが、転載には、出所元を明確にしてください。また販売等の商業利用は禁止です。尚、回路図に記載された半導体や回路、部品について、どこの企業とも、NDAの契約はしておりません。
権利を侵害すると主張する方がおられましたら、コメントに記載してください。

まあ、硬い話はおいといて、間違いがあれば、教えてください。
まだ、回路的に変更すべき所もありそうです。

尚、このままでは製作できないように、肝心なPLLのフィルターはモジュールにしてあります。
信号ピンの名称は、私が勝手に付けました。
</code>

这个电路图也是逆向工程出来的。。

综合上面查找到的资料可以得出这样的结论:

  • RTL2832芯片其实有两路28.8M采样率的ADC(对于R820T这样的低中频前端实际只使用一路),但是在内部又经过了一次数字的下变频(对于低中频前端)和重采样,导致SDR模式实际上最多只能输出2.56M采样率的I/Q信号。

  • RTL2832芯片使用的28.8MHz时钟是由前端R820的时钟晶振提供的(其实这个28.8MHz的时钟就是ADC的时钟?)。

由此来看似乎只需要把多个电视棒的R820T的晶体全部都拆掉并且由它们的Xtal_i引脚统一输入同步的28.8MHz时钟信号就可以实现多个电视棒的同步运作?请教一下这样可行么?

[修改于 6年10个月前 - 2017/07/01 18:33:10]

来自:电子信息 / 无线电
14
1
已屏蔽 原因:{{ notice.reason }}已屏蔽
{{notice.noticeContent}}
~~空空如也
虎哥
6年10个月前 IP:四川
835554
既然是黑箱,只能实测一下,原理上这样能说通,如果里面时序是严格的、一致的就行。另外数据也要同步,不知道里面有没有可能导致提前或推后一帧的缓存之类东西,毕竟他要做重采样和数字滤波。
其实如果没记错的话,AD9363才一百多人民币,没必要用电视棒芯片了。
引用
评论
1
加载评论中,请稍候...
200字以内,仅用于支线交流,主线讨论请采用回复功能。
折叠评论
zx-16533作者
6年10个月前 IP:广东
835561
引用 虎哥:
既然是黑箱,只能实测一下,原理上这样能说通,如果里面时序是严格的、一致的就行。另外数据也要同步,不知道里面有没有可能导致提前或推后一帧的缓存之类东西,毕竟他要做重采样和数字滤波。
其实如果没记错的话,……
有道理。。看来只能测试下了,另外不知道多个USB设备分别连接到PC上要不要专门的措施对多个USB的传输进行同步?毕竟多个USB有可能不是同时连接上的,传输的数据流开始的时间可能不一样。
搜了下AD9363这个芯片,确实很方便,而且还带有两路接收两路发射,功能更强大,而且还有20M的带宽。不过用这个的话差不多相当于从头设计一个SDR了,虽然ADI有现成的评估板,但搜了下价格最便宜3k多。而且我也没有设计射频电路的经验,相比之下如果可行的话还是改造下电视棒比较好做。
引用
评论
加载评论中,请稍候...
200字以内,仅用于支线交流,主线讨论请采用回复功能。
折叠评论
ry7740kptv
6年10个月前 修改于 6年10个月前 IP:内蒙古
835562
为啥ExtIO里可以设置最高采样率3.5M?。。。
另外7bit的ADC还是不要折腾了,很早之前研究过改良方案,但都是杯水车薪。。。
引用
评论
1
加载评论中,请稍候...
200字以内,仅用于支线交流,主线讨论请采用回复功能。
折叠评论
虎哥
6年10个月前 IP:四川
835563
为什么要用多个USB,数据要按一定规律组装好了再传送啊。我没遇到过多个USB还要同步传送的问题,希望其他网友解答。通常对于分布式接收系统,是通过在数据中打时标的方式来同步的,但这个同步精度不足以进行相位测量,只适合进行到达时间差测量。两台901V同时接入电脑是可以实现双端口全功能矢网的,但需要额外连接时钟同步线和同步触发线,而且由于鉴相频率很低,对触发精度的要求比射频测向低多了,才具备了可行性。
引用
评论
加载评论中,请稍候...
200字以内,仅用于支线交流,主线讨论请采用回复功能。
折叠评论
zx-16533作者
6年10个月前 IP:广东
835564
引用 虎哥:
为什么要用多个USB,数据要按一定规律组装好了再传送啊。我没遇到过多个USB还要同步传送的问题,希望其他网友解答。通常对于分布式接收系统,是通过在数据中打时标的方式来同步的,但这个同步精度不足以进行相……
因为这个电视棒芯片只有自带的一个USB能作为输出。。看来这样的话是不大可行的了。。
引用
评论
加载评论中,请稍候...
200字以内,仅用于支线交流,主线讨论请采用回复功能。
折叠评论
ry7740kptv
6年10个月前 IP:广东
835565
最近在设计一款接收机,目标性能:12bit 最大采样率20Msps连续可调,带宽16MHz,带14db LNA,覆盖1M~6G的频率范围,敬请期待~
引用
评论
加载评论中,请稍候...
200字以内,仅用于支线交流,主线讨论请采用回复功能。
折叠评论
zx-16533作者
6年10个月前 修改于 6年10个月前 IP:广东
835566
引用 ry7740kptv:
为啥ExtIO里可以设置最高采样率3.5M???
图上说这个是最高"stable"的速率,在这个速率下可以不丢数据。。大概3.5M的速率也是能用的。。只是可能丢数据。。

另外话说我的hackrf在gqrx能调到7.24G。。不知道什么原理。。
引用
评论
加载评论中,请稍候...
200字以内,仅用于支线交流,主线讨论请采用回复功能。
折叠评论
ry7740kptv
6年10个月前 IP:广东
835567
引用 radio:
图上说这个是最高"stable"的速率,在这个速率下可以不丢数据。。大概3.5M的速率也是能用的。。只是可能丢数据。。

另外话说我的hackrf在gqrx能调到7.24G。。不知道什么原理。。
HackRF的上变频器RFFC5072最高6G,7.24G已经是超标应用饿了。。
引用
评论
加载评论中,请稍候...
200字以内,仅用于支线交流,主线讨论请采用回复功能。
折叠评论
panjun11
6年10个月前 IP:广西
835645
这个已经有人这么做了吧 一主一副, 用个跳线把晶振串起来, 当时好像是用来收4g信号的
引用
评论
加载评论中,请稍候...
200字以内,仅用于支线交流,主线讨论请采用回复功能。
折叠评论
zx-16533作者
6年10个月前 IP:广东
835733
引用 panjun11:
这个已经有人这么做了吧 一主一副, 用个跳线把晶振串起来, 当时好像是用来收4g信号的
有相关的链接么?
引用
评论
加载评论中,请稍候...
200字以内,仅用于支线交流,主线讨论请采用回复功能。
折叠评论
虎哥
6年9个月前 IP:四川
835853
如果有人做过,推测芯片本身的时序比较严格,问题就是如何用两个USB传送数据,最后还能把数据按照时序严格的组装起来 ,这个应该属于软件问题。
引用
评论
加载评论中,请稍候...
200字以内,仅用于支线交流,主线讨论请采用回复功能。
折叠评论
panjun11
6年9个月前 IP:广西
836083
引用
评论
加载评论中,请稍候...
200字以内,仅用于支线交流,主线讨论请采用回复功能。
折叠评论
zx-16533作者
6年9个月前 修改于 6年9个月前 IP:广东
836105
引用 panjun11:
XXXXXXXXXXXXXXXXXXXXXX/multi-rtl-a-gnu-radio-block-for-combining-and-time-synchronizing-multipl……
看了下,貌似这个同步的原理是先调到同一频率上然后利用这个频率上的短信号来进行同步,不知道这样精度有多高。。不过用来收GSM应该是没问题的。。
引用
评论
加载评论中,请稍候...
200字以内,仅用于支线交流,主线讨论请采用回复功能。
折叠评论
zx-16533作者
6年9个月前 IP:广东
836146
引用 虎哥:
如果有人做过,推测芯片本身的时序比较严格,问题就是如何用两个USB传送数据,最后还能把数据按照时序严格的组装起来 ,这个应该属于软件问题。
另外论坛有个bug..如果回复的帖子里有个较长的url,url后半部分就会被吞掉包括'[/ url]'标签,导致不能回复。。
引用
评论
加载评论中,请稍候...
200字以内,仅用于支线交流,主线讨论请采用回复功能。
折叠评论

想参与大家的讨论?现在就 登录 或者 注册

所属专业
所属分类
上级专业
同级专业
zx-16533
进士 学者
文章
125
回复
2655
学术分
4
2010/08/22注册,2年10个月前活动
暂无简介
主体类型:个人
所属领域:无
认证方式:未同步
IP归属地:未同步
文件下载
加载中...
{{errorInfo}}
{{downloadWarning}}
你在 {{downloadTime}} 下载过当前文件。
文件名称:{{resource.defaultFile.name}}
下载次数:{{resource.hits}}
上传用户:{{uploader.username}}
所需积分:{{costScores}},{{holdScores}}下载当前附件免费{{description}}
积分不足,去充值
文件已丢失

当前账号的附件下载数量限制如下:
时段 个数
{{f.startingTime}}点 - {{f.endTime}}点 {{f.fileCount}}
视频暂不能访问,请登录试试
仅供内部学术交流或培训使用,请先保存到本地。本内容不代表科创观点,未经原作者同意,请勿转载。
音频暂不能访问,请登录试试
支持的图片格式:jpg, jpeg, png
插入公式
评论控制
加载中...
文号:{{pid}}
投诉或举报
加载中...
{{tip}}
请选择违规类型:
{{reason.type}}

空空如也

加载中...
详情
详情
推送到专栏从专栏移除
设为匿名取消匿名
查看作者
回复
只看作者
加入收藏取消收藏
收藏
取消收藏
折叠回复
置顶取消置顶
评学术分
鼓励
设为精选取消精选
管理提醒
编辑
通过审核
评论控制
退修或删除
历史版本
违规记录
投诉或举报
加入黑名单移除黑名单
查看IP
{{format('YYYY/MM/DD HH:mm:ss', toc)}}