Skip to main content

Posts

Showing posts from 2005

New Job

New Job:I start a new position with the OhioStateUniversity Department of Astronomy in the Imaging Sciences Laboratory on Monday December the 19th. This marks the end of my 5 year stint as a factory automation consultant. I learned a lot in those five years, but I am glad to be moving to something new, interesting, and challenging.

Before going out on my own as a consultant, I worked as an Electrical Engineer with a Department of Defense contractor in the 1980s and early 90s. The company was Piqua Engineering, Inc. - I worked there for 10 years. After PEI a few former employees and I started a company called Technitron Labs, Inc. TL's main product was specialized instrumentation for paper mills, municipal waste and drinking water treatment plants, and industrial water treatment plants. TL was sold after a few years (along with my designs); I moved on to doing Controls Engineering at a company called Zed Industries, Inc. Zed made packaging machinery and thermo-formers. I spe…

Update... HPSDR

HPSDR Progress:
I am now able to configure the Spartan 3 FPGA over USB. I switched from slave parallel mode to slave serial configuration loading. This will make the FX2 firmware easy to use with Altera Cyclone FPGAs in addition the the Xilinx Spartan 3.

I am in the process of getting samples of Linear Technology's LTC2208 16 bit, 135 MSPS ADC. I still plan to develop a QSD based RX board using the TI PCM4202 as the ADC - So there will be a high bandwidth path as well as a low bandwidth path in the HPSDR. The LTC2208 board will probably get it's own FPGA to do DDC. The DDC's ouput will then feed the Spartan 3 which will be responsible for performing the second part of the DSP chain.

Verilog Projects for the Xylo Board:
I set up a folder on my server that people can browse . It will contain various verilog projects that can be tried on the Xylo board for educational purposes.

http://www.philcovington.com/FPGA/

Microscope for SMT

Here are a few pictures of an early Birthday present from my wife:





The 10x magnification makes it perfect for soldering and inspecting smt. I was able to hand solder the 208 pin 0.5mm pitch Xilinx Spartan 3 FPGA used on my HPSDR board in under 5 minutes which included inspecting each pin. If you do any serious smt work at all, you may want to consider purchasing a similar microscope. I was amazed at the difference it made in speed and comfort while working with fine pitch parts. (Price is about $214 + shipping).

Some notes on soft real-time under Linux 2,6...

Linux 2.6 Kernel:

With the 2.6 kernel, a large step was taken to improve Linux's real-time capabilities. The improvements are a result of two major changes in the kernel (as well as many minor changes):

1. Kernel preemption. Before 2.6 the scheduler was able to preempt threads running in user mode, but when the thread made a system call that caused a context switch to kernel mode there was no way for the thread to be preempted. This situation could cause a high-priority thread that was ready to run to be blocked by a lower priority thread inside a system call. With 2.6, the kernel can now be preempted.

2. Constant time scheduler. Prior to version 2.6, the time that it took for the scheduler to decide which thread to run depended on how many threads that were currently running on the system. The more threads on the system, the more time it took the scheduler to make a decision. In version 2.6, the scheduler makes the decision in the same amount of time whether there are 1 thre…

Schematic and PCB software update

Recently I came across the open source Kicad project. I had evaluated DipTrace which is inexpensive but it is not open source. I then worked with the open source gEDA tools which were ok.

Kicad looks very promising: http://www.lis.inpg.fr/realise_au_lis/kicad/

It is cross platform and uses wxWindows. It is much more polished than the gEDA tools. The file formats are all well documented which make adding symbols very easy using a python script. Kicad's source code build process stinks but fortunately there are binaries available. When I get a chance I will look into creating a Visual Studio project for Kicad so it can be built more easily on Windows.

Modified QSD Circuit

R1 represents the signal source impedance, in this case 200 ohms. If R2 is 4 x 200 ohms = 800 ohms the conversion loss is the same as a single switch with signal integrating capacitor driven by a 25% duty cycle clock. If the clock's duty cycle is increased to 50% the circuit shows some conversion gain. One side of the switch is now effectively grounded (virtual gound of the opamp). The next thing would be to investigate increasing the source impedance that each switch sees.

Below is a two switch model with LT1115 op amps:

QSD Simulation

