CHARLESTON SDR PROJECT
AMRAD is VERY excited about the potential for a low-cost SDR board developed in Charleston, SC by Dr. John Schwacke. For more information, visit John's web site. The SDR board itself uses an AFEDRI8201 IC, and plugs into a Digilent Nexys2 FPGA development board. John has graciously allowed AMRAD to reproduce the boards.
The SDR board will cost approximately $80 to build, and the Nexys2 board is approx. $130. For just over $210, you can have a direct-sampling SDR receiver to experiment with.
Here is a parts list for John's board: CharlestonPARTSLIST.xls
In order to use the board, you need to reprogram the Digilent Nexys2, preferrably the onboard ROM. This is accomplished using the Digilent Adept suite (link coming). Until an issue is resolved, use the version 1.x of Adept, not Adept 2.0, as there may be an incompatibility.
The Nexys2 is not doing any heavy-lifting in this project (so far). It is acting merely as a go-between between the AFEDRI8201 and the host computer. Inside the FPGA code are a couple of FIFOs, and some command/status register processing. This may change in the future.
The Nexys2 board is available with two sizes of FPGAs (500k and 1.2M), requiring different bit files to be loaded. The following files are preliminary FPGA code for the two types of FPGAs.
NOTE: After tracking down an issue with Linux GNU Radio spectrum displaying backwards, and HF SSB tuning backwards, I found that the I & Q samples were in the wrong order coming out of the FPGA. These two files correct that sequence.
- Nexys2 1.2M board sdrif.bit file with correct IQ sequence: sdrif12MIQ.bit
- Nexys2 500k board sdrif.bit file with correct IQ sequence: sdrif500kIQ.bit
I'm not sure exactly what minimum FPGA code is necessary to create these bit files, especially since some of the Xilinx IP modules are included (DDS, FIFO, displays, etc). To get the source out there, I have zipped up the last thing that I "compiled", which is the sdrif500kIQ above. That zipped file is pretty big (5MB), but available here: originalhostif500k.zip
You should be able to unzip this file into its own directory, then build it with the Xilinx ISE 10.1. Other versions may require tweaking.
NOTE: Here are the FPGA bit files based on the original FPGA code. These versions have the I and Q samples ordered backwards ( Q then I). The newer versions above have the I & Q samples in the correct order.
The 500k versions light LD7 permanently, and LD6, LD5, LD1, and LD0 will flash when data is being transferred between the FPGA board and the host computer. The 1.2M version does not light LD7, but is otherwise similar.
UPDATE: JULY 4, 2010:
I have modified Quisk (version 3.4.3) for use with the Charleston SDR Receiver. Quisk is an SDR GUI that runs under Linux, and is written by James Ahlstrom (N2ADR) in a combination of C and Python. I have used Quisk with Ubuntu 8.04LTS and 10.04 LTS.
A Linux gzipped tarball of Charleston Quisk-3.4.3 is here:chas quisk-3.4.3.tar.gz
This project is new at this time, so software is very limited, with more being developed. We could use help with converting the I/Q samples to either a "PortAudio" compatible format, or better yet, a sound-card-like interface, so the board could be used with Rocky.
For Windows (XP, possibly Vista), there is currently a simple spectrum display (see picture below), which shows approximately 450kHz of spectrum from LF to 40MHz. This program was written using cygwin, fltk, and fftw. No audio demodulation is available.
John's original Specview (exe only at this moment): specviewOrig.zip
Specview exe as modified by WB4JFI for correct IQ sequence and 76.8MHz oscillator frequency: specviewIQ76 8.zip
VERY TEMPORARILY: Here is a zipped-up file containing the necessary DLL files to run specview. Only cygwin1.dll is needed for John's original specview, but all three are necessary to run WB4JFI's version (because I haven't figured out why the libraries are not added to the main exe file yet). The other two files are cygfltknox_1.1.dll (fltk UI dll) and cygfftw3_3.dll (the fftw dll). Put these files in your c:\Windows\System32 directory.
Zipped dll file: neededDLLS.zip
Note that specview looks for the Digilent USB driver, then a Digilent board, then the SDR hardware, before it actually brings up the GUI. If the GUI does not come up, one of these tests has failed.
Also, in order to get the required Digilent driver, you must go to the Digilent website (www.digilentinc.com) and download Adept 1.x (NOT ADEPT 2.x), from the Nexys2 product page. More detailed instructions will follow. Make sure you use Adept 1x, as version 2.x does NOT work right now.
The Adept version 1.x download also contains information related to the use of dpcutil.lib, which is the host program's interface to the Digilent USB driver.
I have zipped up the source code from John (with a few WB4JFI mods) to build specview.exe. In order to rebuild specview you will need to have a cygwin development environment running on your Windows computer, with many of the development tools (such as "make", GNU C and C++ compilers, ld, etc). FFTW is required to do the fft calculations. You will also need to have FLTK and fluid to modify the GUI code. Unzip nexyssdr.zip into your home directory (for example: c:\cygwin\home\Terry Fox\nexyssdr). If all is well, you should be able to build a new specview.exe by doing "make" in the ./nexyssdr/SDRUI directory. When you build this, you will see a few warnings, especially three about "box" not being used. Ignore them, I am trying to figure out why Adept 2.x does not work.
Here is the specview zipped code: nexyssdr.zip
For Linux (Ubuntu) and GNU Radio, John has created a "nexsdr" signal source, based on the usrp signal source. Therefore, GNU Radio programs, such as the hf_explorer, nbfm, and wbfm, are functional. Note that nbfm can be used to listen to 2M repeaters by subsampling, with a preamp and 2M bandpass filter. wbfm can be used to listen to FM broadcast stations, again using subsampling.
In order to keep this project going, I tarballed up my directory for the Charleston SDR on my Ubuntu Linux laptop. The file should be put in your home directory, for example: /home/tfox/gr-nexsdr_76.8MHz. Then, you will need to do several "makes", which I don't remember at the moment. And, GNURadio plus several other packages need to be installed IN EXACTLY THE RIGHT PLACES. If you get all this correct, a driver for the Nexys2 card will be built and intalled, plus a version of HF_Explorer, NBFM, and WBFM will be in ./src/python. There are scripts to set up proper operation of those programs, that need to be run deom sudo. More as I remember/decode my notes.
The GNURadio Linux tarball: gr-nexsdr 76.8MHz.tar.gz
UPDATE (WB4JFI): As of July 26, 2009, I replaced the 80.0MHz oscillator on my SDR board with one programmed to 76.8MHz. This new frequency allows the various sample rates to be related (evenly divisable). This has cured a number of issues that I have found when trying to use the "standard" audio sample rate of 48kHz. Unless some other issue comes up, I now recommend that an oscillator frequency of 76.8MHz be used. See the next paragraph. This change does not directly affect the FPGA code, but does require changes to the host code, both the Windows specview program and the GNU Radio receivers.
OLD INFO, ABOUT TO BE PURGED: Right now, we are tracking down an issue related to final audio sampling rates. John's code used a 32k final audio sample rate. A laptop that I use for Linux has a Realtek high-definition sound system, which only allows 44.1k, 48k, or 96k sampling. Because of how the various processing sampling rates calculate out, this results in sub-par performance, even if using the GNU radio resampler. For this reason, we are considering a change of the master oscillator on the SDR board from 80.0MHz to 76.8MHz.
more as I get time. Terry, WB4JFI