Coder Social home page Coder Social logo

fl2k's Introduction

fl2k

Use cheap VGA dongles as a digital to analog converter for ham radio

Based on great work from Steve Markgraf

This version is on Github I have a Blog post about my experiments so far

Objective

I'm stripping back the supplied FM example and statically linking the library code to make it easy to play with.

Longer term I'd like to be able to generate a decent HF signal that can be modulated for things like WSPR.

Build

On Ubuntu you might need:

sudo apt install git build-essential libusb-1.0-0-dev

To build just type:

make

You'll need to install the software this is derived from or you'll get this error:

libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/002/014: Permission denied
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
usb_open error -3
Please fix the device permissions, e.g. by installing the udev rules file

Build and install the software as documented here

macOS

All builds just fine on macOS but you need libusb which I installed using homebrew

brew install libusb

USB memory

You'll get this error:

libusb: error [op_dev_mem_alloc] alloc dev mem failed errno 12
Failed to allocate zerocopy buffer for transfer 4
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=12
Failed to submit transfer 0
Please increase your allowed usbfs buffer size with the following command:
echo 0 > /sys/module/usbcore/parameters/usbfs_memory_mb

On Ubuntu you'll need increase the USB memory buffer by running:

sudo sh -c 'echo 1000 > /sys/module/usbcore/parameters/usbfs_memory_mb'

See this article for more info and how to add this to the grub command line so it's permanent.

Run

Run locally.

./vgaplay  -s 130e6 -c 7e6 

-s is the sample rate of the software DDS. The higher the sample rate the better the sine wave output. You can probably go up to about 150MS/s

-c is the carrier frequency to generate. The closer the carrier frequency gets to half the sample rate, the more the signal becomes a square wave.

Here's how the waveform looks at 7.159MHz with 150Ms/s:

Beautiful CRO capture

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.