Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
project:gctx [2012/11/20 23:55]
jenda [Limitations]
project:gctx [2016/02/19 17:47] (current)
jenda
Line 9: Line 9:
 hw=-| hw=-|
 founder=[[user:​jenda]]| founder=[[user:​jenda]]|
-interested=[[user:​EDITME]]\\ [[user:​EDITME]]|+interested=[[user:​mrkva]]|
 status=active status=active
 }} }}
Line 16: Line 16:
 ===== Motivation ===== ===== Motivation =====
  
-Software defined receivers are pretty cheap now (rtl-sdr~500CZK~20USD), however transmitters are still expensive. But you probably have one very fast DAC already in your computer - your graphic card with VGA output!+Software defined receivers are pretty cheap now (rtl-sdr~200CZK~8USD), however transmitters are still expensive. But you probably have one very fast DAC already in your computer - your graphic card with VGA output! 
 + 
 +{{ :​project:​gctx:​sdrlenna.jpg?​direct&​400 |}} 
 + 
 +===== Goal ===== 
 + 
 +Goal is to create GNU Radio sink, that will eat your data and transmit them. 
 + 
 +===== Transmitting arbitrary data (first try) ===== 
 + 
 +We will create the signal in gnuradio, convert it to black-and-white images and then use ffmpeg to convert the images into video file. We then play this file with mplayer. 
 + 
 +Obtain your pixel clock and resolution (from now on, resolution means htotal and vtotal) using xvidtune. 
 + 
 +Create the following flowgraph. 
 + 
 +{{ :​project:​gctx:​flowgraph.png?​direct&​300 |}} 
 +(audio is 2x oversampled -- the Complex to Real probably does not work with the I/Q samples as I expected) 
 + 
 +Set the project sample rate to your actual pixel clock. 
 + 
 +Run the flowgraph. It is slow (~10 MS/s). 
 + 
 +Create file named "​head"​ with the following content. 
 +<​code>​ 
 +P5 
 +your_x_resolution your_y_resolution 
 +255 
 +</​code>​ 
 + 
 +Generate frames. 
 +<​code>​ 
 +cat chn.raw | for i in `seq 1 560`; do ( cat head; head -c $(( 1712 * 1063 )) ) > frame$i.pgm;​ done 
 +</​code>​ 
 +(change "1712 * 1063" for your resolution) 
 + 
 +Generate video 
 +<​code>​ 
 +ffmpeg -i frame%d.pgm -r 60 -crf 25 -preset ultrafast ​ -y video.mkv 
 +</​code>​ 
 +(adjust -r to your screen refresh rate) 
 + 
 +Play the video in baseband 
 +<​code>​mplayer -vo xv -loop 0 -noborder video.mkv</​code>​ 
 +(on my machine, OpenGL output does not support vsync, xv output does. This is probably important) 
 + 
 +Play the video on harmonics - we use video filter to introduce sharp edges into the signal. Unfortunately the spectrum is then pretty crap. 
 +<​code>​mplayer -vo xv -loop 0 -noborder -vf eq2=1:​3:​0.7:​1 video.mkv</​code>​
  
 ===== Inspiration ===== ===== Inspiration =====