Below is a plot of a model of a two switch QSD circuit. It shows voltage gain in dB vs switch on time. The input frequency is 10.005 MHz. The sampling clock period is 100 nS (10.000 MHz).





Below is a plot of a model of a four switch QSD circuit. It also shows voltage gain in dB vs switch on time. The input frequency is 10.005 MHz. The sampling clock period is 100 nS (10.000 MHz).



The model that I used can be downloaded here. You will need Linear Technology's SWCAD program to run it.

An Excel spreadsheet containing the above data can be downloaded here.

The interesting part about the above data is that the QSD seems to have the most gain when the sampling clock on time is about 20 - 25% of its period. This seems to be true in all the different models (ideal and real switches) and configurations (balanced, sinngle ended) that I have tried. Phil Harmon, VK6APH, I believe has also found this to be true in his modeling. So a 50% duty cycle clock does not seem to be beneficial.

SharpDSP Mini Console running on Linux

Click on the picture to see a full size version

SharpDSP Mini Console with Analog Meter

I have added an analog meter to the SharpDSP Mini Console. I borrowed the image from meterpanel. The scale on the meter is not calibrated. You can substitute your own meter face image in place of the default image. Here are the details of the meter face image:

Size: 220 x 220 pixels
Type: png, gif, jpeg, bmp, tiff
Origin of the image is 0,0 at top - left hand corner of the image

The image file should be placed in the SharpDSPMiniConsole folder.

Here is the important part of the softrock.config.xml file relating to the meter:


AnalogMeterImageName is the file name of the meter face image.AnalogMeterCorrection is the correction factor in dBm to apply to the analog meter reading. It defines the zero point - here it is set for -130 dBm.AnalogMeterNeedleLength defines the length in pixels of the needleAnalogMeterMinAngle defines the angle of the end of the needle pointer in relation to vertical (defined as needle pointing straight up - zero degrees) when the meter is at it's minimum scale re…

Some notes on the SharpDSP Mini Console...

SharpDSP Mini Console for the SoftRock:



It is available on my website at http://www.philcovington.com/SDR.html

Center Frequency Calibration Procedure:

The SharpDSP Mini Console allows you to set any desired center frequency. For the standard SoftRock 40 the center frequency is 7.056 Mhz. To get an accurate frequency display you will need to calibrate this setting. Here is how I did it:

I set my HP8640B signal generator to 7040 kHz. I moved the low filter slider to -2000 Hz and the high filter slider to +2000 Hz. I then selected SSB/DSB/CW from the Mode menu. I then moved the frequency tuning slider until I got zero beat on the 7040 kHz signal. This occurred around 7046 kHz on my SoftRock 40. I then clicked on the Setup->Center Freq menu. The text box showed that the software was set for a center frequency of 7056 kHz (7056000). Using the fine tuning slider I adjusted the displayed frequency (at the bottom of the screen above the frequency tuning slider) until it read 7040000 - exactly …

Additional info on the HPSDR project...

Hi all,

This is a response to a few questions that someone posted on my blog
page requesting more info about the project. I have copied it here
since it kind of gives a quick outline of where I am going:

--------------------------------------------------------------------
I saw your comment on my blog page. Thanks for the link.

I am using libusb-win32 which is a port of the open source libusb
project for Linux. My intention is to use the libusb API since it is
the same on Windows as it is on Linux. On Windows is consists of a
device driver and a interface DLL. They have an inf file generator
that will create an .inf file for your device. I am having very good
luck with libusb.

I have written a C#.NET library to interface to the libusb-win32 DLL.
It works under the Mono framework in both Windows (using the
libusb-win32 driver and DLL) and Linux (using the libusb shared
library). It is pretty cool to be able to write software and have it
work without recompiling on both Win and Linux platforms.

For the …

Soldering...

Here is the soldering station that I use (older Weller EC2001):



And the tip:




A Hakko 936 is the backup:

http://www.kiesub.com/hakko936.htm

(thanks to Ken N9VV for the link)

Boards and design files:

I do plan on offering boards from bare to fully assembled for this project. All of the design files will be available for those who wish to make their own boards. This is both a open hardware and software project. It will support both Windows 2k/XP and Linux.

Some Test Code for the FX2 using SDCC:

