{"id":736,"date":"2013-02-19T23:16:40","date_gmt":"2013-02-19T22:16:40","guid":{"rendered":"http:\/\/majek.mamy.to\/?p=736"},"modified":"2013-06-22T22:11:31","modified_gmt":"2013-06-22T20:11:31","slug":"rtlsdr-analyzer-from-dvb-t-tuner","status":"publish","type":"post","link":"https:\/\/majek.sh\/en\/rtlsdr-analyzer-from-dvb-t-tuner\/","title":{"rendered":"Awesome spectrum analyzer from DVB-T tuner"},"content":{"rendered":"<p>Few weeks ago I stumbled upon some topic on one of FPV forums about checking frequency, spectrum, antennas etc. I realized that people are using cheap DVB-T tuner based on Realtek RTL2832U chip as spectrum analyzer, SDR (software defined radio) and even as osciloscope.<br \/>\nThere were many situations in my hobby when this brilliant device could help a lot. This discovery was so hot, so I decided to buy such usb dongle ASAP, even at slightly bigger price (55z\u0142 ~ $16) than directly from China. I found it in one shop in my town and next day I became happy owner of this tuner \ud83d\ude42<\/p>\n<p>This is Lifeview LV5T Deluxe (branded as NOT ONLY TV):<br \/>\n<a href=\"https:\/\/majek.sh\/rtlsdr-analyzer-from-dvb-t-tuner\/notonlytv1\/\" rel=\"attachment wp-att-738\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv1-640x348.jpg\" alt=\"\" title=\"NotOnlyTV\/Lifeview LV5T Deluxe\" width=\"640\" height=\"348\" class=\"alignnone size-medium wp-image-738\" srcset=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv1-640x348.jpg 640w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv1-150x81.jpg 150w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv1.jpg 1024w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\n<a href=\"https:\/\/majek.sh\/rtlsdr-analyzer-from-dvb-t-tuner\/notonlytv2\/\" rel=\"attachment wp-att-739\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv2-640x347.jpg\" alt=\"\" title=\"NotOnlyTV\/Lifeview LV5T Deluxe\" width=\"640\" height=\"347\" class=\"alignnone size-medium wp-image-739\" srcset=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv2-640x347.jpg 640w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv2-150x81.jpg 150w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv2.jpg 1024w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\n<a href=\"https:\/\/majek.sh\/rtlsdr-analyzer-from-dvb-t-tuner\/notonlytv3\/\" rel=\"attachment wp-att-740\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv3-501x480.jpg\" alt=\"\" title=\"NotOnlyTV\/Lifeview LV5T Deluxe\" width=\"501\" height=\"480\" class=\"alignnone size-medium wp-image-740\" srcset=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv3-501x480.jpg 501w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv3-150x143.jpg 150w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv3.jpg 800w\" sizes=\"(max-width: 501px) 100vw, 501px\" \/><\/a><\/p>\n<p>It&#8217;s equipped with a little different tuner than described on <a href=\"http:\/\/sdr.osmocom.org\/trac\/wiki\/rtl-sdr\" target=\"_blank\">rtlsdr\/osmocomSDR<\/a> site, Fitipower FC0013 capable of working within 22-1100MHz frequency range:<br \/>\n<a href=\"https:\/\/majek.sh\/rtlsdr-analyzer-from-dvb-t-tuner\/notonlytv-inside1\/\" rel=\"attachment wp-att-741\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv-inside1-640x223.jpg\" alt=\"\" title=\"Lifeview LV5T Deluxe inside\" width=\"640\" height=\"223\" class=\"alignnone size-medium wp-image-741\" srcset=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv-inside1-640x223.jpg 640w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv-inside1-150x52.jpg 150w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv-inside1.jpg 1024w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\n<a href=\"https:\/\/majek.sh\/rtlsdr-analyzer-from-dvb-t-tuner\/notonlytv-inside2\/\" rel=\"attachment wp-att-742\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv-inside2-640x236.jpg\" alt=\"\" title=\"Lifeview LV5T Deluxe inside\" width=\"640\" height=\"236\" class=\"alignnone size-medium wp-image-742\" srcset=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv-inside2-640x236.jpg 640w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv-inside2-150x55.jpg 150w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/notonlytv-inside2.jpg 1024w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<h1>Software<\/h1>\n<p>To be clear: I use Linux \ud83d\ude42<br \/>\nFirst step was to download and install rtl-sdr library from <a href=\"http:\/\/sdr.osmocom.org\/trac\/wiki\/rtl-sdr\" target=\"_blank\">http:\/\/sdr.osmocom.org\/trac\/wiki\/rtl-sdr<\/a> . In this package there are also ready made udev rules to install, so root access is not required later for using it.<br \/>\nOn this web page one can find also links to some related projects using this library.<br \/>\nNext step was to get pyrtlsdr library for Python as most of these project are written in that language. After installation of few more dependencies as wxPython, numpy, matplotlib etc I started testing software \ud83d\ude42<\/p>\n<h2>RTLSDR-Scanner<\/h2>\n<p>My first application was <a href=\"https:\/\/github.com\/EarToEarOak\/RTLSDR-Scanner\" target=\"_blank\">RTLSDR-Scanner<\/a>. Kind of old school, well known spectrum analyzer:<br \/>\n<a href=\"https:\/\/majek.sh\/rtlsdr-analyzer-from-dvb-t-tuner\/rtlsdr-scanner\/\" rel=\"attachment wp-att-747\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/rtlsdr-scanner-636x480.png\" alt=\"\" title=\"RTLSDR-scanner\" width=\"636\" height=\"480\" class=\"alignnone size-medium wp-image-747\" srcset=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/rtlsdr-scanner-636x480.png 636w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/rtlsdr-scanner-150x113.png 150w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/rtlsdr-scanner.png 842w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/a><\/p>\n<p>Easy to operate, with zoom but capable to scan only within range of whole MHz, so scan in narrower range than 1MHz is not possible (you could zoom, but it doesn&#8217;t enhance frequency resolution).<br \/>\nSo, it was quite good, but I needed more \ud83d\ude42<\/p>\n<h2>rtlsdr-waterfall<\/h2>\n<p>Waterfall applications is a real power of computerized spectrum analyzer!<br \/>\nThis very easy <a href=\"https:\/\/github.com\/keenerd\/rtlsdr-waterfall\" target=\"_blank\">Python script<\/a> is more than useful.<\/p>\n<p>For example, scan of commercial FM radio frequencies &#8211; all in one:<br \/>\n<a href=\"https:\/\/majek.sh\/rtlsdr-analyzer-from-dvb-t-tuner\/waterfallfm\/\" rel=\"attachment wp-att-749\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/waterfallfm.jpg\" alt=\"\" title=\"rtlsdr-waterfall - FM radio frequencies\" width=\"637\" height=\"436\" class=\"alignnone size-full wp-image-749\" srcset=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/waterfallfm.jpg 637w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/waterfallfm-150x102.jpg 150w\" sizes=\"(max-width: 637px) 100vw, 637px\" \/><\/a><\/p>\n<p>And situation when waterfall shows it&#8217;s power &#8211; 433MHz ISM band scan with some devices transmitting only during small window of time (on the left it&#8217;s probably wireless sensor for weather station):<br \/>\n<a href=\"https:\/\/majek.sh\/rtlsdr-analyzer-from-dvb-t-tuner\/waterfall433\/\" rel=\"attachment wp-att-751\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/waterfall433-621x480.jpg\" alt=\"\" title=\"rtlsdr-waterfall - 443MHz ISM band\" width=\"621\" height=\"480\" class=\"alignnone size-medium wp-image-751\" srcset=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/waterfall433-621x480.jpg 621w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/waterfall433-150x115.jpg 150w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/waterfall433.jpg 650w\" sizes=\"(max-width: 621px) 100vw, 621px\" \/><\/a><\/p>\n<p>And back to R\/C \ud83d\ude42 My 40MHz transmitter:<br \/>\n<a href=\"https:\/\/majek.sh\/rtlsdr-analyzer-from-dvb-t-tuner\/waterfall40\/\" rel=\"attachment wp-att-753\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/waterfall40-622x480.jpg\" alt=\"\" title=\"rtlsdr-waterfall - 40MHz r\/c transmitter\" width=\"622\" height=\"480\" class=\"alignnone size-medium wp-image-753\" srcset=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/waterfall40-622x480.jpg 622w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/waterfall40-150x115.jpg 150w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/waterfall40.jpg 648w\" sizes=\"(max-width: 622px) 100vw, 622px\" \/><\/a><\/p>\n<p>You could select and measure frequency range, make pan and zoom (but on lower frequencies application crash during zooming), change sesnsitivity of tuner to remove clipping and additional strips caused by this.<\/p>\n<h2>Audacity<\/h2>\n<p>Yes, you are reading right: Audacity &#8211; well known audio editing program. I made a little patch (not perfect) to allow change sample rate up to 10MHz because default maximum was 100kHz and typical rtl-sdr sample rate is about 2MHz, so selection tool and fft features are not working correctly.<br \/>\nUsing rtl_sdr utility from rtl-sdr library, I dumped raw samples near desired frequency and then I imported it as raw 8 bit stereo samples into Audacity. Below are results:-)<\/p>\n<p>My 35MHz transmitter on 71 channel. I have little problems with range on this channel and this picture shows why:<br \/>\n<a href=\"https:\/\/majek.sh\/rtlsdr-analyzer-from-dvb-t-tuner\/35m71\/\" rel=\"attachment wp-att-756\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/35m71.png\" alt=\"\" title=\"rtl-sdr samples in Audacity - ch71 35MHz\" width=\"536\" height=\"288\" class=\"alignnone size-full wp-image-756\" srcset=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/35m71.png 536w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/35m71-150x80.png 150w\" sizes=\"(max-width: 536px) 100vw, 536px\" \/><\/a><br \/>\nOn this image you can see:<\/p>\n<ul>\n<li>this is 5 channels radio (6 peaks of synchronization pulses)<\/li>\n<li>main frequency is shifted by about 5kHz from sampling base i.e. channel frequency &#8211; and it&#8217;s cause of poor reception<\/li>\n<li>deviation is about 3kHz (to about 8kHz from center of channel)<\/li>\n<\/ul>\n<p>Using quartz for 63 channel it works much better from my experience and below is proof of this:<br \/>\n<a href=\"https:\/\/majek.sh\/rtlsdr-analyzer-from-dvb-t-tuner\/35m63\/\" rel=\"attachment wp-att-759\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/35m63.png\" alt=\"\" title=\"rtl-sdr in Audacity - ch63 of 35MHz transmitter\" width=\"517\" height=\"306\" class=\"alignnone size-full wp-image-759\" srcset=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/35m63.png 517w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/35m63-150x88.png 150w\" sizes=\"(max-width: 517px) 100vw, 517px\" \/><\/a><br \/>\nShift from base frequency is less than 3kHz, so it&#8217;s better than on 71 channel.<\/p>\n<p>For comparision, my simple 4 channel 40MHz transmitter:<br \/>\n<a href=\"https:\/\/majek.sh\/rtlsdr-analyzer-from-dvb-t-tuner\/40m\/\" rel=\"attachment wp-att-761\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/40m.png\" alt=\"\" title=\"rtl-sdr in Audacity - 40MHz transmitter\" width=\"523\" height=\"226\" class=\"alignnone size-full wp-image-761\" srcset=\"https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/40m.png 523w, https:\/\/majek.sh\/wp-content\/uploads\/2013\/02\/40m-150x64.png 150w\" sizes=\"(max-width: 523px) 100vw, 523px\" \/><\/a><\/p>\n<p>Very tempting looks <a href=\"http:\/\/sdrsharp.com\/\" target=\"_blank\">SDR#<\/a> (available also on Windows) but require a lot more weird dependencies, so I put it for later.<br \/>\nBut I&#8217;m sure that this topic will return some day with more new cool informations \ud83d\ude42<\/p>\n<p><strong>Update 2013.06.22<\/strong>: second part is <a href=\"https:\/\/majek.sh\/en\/rtl2832u-spectrum-analyzer-part-2\/\" title=\"RTL2832U spectrum analyzer \u2013 part 2\">here<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Few weeks ago I stumbled upon some topic on one of FPV forums about checking frequency, spectrum, antennas etc. I realized that people are using cheap DVB-T tuner based on Realtek RTL2832U chip as spectrum analyzer, SDR (software defined radio) <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/majek.sh\/en\/rtlsdr-analyzer-from-dvb-t-tuner\/\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6,5],"tags":[13,56,57],"_links":{"self":[{"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/posts\/736"}],"collection":[{"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/comments?post=736"}],"version-history":[{"count":35,"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/posts\/736\/revisions"}],"predecessor-version":[{"id":1060,"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/posts\/736\/revisions\/1060"}],"wp:attachment":[{"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/media?parent=736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/categories?post=736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/majek.sh\/en\/wp-json\/wp\/v2\/tags?post=736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}