User Tools

Site Tools


project:gctx

Graphic card transmitter

Use graphic card as a software defined transceiver!

Maybe someone did it: https://github.com/dabfree/VGAmod

gctx
editme
founder: Jenda
depends on:
interested: mrkva
software license: -
hardware license: -

Motivation

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!

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.

(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.

P5
your_x_resolution your_y_resolution
255

Generate frames.

cat chn.raw | for i in `seq 1 560`; do ( cat head; head -c $(( 1712 * 1063 )) ) > frame$i.pgm; done

(change “1712 * 1063” for your resolution)

Generate video

ffmpeg -i frame%d.pgm -r 60 -crf 25 -preset ultrafast  -y video.mkv

(adjust -r to your screen refresh rate)

Play the video in baseband

mplayer -vo xv -loop 0 -noborder video.mkv

(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.

mplayer -vo xv -loop 0 -noborder -vf eq2=1:3:0.7:1 video.mkv

Inspiration

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 super big power amplifier so the whole world can hear us!

Limitations

Highest pixel clock of a common graphic card could be around 200 MHz (1920×1200 at 85 Hz). This gives you ability to directly transmit up to ~50 MHz achieving reasonable signal quality. 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.

Transmitting power

With a graphic card alone and ~20 cm of wire as an antenna the range is a few metres. HF amplifier will be necessary to do anything outside of the laboratory.

Playing under Linux and X.org

(tested on EEE 1005HA with Intel Mobile 945)

When no load is detected, graphic card turns the output off. Use dummy plug to keep it on. It looks like that only one channel is necessary.

PINOUT

We can boost pixelclock a little bit (172.8 MHz here)!

xrandr --newmode "shorths"  172.80    1920     1920        1921        1921     1200 1215 1216 1231
                            PIXELCLK HVIDEO HSYNCSTART  HSYNCSTOP     HTOTAL
                              MHz
xrandr --addmode VGA1 shorths
xrandr --output VGA1 --mode "shorths" --same-as LVDS1

Search for “modeline” in man xorg.conf for more info on these numbers.

Now the horizontal sync gap should be only 1 pixel wide.

TODO: Eliminate VBLANK in similar way.

project/gctx.txt · Last modified: 2017/11/18 23:15 by jenda