http://www.philcovington.com/SDR/files/flash2.html

It Runs...

I was able to download the initial firmware into the FX2 microcontroller on the FPGA_USB board today and run a test program. I then recompiled the program with the open source SDCC and got it to run (the initial code was compiled with the Keil evaluation package from Cypress' site). After testing the FX2 a little further I will solder the FPGA onto the board and start developing the code for it. So far there have been no major problems...

HPSDR_FPGA_USB Board Update

Here is a picture of the FPGA_USB board after soldering most of the components:



Yet to be soldered is the FPGA, USB connector, and connection headers.

I soldered all of the components by hand. Soldering the 128 pin 0.5mm pitch Cypress FX2 microcontroller was much easier than I thought it would be. I need a little more magnification than the Bausch and Lomb 3.5x eye loupe has. I also have a Luxo magnifying fluorescent light that I use when soldering the other components. I am thinking about getting a 7x Bausch and Lomb loupe that clips onto glasses for soldering the 0.5mm pitch stuff. There is a seller on Ebay that sells stereo microscopes on a boom arm for about $260 that would be nice.

Basically I spread a lot of flux on the pads for the FX2 chip, tacked down the pins in the corners to keep the chip in place, and then proceeded to solder the pins using a drag technique with a conical tip on the Weller EC2001 soldering station. I then inspected each pin by lightly pushing sideways with a…

The HPSDR FPGA_USB Boards Have Arrived

HPSDR FPGA_USB Boards:

The HPSDR FPGA_USB boards showed up today. I sent the design files off last week to PCBExpress and UPS delivered them today. They are 4 layer boards with silk screen and solder mask.

You can see some pics here:

http://www.philcovington.com/SDR/hpsdr_fpga_usb_board.html





Next I get to have fun soldering the 0.5mm pitch ICs...

Last time I reported that there was a long back order for the XILINX FPGA. Instead of 3-4 weeks as quoted I received my order in about 2 weeks. So I do have all of the components in hand.

I have had many emails from people asking me for more details on the FPGA_USB board. I plan to put up much more information on my website soon. Right now I need to concentrate on getting the prototype boards build up and debugged.

Real time Linux:

I decided to build a Linux From Scratch (LFS6.1) distro to patch with the latest from RTAI which is fusion-0.9. RTAI Fusion uses the ADEOS nanokernel. I got it done just before the boards arrived. It was a great learnin…

Short Update

HPSDR_FPGA_USB MainBoard:

I now have almost 100% of the parts for the board and have verified my PCB layout with the QFP208 pattern used by the Xilinx XC3S400 FPGA. I will immediately send the board design files out to be made. It is a 4 layer board measuring 5"x6" with top side silk screen and top/bottom solder mask. All components are on the top side. The most difficult SMT components are the FPGA (QFP208, 0.5mm pitch) and the Cypress FX2 chip (QFP128, 0.5mm pitch). Resistors are all 0805 size and caps are 0805 and 1210 sizes.

The only part that I do not have is the Xilinx XC3S400 FPGA. It is on backorder for 3-4 weeks (or so they claim). It seems that there are just no Spartan 3 chips available right now. What is the problem Xilinx???

Mono:

I have been doing a little work with using mono on Windows and Linux. I was able to compile SharpDSP using SharpDevelop targeting the mono runtime and mcs compiler. I compiled SharpDSP into a library (dll) then copied it over t…

FPGA_USB Board, DipTrace, and Mono

FPGA_USB Board and DipTrace:

I have been using a program called DipTrace to do the schematics and board layout for the FPGA_USB board. After completing my first PCB layout with DipTrace I am very impressed with this program. Questions to the developers are answered very quickly. It has a very intuitive user interface and small learning curve. I had to create a few patterns for smt components that were not in the supplied libraries - the pattern editor is very easy to use. I highly recommend this software if you are looking for a powerful, yet low cost schematic entry/PCB design program. You can download a 30 day evaluation at http://www.diptrace.com

The FPGA_USB board design is now complete. I have ordered the parts for the prototype boards and will soon send the design files to the board house to have the PCBs made. I will post more details about the project soon.

Mono:

I have been doing a little work with Mono (http://www.mono-project.com) on both Windows and Linux. It is very impressiv…

Just an update

SharpDevelop:

There is a new build of SharpDevelop available at:

http://www.icsharpcode.net/OpenSource/SD/

Not a lot of changes - just bugfixes...

DipTrace:

Check out this new low cost Schematic Editor/PCB Layout program at:

http://www.diptrace.com

I have tried Eagle, PCBExpress, and others... DipTrace has then all beat in ease of use. You can dowload a fully functional 30 day trial from the website. Or there is a freeware version also. The developers are very responsive to suggestions for features/improvements. I highly recommend this software.

SoftRock40:

I received the SoftRock40 with PCM2900 CODEC from Tony Parks this weekend. I will start on modifying the SharpDSP enabled console to make a specific release for the SoftRock40. I will also correct the sample offset bug in the PCM2900 CODEC.

FPGA/USB Board:

I am in the process of laying out the PCB. I am using DipTrace for the Schematic entry and PCB layout. This will become a open source hardware/firmware SDR project. Stay tuned to my website…

SDR mini-itx project update

Here is an update on my mini-itx/SDR project:

I have been working out the details of the A/D – D/A board.I have decided to use the TI PCM4202 (24 bit, 192 kHz, stereo) for the RX A/D.For the TX A/D and RX/TX D/A I am going to use the TI TLV320AIC23B CODEC (24 bits, 8-98 kHz, stereo, with integrated mic amp and headphone driver). The PCM4204 will be dedicated to RX only.The TLV320AIC23B will handle the microphone input for TX as well as the IQ output for TX and the audio output for RX (in the stand alone configuration).

Both chips have digital audio interfaces (I2S, left, right justified, etc…) so I have the problem of getting that data into the PC via USB2.0.I looked at the Cypress EZ-USB FX2 CY7C68013 microcontroller for this but it cannot handle the transfer on its own.I decided to use a Xilinx FPGA in addition to the EZ USB FX2 for the I2S to parallel conversion (inspired by the USRP and SSRP projects of GnuRadio). The EZ USB FX2 will operate in slave FIFO mode to get the data/to fro…

Are you a computer simulation?

Someone emailed me about my webpage at: http://www.philcovington.com/comp.html to ask if I really believed we are living in a computer simulation. He was referring to the paper by Bostrom titled "Are You Living In A Computer Simulation? ". No, I do not believe we are living in a computer simulation. It is an interesting paper though.

I think that Ed Fredkin's Digital Philosophy (http://www.digitalphilosophy.org) is probably closer to what underlies reality.

SoftRock 40 & Reorganized website

SoftRock 40

I got Tony Park's SoftRock 40 playing today with Bill KD5TFD's modified PowerSDR console. It is amazing what can be done with such a small board. I want to revive the SharpDSP enabled console for use with the SoftRock 40. I will strip out all of the unneeded controls and functionality in the PowerSDR console to make it specific to the SoftRock 40. This will clear up some screen real estate so I can widen the Panadapter window to show all 48 or 96 kHz of bandwidth at once in the Panadapter.

When the PCM2900 codec boards become available I will modify SDRAudio to correct for the sample offset problem in the PCM2900.

Website

I reorganized my website today. The website notes were archived and links to the various software projects were rearranged to make it easier to find a specific item.

New SDR Project

A few people have mentioned in the past about
wanting to use a small motherboard like mini-itx or micro-atx to run
PowerSDR with the SDR-1000 to make a small self-contained unit
possibly using a small LCD panel display. That was one of the things
on my project list that I wanted to do also. Now that I have started
thinking about it again I decided to try a variant of this idea and
have had encouraging success so far just playing around with it.

I wanted to try to dedicate a mini-itx board to the DSP, CW keyer, and
hardware control of the SDR-1000 using real-time Linux (RTAI
http://www.rtai.org/). I am trying to see how feasible it is to run
the DSP (based on the DttSP code) and hardware control code in hard
real time under RTAI. The RTAI patched linux kernel with DSP and
hardware control code loads from a compact flash card to make it a
diskless system (I have it down to under 16 MB now). I'd also like to
come up with a A/D D/A add on board that will use a chip like the
Wolfson WM8786 24 bi…

Screen Capture Software

I have been trying out various screen capture software that I hope can be used for software demonstations and tutorials. The first I looked at is Camtasia (http://www.techsmith.com). It is nice for creating software tutorials. Next I looked at Macromedia's Captivate (http://www.macromedia.com/software/robodemo/). It has a lot of avantages and I think I prefer it over Camtasia. Unfortunately it costs about twice what Camtasia costs, but I think it is worth it. I will post a test demo using Captivate to see how it plays with users. It saves files in Shockwave format.

I will probably do the software tutorials inside a VMWare Workstation 5 instance. My screen resolution is 1280x1040 so I need to do the demos within a smaller screen area... probably 1024x768 since this is the smallest common size on laptops as well as most desktops. I can also undo changes easily using VMWare's snapshot and cloning features. VMWare Workstation 5 also has a movie recorder mode where you ca…

vCOM Build 226 released

Build 226 of the vCOM virtual serial port driver is released.

As I said in an earlier note, I had two reports from two different users that the vCOM driver would cause intermittent system freezes. One one system it happened only a few times and on the other system it happened very often. The system that had frequent system hangs was a hyper-threaded box. There can be only a few causes of system freezes and deadlock is the most likely in multiprocessor and hyperthread systems. I had a race condition caused by excessive use of spinlocks resulting in a deadlock. The probablity of the deaklock happening is much higher in a multiprocessor/hyperthreaded system. This is corrected in build 226.

Important: You will need to edit the N8VBvCOM.inf file to match your current inf file before updating the driver. Once you have the inf edited you can run the update.bat file to update the driver.

vCOM Build 224 released

Build 224 of the vCOM virtual serial port driver is released.

There were two reports by two different people that vCOM build 222 would hand their system. Not BSOD, but just freeze. I have adjusted the thread priorities in build 224 out of the real-time range where they were set in build 222. I think that perodically the threads priority would be boosted above the GUI's thread priority causing a deadlock.

Important: You will need to edit the N8VBvCOM.inf file to match your current inf file before updating the driver. Once you have the inf edited you can run the update.bat file to update the driver.

vSOUND progress - vCOM info

I overcame a major hurdle today in the development of the vSOUND virtual sound card driver. If you are familiar with WDM Audio drivers you know that the portcls.sys driver exposes functions for creating, registering, and managing WDM Audio drivers. Unfortunately for our application the PcXXX functions hide much of the internal workings of the audio driver. For our vSOUND virtual sound card driver we need to be able to send customs IOCTLs to read and write data to the driver's buffers that represent the virtual A/D input and D/A output of the sound card.

In the typical sound driver you will see something like this:

extern"C" NTSTATUS
DriverEntry
(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPathName
)
{
NTSTATUS ntStatus;

ntStatus =
PcInitializeAdapterDriver
(
DriverObject,
RegistryPathName,
AddDevice
);

return ntStatus;

}
The call to PcInitializeAdapterDriver() causes PortCls.sys to load pointers
to handlers for the certain IRPs like IRP…
Ken, N9VV reported an error in PowerSDR 1.3.13 where opening a serial port after it had already been opened and then closed would cause an exception. The serial port will remain unavailable until PowerSDR is exited and then restarted.

Using PortMon, I immediately saw the error: I was trying to close the handle to the com port without first cancelling a WaitCommEvent(). The file handle to the com port would only be closed when PowerSDR exited.

The correction to the source code was pretty easy:

In SerialStream.cs line 1383, function FreeHandle needs to be changed to:




protectedinternaloverridevoid FreeHandle(IntPtr handle)
{
if (_ownsHandle)
{
//Important! Must cancel all events before closing file!!!
Win32API_Serial.SetCommMask(handle, 0);
//Now we can close the file handle
Win32API_Serial.CloseHandle(handle);
}
}

Calling SetCommMask() with a mask of 0 cancells the current WaitCommEvent() allowing the com port to be closed and correcting the problem.

My new blog

This is the first entry in my blog. I realized that I was basically blogging on my webpage in the Notes section. This caused people to have to search through all the notes for important installation and configuration information about the software. So, now all comments about what I am working on will be posted here and removed from the webpage. Check here for the current status of the vCOM driver, vSound driver, and any other PowerSDR code updates.

Currently I am working on a fix for a problem in the PowerSDR CAT serial code that causes an exception as reported by Ken, N9VV.

Also, I am working on the vSound virtual sound card driver. I will use choice #2 for the implementation as described on my webpage. This will avoid having to use PortAudio in PowerSDR to talk to the virtual sound card.

vSound Ideas

I started to take a look at creating a virtual sound card driver for use with PowerSDR. Here are two ways that I thought about doing it:



In the above figure we create two virtual sound card instances. They are virtually hooked together as depicted above. The advantage is that they appear to each application as a sound card so MME and DS can be used in both programs.



In the above diagram, the driver creates one virtual sound card device and the third party program talks to it as normal using MME or DS.

PowerSDR talks to the driver using normal file read/write IO and custom IOCTL commands instead of through PortAudio's MME or DS.

Which one is preferred? Comments: Email Me
I have a preliminary serial to TCP bridge app. Here are some screenshots:

(click on the image for a full size version)



In the image above PowerSDR's TCP Listener is enabled to listen for connections on port 4444 as in the notes for June 28, 2005 below.

I have two pairs of vCOM ports enabled: The first pair is COM4 and COM5, the second pair is COM6 and COM7.

The Serial To TCP Bridge app connects the virtual com ports to TCP. The app connects to PowerSDR as a client on port 4444.

In the screenshot above HRD is set to connect to COM5. MixW is set to connect to COM7. In the Serial To TCP Bridge app above, COM4 and COM6 are set to bridge to TCP port 4444. Refer to the screenshot below:



The IP Address is the address of the computer where PowerSDR is running. It can be an IP address or a machine name (or "localhost").

The TCP Port Number must be the port that the PowerSDR TCP Server is listening to for connections (here 4444).

COM Port 1 is the virtual com port that you want to b…
I have added preliminary support for TCP in an experimental version of PowerSDR1.3.12. Here are a few screenshots:

(click on the image for a full size version)



The windows titled "TestClient" is just a fast app I wrote to test the CSocketClient and CSocketServer classes that I wrote. I am using it to send and receive to/from PowerSDR. The four windows represent four different simultaneous connections to PowerSDR.

I added a few items to the setup form:



You can enable either CAT via Serial or TCP or both. For TCP you can set the maximun connections allowed and which port number the TCP server listens to for connections from clients.

I used an umodified PowerSDR 1.3.12 as a base so the new serial port code is not in it. This was just for testing purposes though. As Bill, KD5TFD brought up in an email conversation, we will probably have to serialize access to the PowerSDR CAT and a good place might be in the command parser.

The TCP stuff will probably not be integrated i…
I wanted to add some additional fixed filter buttons to PowerSDR as well as two sliders for setting the filter low and filter high for the variable filters. PowerSDR is running out of room for all these "enhancements" so I added a tabbed control to the filter selection section of the screen to try to get some more room. See below:





When you select either one of the Var buttons on the Fixed Tab it automatically takes you to the Variable tab.

Oh, the above console has not been calibrated with my signal generator yet...

Can we gain some more room by putting some of the other controls on tabs? Comments, suggestions, hate mail: Email Me
Build 222 of the vCOM virtual serial port driver is released.

New Features:

Build 222 will now allow you to create up to 10 virtual com port pairs. Each pair acts like a virtual null modem cable.

By default, the inf file that comes with the download will create 1 pair (COM4 and COM5) by default. To change there settings you have to edit the inf file as follows:

Look for the section titled "Localizable Strings"

-------------------------------------------------------------------------------
; *******Localizable Strings*******
N8VB= "N8VB vCOM"
Desc_x860= "N8VB vCOM MultiportSerialdrivers"
N8VBvCOMDesc= "N8VB vCOM Virtual Serial Port Driver"

;NOTE: Edit the following to change com port number and amount of paired ports

;Number Of Pairs
;************
PAIRS=0x01
;PAIRS=0x02
;PAIRS=0x03
;PAIRS=0x04
;PAIRS=0x05
;PAIRS=0x06
;PAIRS=0x07
;PAIRS=0x08
;PAIRS=0x09
;PAIRS=0x0A
;NOTE: MAX is 10 pairs

;Pair 1
;************
PORT1="COM4"
PORT2="COM5"

;Pair 2
;*******…