Simple USB-GPIB interface

USB-GPIB interface

To document a project I wanted to take screenshots from an oscilloscope, but my scope only has a 3.5" floppy drive for data exchange. Finding a floppy drive turned out to be quite hard, my desktop PC has a floppy drive, but it was not connected to the power, and when I hooked it up then I found that the motherboard does not appear to have a floppy connector either.
Finding floppy disks is also getting more difficult — most shops no longer stock them and it seems that there even is a trade in second hand floppy disks on ebay.

For a while I also considered getting a floppy-drive-to-USB interface, but it seems likely that these also suffer problems. Several I noticed will only take SD cards of no more than 2GB, some require Windows software to read the raw data that is recorded on SD card, and some are just really expensive, at €250.


So instead I decided to use the GPIB interface on the scope. This is likely to continue working long into the future, requires no unusual media, and thanks to modern SoCs can be interfaced almost trivially to USB.

My tool of choice was the Atmel Atmega AVR 32U4, a tiny SoC with a USB device interface (used to emulate a serial port in this case) and about 30 I/O pins. The Teensy 2.0 board was used for prototyping, support for the Pro Micro was added later. Unfortunately the Pro Micro does not bring out even one full 8-bit port, so several ports had to be combined in software.

The USB-GPIB was inspired by an Elektor project which uses a PIC device, and by the commercial Prologix controller. The software attempts to emulate this, although it almost certainly does so not very well.

The finished device


The completed device, with behind it a Chinese Pro Micro clone and a Teensy 2.0 (on headers). Despite being slightly smaller the Teensy has a reset button and brings out half a dozen more signals from the 32U4 to connectors.

Plugged in

When plugged in the USB-GPIB is almost completely invisible. Because the box is quite shallow the scope can even be standing on its legs when it is connected.


The first successful hardcopy from the scope:

Putting it together

The USB-GPIB is really just a bunch of wires, and for the Pro Micro version a pull down resistor which the software uses to distinguish it from the Teensy version.
17 wires are needed for the GPIB interface, and another 4 for the USB.

Bill of Materials

The right GPIB connector is not so easy to find, and in the end I settled on a chassis-mounted version instead of the regular version (which would allow thumbscrews to be used). Because the USB-GPIB and its cable is so light-weight this is not a problem.

The total BoM cost is about £20 or $30.


Source code for the firmware and the hardcopy utility is available in a Mercurial repository.
The software is licensed under the GPL, version 2 or later.

Copyright 2014, Kingswood Consulting (UK) Ltd.