Line 22: Line 69:
   * [[http://​www.erikyyy.de/​tempest/​|Tempest for Eliza]] - AM audio transceiver (tested up to 145 MHz with Intel Mobile 945) - frequency accuracy is +/- 20 kHz, can be fixed in software   * [[http://​www.erikyyy.de/​tempest/​|Tempest for Eliza]] - AM audio transceiver (tested up to 145 MHz with Intel Mobile 945) - frequency accuracy is +/- 20 kHz, can be fixed in software
   * [[http://​bellard.org/​dvbt/​|TV Signal Generation]] - PAL/SECAM and DVB-T Multiplex (!) transceiver   * [[http://​bellard.org/​dvbt/​|TV Signal Generation]] - PAL/SECAM and DVB-T Multiplex (!) transceiver
 +  * http://​www.reddit.com/​r/​raspberry_pi/​comments/​14k5o3/​raspberry_pi_fm_transmitter_with_no_additional/​
 +  * http://​bk.gnarf.org/​creativity/​vgasig/​
  
-===== Goal ===== 
  
-Goal is to create GNU Radio sink, that will eat your data and transmit them.+===== TODO ===== 
 +  * learn how GnuRadio works and how to write a simple ​sink for it 
 +  * switch on VGA output ​and make it display our picture without affecting other screens 
 +  * turn vsync and keep track how fast are frames being refreshed - learn SDL? :( 
 +  * split incoming signal into separate pictures 
 +  * display each picture for calculated time, generating the wanted signal 
 +  * make a [[http://​www.w8ji.com/​shortwave%20broadcast%20amplifier.htm|super big power amplifier]] so the whole world can hear us!
  
 ===== Limitations ===== ===== Limitations =====
  
-Highest pixel clock of a common graphic card could be around 200 MHz (1920x1200 at 85 Hz). This gives you ability to directly transmit up to ~50 MHz achieving reasonable signal quality. [[http://​bellard.org/​dvbt/​|This project]] picks harmonics of the signal to transmit on higher frequencies. Another way is to mix the generated signal with external ​oscilator ​and hope that you get sum of frequencies on the output. DVB-T transmitter linked above uses the first approach to correctly generate even so complex modulations like 16-QAM.+Highest pixel clock of a common graphic card could be around 200 MHz (1920x1200 at 85 Hz). This gives you ability to directly transmit up to ~50 MHz achieving reasonable signal quality. [[http://​bellard.org/​dvbt/​|This project]] picks harmonics of the signal to transmit on higher frequencies. Another way is to mix the generated signal with external ​oscillator ​and hope that you get sum of frequencies on the output. DVB-T transmitter linked above uses the first approach to correctly generate even so complex modulations like 16-QAM.
  
 2nd and 4th harmonic seem to be OK, 4th harmonic is weak, but still receivable on Baoveng UV-5R with default antenna. 2nd and 4th harmonic seem to be OK, 4th harmonic is weak, but still receivable on Baoveng UV-5R with default antenna.
Line 44: Line 98:
 [[http://​en.wikipedia.org/​wiki/​VGA_connector|PINOUT]] [[http://​en.wikipedia.org/​wiki/​VGA_connector|PINOUT]]
  
-Connect oscilloscope:​ GND to pin 5, first channel to pin 1 (RED), second channel to pin 14 (VSYNC). +We can boost pixelclock a little bit (172.8 MHz here)!
- +
-Tested with display resolution 800x600. Set it and turn on "clone image"​. At this point, you should see something on the oscilloscope. Adjust trigger and zoom on some of the lines. +
- +
-<​code>​ +
-TRIG  __/​^\___________________________ +
- +
-            /^v__^_---_ _-^^\     /​^-- +
-VIDEO _____/ ​          ​^ ​    ​\___/​ +
- +
-               FIRST LINE          SECOND LINE +
-                               ^ +
-                             ​HBLANK +
-</​code>​ +
- +
-Try to move with your mouse at the top of the screen. You should see a peak moving. +
- +
-Now we don't like the HBLANK interval between lines - when you want to transmit something continuous, you don't want gaps in there! +
- +
-Additionally,​ we can boost pixelclock a little bit (172.8 MHz here)!+
  
 <​code>​ <​code>​
Line 75: Line 110:
 Search for "​modeline"​ in man xorg.conf for more info on these numbers. Search for "​modeline"​ in man xorg.conf for more info on these numbers.
  
-Now the gap should be only 1 pixel wide.+Now the horizontal sync gap should be only 1 pixel wide.
  
 TODO: Eliminate VBLANK in similar way. TODO: Eliminate VBLANK in similar way.
-TODO: What does "​-hsync -vsync"​ do?+
  
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki