gpibgrok
This page documents some ideas and information for a GPIB-USBTMC hardware interface.
NOTE: This project is on hold currently, nobody is working on it.
Motivation
There are many ways to communicate with devices that have a GPIB port, and sigrok aims to support as many of them as possible (see IEEE-488). However in this day and age the only reasonable interface for this would have to use a USB device port, since USB host ports are so ubiquitous. The USB standards include a device class specifically made for test and measurement, called the USBTMC class.
Yet most of the GPIB-USB interfaces available don't use this device class; they typically use either a proprietary protocol or serial emulation. There is only one GPIB-USBTMC interface that we know of: the TEK-USB-444 from Tektronix, and it's ridiculously overpriced at around $740.
We think we can make a GPIB-USBTMC interface that is:
- 100% free and open source, hardware and firmware/software
- 100% standards-compliant
- Considerably cheaper than anything else out there (less than $50)
In addition, since we'd be making essentially a "server-side" i.e. USB device-side implementation of the USBTMC protocol, this code would be reusable in projects such as Das Oszi.
Hardware design
- STM32L0 ARM Cortex M0
- Built-in FS USB with crystaless operation
- Compatible with libopencm3
- 32 pin LQFP keeps size low and assembly easy
- Specialty Trancievers
- TI still makes the SN75160 (data) and SN75161 (handshake)
- High current drive required for logic lines according to GPIB standard
- Directional bundling of pins based on protocol simplfies firmware
- 2 Layer PCB to keep cost low
- Designed to fit in L-COM housing for CIB24S GPIB connector
- Saves effort on custom enclosure
- Current design hosted at Upverter
Firmware
This is more of a TODO list at the moment:
- Start with libopencm3
- Add new class for USB TMC
- GPIB
- Implement functions
- Serial poll
- Write
- Read
- Reset
- Local lockout
- Monitor and handle SRQs
- Implement functions
- Commands
- All data is just passed thru from PC to GPIB device and back, parsing of SCPI or other protocols is not required in firmware
- Firmware update
- Use the DFU bootloader in libopencm3
- Modify to check register for boot flag instead of hardware pin
- Some special command in USB TMC can set to bootloader mode and reset processor, then when DFU is done, set flag back and boot to main
Components
GPIB connectors
- Right-angle, PCB mounted, male:
- Norcomp 112-024-113R001: about $5.5; Mouser (2.80€, but not available ATM), Digikey (4.59€)
- TE Connectivity 5552741-1: about $7.2; Mouser (5.87€, but not available, and minimum quantity required), Digikey (7.50€)
- Straight (no right-angle), PCB mounted, male:
- TE Connectivity / AMP 552283-1: Mouser (4.08€), Digikey (4.51€, but EOL soon? Minimum quantity?)
- Straight (no right-angle), solder-cup, male:
- Norcomp 111-024-103L001: Digikey (2.90€)
- Amphenol 57-20240: Mouser (4.93€) TODO: Typo on page/datasheet, or is this really female?
- Straight (no right-angle), solder, male:
- Norcomp 111-024-113L001: Digikey (4.54€)
- Straight (no right-angle), solder-cup/cable, male:
- Amphenol 57-30240: Mouser (7.19€), Digikey: N/A
- Straight (no right-angle), ribbon cable, male:
- MULTICOMP 5F30240P-10NN-XX: Farnell (2.31€)
GPIB protocol chips
- Philips/NXP HEF4738
- Fairchild 96LS488
- NEC uPD7210C/D
- National Instruments NAT7210: "Drop-In Replacement Chip for NEC µPD7210 Controller" (datasheet)
- National Instruments NAT9914: "Drop-In Replacement Chips for TI TMS9914A Controllers" (datasheet)
- National Instruments TNT4882: "High-Performance, Lower-Cost Single-Chip GPIB Talker/Listener ASIC" (datasheet)
- National Instruments TNT5002: "Single-Chip PCI-to-GPIB Talker/Listener ASIC" (datasheet)
(pretty much all of them are no longer available, or horribly expensive, or hard to get, or a combination thereof)
GPIB transceiver chips
- National DS75160A/61A/62A
- SN75160B: Octal General-Purpose Interface Bus Transceiver (datasheet). Mouser: 1.55€, Digikey (2.33€)
- SN75161B: Octal General-Purpose Interface Bus Transceiver (datasheet). Mouser: 1.45€, Digikey (2.74€)
- SN75162B: Octal General-Purpose Interface Bus Transceiver (datasheet). Mouser: 2.03€, Digikey (2.33€)
Bill of materials
(work in progress)
Qty | Device | Footprint | Value | Refdes | Digikey | Mouser | Comments |
---|---|---|---|---|---|---|---|
1 | ST STM32F103C6T6A | LQFP-48 | ... | ... | 4.54€ | ... | ... |
1 | TI SN75160B | ... | ... | ... | 2.33€ | ... | ... |
1 | TI SN75162B | ... | ... | ... | 2.33€ | ... | ... |
Resources
- Massimiliano Gentile's thesis on writing a USBTMC driver for the AVR32 architecture.
- Hack a Day: GPIB connectivity twofer (covers Galvant GPIBUSB and Sven Pauli's RS232-GPIB interface)
- GPIB connector pinout
Volunteers
Please edit this section with your name and (public) contact details if you are interested in developing this.
- User:Ivan747 (same nick on IRC), experience in hardware, low level firmware (but not USB). Willing to participate with the support from someone experienced in USB protocols on any kind of ARM device. Contact: ivan747[at]users.sourceforge.net.