Homebrew, open source, repurposed, hacked, software defined, open hardware

Sunday, 16 December 2012

JTAG firmware updates on the HPSDR

This guide is really just a set of cheat notes to go along with


First of all, a clean installation of Windows XP SP2

Windows XP also needs:

Windows Imaging Components
Windows Installer 3.1
.NET Framework 1.1

.NET 2.0 SP1
.NET 4.0

for the PowerSDR 2.2.5 (W5WC) installer to be able to proceed

USBIO.exe is also needed

The first time an HPSDR is upgraded, the JTAG programming firmware is loaded into the Ozy board. This only needs to be done once.

After this, Ozy is put in the 2nd slot from the power connector, and the Mercury and Penelope boards are upgraded one after the other in the slot between the power connector and Ozy.

This picture shows where the JTAG jumper (a tan colour) goes on the Mercury-EU receiver:

This photo shows where the jumper goes on Penelope, the 0.5watt exciter:

The batch files for programming need modifying as follows, to accommodate the new version of the Quartus software, which is v12.1

For Program-Penelope-EPCS4.bat the following three blocks of text need to be added:

ECHO  C. Quartus v12.1

IF /I '%Choice%'=='C' GOTO Q121

SET DIRECTORY=c:\altera\12.1\qprogrammer\bin\quartus_pgm

Similarly, for the Program-Mercury-EPCS16.bat the following six additions are needed:

ECHO  C. Quartus v12.1

IF /I '%Choice%'=='C' GOTO Q121

SET DIRECTORY=c:\altera\12.1\qprogrammer\bin\quartus_pgm

ECHO Oeu. Program using Mercury_eu_v3.3

IF /I '%Choice%'=='Oeu' GOTO ItemOEU

%DIRECTORY% -c USB-Blaster mercury_EU_v3.3.cdf

Finally, the Mercury programming batch file expects a .cdf file for the Mercury EU board, and this can be easily created by modifying the TAPR Mercury .cdf file in a text editor to contain the file name for the Mercury EU firmware.

These files should be updated in due course on the svn, eliminating the need for modifications.

Saturday, 8 December 2012

A gEDA PCB pad without a solder mask - HOWTO

While designing with the OSS gEDA toolsuite for pcb design, I found myself with a pcb with an AVR micro destined to have an Arduino serial bootloader installed.

I needed to figure out a simple way to create a row of six pogo pin pads on the PCB to allow in circuit programming.

The difficulty arises when trying to create what is effectively a row of pads without a solder mask in gEDA.

Normally, the only way to have a soldermask clearance around a pin or pad is for it to be an element itself, or part of an element.

Despite multiple attempts, based on mailing list hints found with google, I could not turn a polygon or track into an element via the "select", "cut to buffer", "convert buffer to element" process one can use for a via.

A simpler solution was found in the document "Footprint creation for the
open­source layout program 'PCB' " by Stephen Meier and Stuart Brorson:

Currently found at:


The solution was to create a footprint comprising a row of six pads, in which the clearances could be easily specified.

The example provided for an 0805 SMT resistor:

Element["" "" "" "" 1000 1000 -1000 -1000 0 60 ""]
Pad[-3000 0 -3000 0 4000 1200 4600 "" "1" "square"]
Pad[3000 0 3000 0 4000 1200 4600 "" "2" "square,edge2"]
ElementLine [-5000 -3750 6250 -3750 600]
ElementLine [6250 -3750 6250 3750 600]
ElementLine [6250 3750 -5000 3750 600]
ElementLine [-5000 3750 -6250 2500 600]
ElementLine [-6250 2500 -6250 -2500 600]
ElementLine [-5000 -3750 -6250 -2500 600]

was modified to the following, based on my 40mil wide tracks and 100mil track spacing:

Element["" "" "" "" 1000 1000 -1000 -1000 0 60 ""]
Pad[-3000 0 -3000 0 8000 1200 10000 "" "1" "square"]
Pad[7000 0 7000 0 8000 1200 10000 "" "2" "square"]
Pad[17000 0 17000 0 8000 1200 10000 "" "3" "square"]
Pad[27000 0 27000 0 8000 1200 10000 "" "4" "square"]
Pad[47000 0 47000 0 8000 1200 10000 "" "5" "square"]
Pad[57000 0 57000 0 8000 1200 10000 "" "6" "square,edge2"]


and then saved as "PogoPads.pcb"

Then, in PCB, one can use "File" -> "Load element data to paste buffer"

and proceed to load and place the saved pogopad footprint over the 100mil spaced trackwork where the row of six pogo pin pads was desired (after using the TAB key to flip the PCB over, allowing the pogo pads to be placed on the solder side of the board):

In this case I have made the 6 pogo pin footprint seven pads in length, to keep the +5V centred on the row of pads, in an effort to avoid possibly expensive reverse polarity mistakes in the event of a hand held pogo pin programming tool being used the wrong way round.

I then added a via in the gap between the 4th and 5th pogo pads to act as an alignment aid for the pogo pin tool/jig, in case I find that it is required or useful.

The keen eyed will see the nearby, six pin, in circuit programming header which will be the alternative means of programming the board, and the row of pins for the AVR and decoupling cap just below the newly placed pogo pin pads.

And here's a top side view of the same bit of the board:

The pogo pads are just visible on the bottom side.

For those wondering what pogo pins are, they are spring loaded pins held in a jig that can be pressed against pads on a target PCB, allowing testing or in circuit programming to be done without a bulky or expensive programming header being needed.

This technique should also work for transmission lines.

UPDATE: here are some pictures of the final result. The PCBs were done by Mitch, at Hackvana. You can compare the final product with the gEDA screenshots above. Note also that by doing lands this way gEDA will generate a solder stencil containing the lands. You can ditch the solder stencil gerber if you do not need a solder stencil. Alternatively, generate your required solder stencil gerber file before adding the lands.