Difference between revisions of "Gpibgrok"

From sigrok
Jump to navigation Jump to search
m (Copy edited (e.g. ref. https://en.wikipedia.org/wiki/Transceiver and https://en.wikipedia.org/wiki/Digi-Key).)
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{lowercase}}
{{lowercase}}
This page documents some ideas and information for a GPIB-USBTMC hardware interface.
This page documents some ideas and information for a GPIB-USBTMC hardware interface.
<div style="background-color:#ff6666">
NOTE: This project is on hold currently, nobody is working on it.
</div>


== Motivation ==
== Motivation ==
Line 22: Line 18:


* STM32L0  ARM Cortex M0
* STM32L0  ARM Cortex M0
** Built-in FS USB with crystaless operation
** Built-in FS USB with crystal-less operation
** Compatible with libopencm3
** Compatible with libopencm3
** 32 pin LQFP keeps size low and assembly easy
** 32 pin LQFP keeps size low and assembly easy
* Specialty Trancievers
* Specialty transceivers
** TI still makes the SN75160 (data) and SN75161 (handshake)
** TI still makes the SN75160 (data) and SN75161 (handshake)
** High current drive required for logic lines according to GPIB standard
** High current drive required for logic lines according to GPIB standard
** Directional bundling of pins based on protocol simplfies firmware
** Directional bundling of pins based on protocol simplifies firmware
* 2 Layer PCB to keep cost low
* Two-layer PCB to keep cost low
* Designed to fit in L-COM housing for CIB24S GPIB connector
* Designed to fit in L-COM housing for CIB24S GPIB connector
** Saves effort on custom enclosure
** Saves effort on custom enclosure
Line 38: Line 34:
This is more of a TODO list at the moment:
This is more of a TODO list at the moment:
* Start with libopencm3
* Start with libopencm3
** Add new class for USB TMC
** Add new class for USBTMC
* GPIB
* GPIB
** Implement functions
** Implement functions
Line 52: Line 48:
** Use the DFU bootloader in libopencm3
** Use the DFU bootloader in libopencm3
** Modify to check register for boot flag instead of hardware pin
** 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
** Some special command in USBTMC can set to bootloader mode and reset processor, then when DFU is done, set flag back and boot to main


== Components ==
== Components ==
Line 59: Line 55:


* Right-angle, PCB mounted, male:
* Right-angle, PCB mounted, male:
** Norcomp 112-024-113R001: [http://octopart.com/partsearch#search/requestData&q=Norcomp+112-024-113R001 about $5.5]; [http://de.mouser.com/ProductDetail/NorComp/112-024-113R001/?qs=IGgAdOvCTsSdej4q2f%2fo5Q%3d%3d Mouser] (2.80&euro;, but not available ATM), [http://www.digikey.de/product-search/de?x=0&y=0&lang=de&site=de&KeyWords=112-024-113R001 Digikey] (4.59&euro;)
** Norcomp 112-024-113R001: [http://octopart.com/partsearch#search/requestData&q=Norcomp+112-024-113R001 about $5.5]; [http://de.mouser.com/ProductDetail/NorComp/112-024-113R001/?qs=IGgAdOvCTsSdej4q2f%2fo5Q%3d%3d Mouser] (2.80&euro;, but not available ATM), [http://www.digikey.de/product-search/de?x=0&y=0&lang=de&site=de&KeyWords=112-024-113R001 Digi-Key] (4.59&euro;)
** TE Connectivity 5552741-1: [http://octopart.com/partsearch#search/requestData&q=TE%20Connectivity%205552741-1 about $7.2]; [http://de.mouser.com/ProductDetail/TE-Connectivity-AMP/5552741-1/?qs=ZDXmSm13592KDB5YbnOqGQEXH8vBFTre66B%2ffSd9ajU%3d Mouser] (5.87&euro;, but not available, and minimum quantity required), [http://www.digikey.de/scripts/dksearch/dksus.dll?vendor=0&keywords=5552741-1 Digikey] (7.50&euro;)
** TE Connectivity 5552741-1: [http://octopart.com/partsearch#search/requestData&q=TE%20Connectivity%205552741-1 about $7.2]; [http://de.mouser.com/ProductDetail/TE-Connectivity-AMP/5552741-1/?qs=ZDXmSm13592KDB5YbnOqGQEXH8vBFTre66B%2ffSd9ajU%3d Mouser] (5.87&euro;, but not available, and minimum quantity required), [http://www.digikey.de/scripts/dksearch/dksus.dll?vendor=0&keywords=5552741-1 Digi-Key] (7.50&euro;)
* Straight (no right-angle), PCB mounted, male:
* Straight (no right-angle), PCB mounted, male:
** [http://www.te.com/catalog/pn/en/552283-1 TE Connectivity / AMP 552283-1]: [http://de.mouser.com/ProductDetail/TE-Connectivity-AMP/552283-1/?qs=L%252bK8JgcrFouKshZpXbu%2foxXjsnB6QVdhWc5JSE3CA%2fU%3d Mouser] (4.08&euro;), [http://www.digikey.de/scripts/dksearch/dksus.dll?vendor=0&keywords=552283-1 Digikey] (4.51&euro;, but EOL soon? Minimum quantity?)
** [http://www.te.com/catalog/pn/en/552283-1 TE Connectivity / AMP 552283-1]: [http://de.mouser.com/ProductDetail/TE-Connectivity-AMP/552283-1/?qs=L%252bK8JgcrFouKshZpXbu%2foxXjsnB6QVdhWc5JSE3CA%2fU%3d Mouser] (4.08&euro;), [http://www.digikey.de/scripts/dksearch/dksus.dll?vendor=0&keywords=552283-1 Digi-Key] (4.51&euro;, but EOL soon? Minimum quantity?)
* Straight (no right-angle), solder-cup, male:
* Straight (no right-angle), solder-cup, male:
** [http://www.norcomp.net/rohspdfs/SCSI-050Ribbon/11Y/111/111-YYY-103L001.pdf Norcomp 111-024-103L001]: [http://www.digikey.de/product-detail/de/111-024-103L001/1024MA-ND/955139 Digikey] (2.90&euro;)
** [http://www.norcomp.net/rohspdfs/SCSI-050Ribbon/11Y/111/111-YYY-103L001.pdf Norcomp 111-024-103L001]: [http://www.digikey.de/product-detail/de/111-024-103L001/1024MA-ND/955139 Digi-Key] (2.90&euro;)
** [http://www.amphenolcanada.com/ProductSearch/drawings/AC/5720240.pdf Amphenol 57-20240]: [http://de.mouser.com/ProductDetail/Amphenol-Commercial-Products/57-20240/?qs=9QC6KritiMlxI%2fbOR6fN8o%2fx9VH%2fvGRssdGjBll89tQ%3d Mouser] (4.93&euro;) TODO: Typo on page/datasheet, or is this really female?
** [http://www.amphenolcanada.com/ProductSearch/drawings/AC/5720240.pdf Amphenol 57-20240]: [http://de.mouser.com/ProductDetail/Amphenol-Commercial-Products/57-20240/?qs=9QC6KritiMlxI%2fbOR6fN8o%2fx9VH%2fvGRssdGjBll89tQ%3d Mouser] (4.93&euro;) TODO: Typo on page/datasheet, or is this really female?
* Straight (no right-angle), solder, male:
* Straight (no right-angle), solder, male:
** [http://www.norcomp.net/rohspdfs/SCSI-050Ribbon/11Y/111/111-YYY-113L001.pdf Norcomp 111-024-113L001]: [http://www.digikey.de/product-detail/de/111-024-113L001/1024PMA-ND/955147 Digikey] (4.54&euro;)
** [http://www.norcomp.net/rohspdfs/SCSI-050Ribbon/11Y/111/111-YYY-113L001.pdf Norcomp 111-024-113L001]: [http://www.digikey.de/product-detail/de/111-024-113L001/1024PMA-ND/955147 Digi-Key] (4.54&euro;)
* Straight (no right-angle), solder-cup/cable, male:
* Straight (no right-angle), solder-cup/cable, male:
** [http://www.amphenolcanada.com/ProductSearch/drawings/AC/5730240.pdf Amphenol 57-30240]: [http://de.mouser.com/ProductDetail/Amphenol-Commercial-Products/57-30240/?qs=2ZPlowQld1N7RBj5X0pv8db%252b15EhuRSLDpapiRNYO6M%3d Mouser] (7.19&euro;), Digikey: N/A
** [http://www.amphenolcanada.com/ProductSearch/drawings/AC/5730240.pdf Amphenol 57-30240]: [http://de.mouser.com/ProductDetail/Amphenol-Commercial-Products/57-30240/?qs=2ZPlowQld1N7RBj5X0pv8db%252b15EhuRSLDpapiRNYO6M%3d Mouser] (7.19&euro;), Digi-Key: N/A
* Straight (no right-angle), ribbon cable, male:
* Straight (no right-angle), ribbon cable, male:
** MULTICOMP 5F30240P-10NN-XX: [http://de.farnell.com/multicomp/5f30240p-10nn-xx/stecker-centronics-24-pol/dp/1099278 Farnell] (2.31&euro;)
** MULTICOMP 5F30240P-10NN-XX: [http://de.farnell.com/multicomp/5f30240p-10nn-xx/stecker-centronics-24-pol/dp/1099278 Farnell] (2.31&euro;)
Line 83: Line 79:
* [http://sine.ni.com/nips/cds/view/p/lang/en/nid/12150 National Instruments TNT5002]: "Single-Chip PCI-to-GPIB Talker/Listener ASIC" ([http://www.ni.com/pdf/products/us/4gpib700-701.pdf datasheet])
* [http://sine.ni.com/nips/cds/view/p/lang/en/nid/12150 National Instruments TNT5002]: "Single-Chip PCI-to-GPIB Talker/Listener ASIC" ([http://www.ni.com/pdf/products/us/4gpib700-701.pdf datasheet])


(pretty much all of them are no longer available, or horribly expensive, or hard to get, or a combination thereof)
(Pretty much all of them are no longer available, or horribly expensive, or hard to get, or a combination thereof.)


=== GPIB transceiver chips ===
=== GPIB transceiver chips ===


* [http://www.datasheetarchive.com/dl/Datasheets-21/DSA-418241.pdf National DS75160A/61A/62A]
* [http://www.datasheetarchive.com/dl/Datasheets-21/DSA-418241.pdf National DS75160A/61A/62A]
* [http://www.ti.com/product/sn75160b SN75160B: Octal General-Purpose Interface Bus Transceiver] ([http://www.ti.com/lit/gpn/sn75160b datasheet]). [http://de.mouser.com/ProductDetail/Texas-Instruments/SN75160BDW/?qs=Dqy2GfToSoRN7kS7RA4kUqt%252bApV44GjizjHa8zhcESY%3d Mouser: 1.55&euro;], [http://www.digikey.de/product-detail/de/SN75160BDW/296-6844-5-ND/370216 Digikey] (2.33&euro;)
* [http://www.ti.com/product/sn75160b SN75160B: Octal General-Purpose Interface Bus Transceiver] ([http://www.ti.com/lit/gpn/sn75160b datasheet]). [http://de.mouser.com/ProductDetail/Texas-Instruments/SN75160BDW/?qs=Dqy2GfToSoRN7kS7RA4kUqt%252bApV44GjizjHa8zhcESY%3d Mouser: 1.55&euro;], [http://www.digikey.de/product-detail/de/SN75160BDW/296-6844-5-ND/370216 Digi-Key] (2.33&euro;)
* [http://www.ti.com/product/sn75161b SN75161B: Octal General-Purpose Interface Bus Transceiver] ([http://www.ti.com/lit/gpn/sn75161b datasheet]). [http://de.mouser.com/ProductDetail/Texas-Instruments/SN75161BDW/?qs=Dqy2GfToSoSEk6hSOlXO6PWl2ZlfYL4DQU8qvn8WRzg%3d Mouser: 1.45&euro;], [http://www.digikey.de/product-detail/de/SN75161BDWR/296-14951-1-ND/562537 Digikey] (2.74&euro;)
* [http://www.ti.com/product/sn75161b SN75161B: Octal General-Purpose Interface Bus Transceiver] ([http://www.ti.com/lit/gpn/sn75161b datasheet]). [http://de.mouser.com/ProductDetail/Texas-Instruments/SN75161BDW/?qs=Dqy2GfToSoSEk6hSOlXO6PWl2ZlfYL4DQU8qvn8WRzg%3d Mouser: 1.45&euro;], [http://www.digikey.de/product-detail/de/SN75161BDWR/296-14951-1-ND/562537 Digi-Key] (2.74&euro;)
* [http://www.ti.com/product/sn75162b SN75162B: Octal General-Purpose Interface Bus Transceiver] ([http://www.ti.com/lit/gpn/sn75162b datasheet]). [http://de.mouser.com/ProductDetail/Texas-Instruments/SN75162BDW/?qs=Dqy2GfToSoQt2q38QBjULg%3d%3d Mouser: 2.03&euro;], [http://www.digikey.de/scripts/dksearch/dksus.dll?vendor=0&keywords=SN75162&stock=1 Digikey] (2.33&euro;)
* [http://www.ti.com/product/sn75162b SN75162B: Octal General-Purpose Interface Bus Transceiver] ([http://www.ti.com/lit/gpn/sn75162b datasheet]). [http://de.mouser.com/ProductDetail/Texas-Instruments/SN75162BDW/?qs=Dqy2GfToSoQt2q38QBjULg%3d%3d Mouser: 2.03&euro;], [http://www.digikey.de/scripts/dksearch/dksus.dll?vendor=0&keywords=SN75162&stock=1 Digi-Key] (2.33&euro;)


== Bill of materials ==
== Bill of materials ==


(work in progress)
{| border="0" style="background-color: #eeeeee; font-size: smaller" class="alternategrey sortable sigroktable"
|-
! align="left" | Description
! align="left" | Manufacturer
! align="left" | Part Number
! align="left" | Package
! align="left" | Quantity
! align="left" | Vendor
! align="left" | Price
 
|-
|| Generic Capacitor 100nF 10V || any ||  || 0603 || 5 ||  || $0.10
 
|-
|| Generic Capacitor 1 µF 10V || any ||  || 0603 || 2 ||  || $0.10
 
|-
|| Chip LED || Lite-On || LTST-C193TBKT-5A || 0603 || 1 || Digi-Key || $0.47
 
|-
|| SMT Micro USB Female right-angle bottom-mount connector type B || Molex || 473460001 || Receptacle || 1 || Newark || $0.52
 
|-
|| Connector, GPIB Sldr, Female || L-COM || CIB24S ||  || 1 || L-COM || $8.02
 
|-
|| Generic Resistor (0.0R) || any ||  || 0603 || 2 ||  || $0.10
 
|-
|| Generic Resistor (30) || any ||  || 0603 || 1 ||  || $0.10
 
|-
|| Common mode filter with ESD protection for USB 2.0 interface || STMicroelectronics || ECMF02-4CMX8 || QFN-8L || 1 || Arrow || $0.54


{| border="0" style="background-color: #eeeeee; font-size: smaller" class="alternategrey sortable sigroktable"
|-
|-
! align="left" | Qty
|| Octal Transceiver GPIB Control || Texas Instruments || SN75161BDW || SOIC || 1 || Arrow || $1.60
! align="left" | Device
! align="left" | Footprint
! align="left" | Value
! align="left" | Refdes
! align="left" | Digikey
! align="left" | Mouser
! align="left" | Comments


|-
|-
|| 1 || ST STM32F103C6T6A || LQFP-48 || ... || ... || [http://www.digikey.de/scripts/DKSearch/dksus.dll?Detail&itemSeq=115187891 4.54&euro;] || ... || ...
|| LP2980-N Micropower 50-mA Ultra Low-Dropout Regulator in SOT-23 Package || Texas Instruments || LP2980IM5-3.3/NOPB || SOT-23-5 || 1 || Arrow || $0.43


|-
|-
|| 1 || TI SN75160B || ... || ... || ... || [http://www.digikey.de/product-detail/de/SN75160BDW/296-6844-5-ND/370216 2.33&euro;] || ... || ...
|| Octal Transceiver GPIB Data bus || Texas Instruments || SN75160BDW || SOIC || 1 || Digikey || $2.18


|-
|-
|| 1 || TI SN75162B || ... || ... || ... || [http://www.digikey.de/scripts/DKSearch/dksus.dll?Detail&itemSeq=115187661 2.33&euro;] || ... || ...
|| 32-bit MCU ARM Cortex-M0+, 64 KB Flash, 8 KB SRAM, 2 KB EEPROM, USB || STMicroelectronics || STM32L062K8T6 || LQFP32 || 1 || Arrow || $2.33  


|}
|}
Line 129: Line 149:


* [[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.
* [[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.
* [[User:Elbridge]] (same nick in IRC), experienced with hardware and firmware, but new to open source.

Revision as of 22:27, 8 April 2019

This page documents some ideas and information for a GPIB-USBTMC hardware interface.

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 crystal-less operation
    • Compatible with libopencm3
    • 32 pin LQFP keeps size low and assembly easy
  • Specialty transceivers
    • 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 simplifies firmware
  • Two-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 USBTMC
  • GPIB
    • Implement functions
      • Serial poll
      • Write
      • Read
      • Reset
      • Local lockout
    • Monitor and handle SRQs
  • 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 USBTMC can set to bootloader mode and reset processor, then when DFU is done, set flag back and boot to main

Components

GPIB connectors

GPIB protocol chips

(Pretty much all of them are no longer available, or horribly expensive, or hard to get, or a combination thereof.)

GPIB transceiver chips

Bill of materials

Description Manufacturer Part Number Package Quantity Vendor Price
Generic Capacitor 100nF 10V any 0603 5 $0.10
Generic Capacitor 1 µF 10V any 0603 2 $0.10
Chip LED Lite-On LTST-C193TBKT-5A 0603 1 Digi-Key $0.47
SMT Micro USB Female right-angle bottom-mount connector type B Molex 473460001 Receptacle 1 Newark $0.52
Connector, GPIB Sldr, Female L-COM CIB24S 1 L-COM $8.02
Generic Resistor (0.0R) any 0603 2 $0.10
Generic Resistor (30) any 0603 1 $0.10
Common mode filter with ESD protection for USB 2.0 interface STMicroelectronics ECMF02-4CMX8 QFN-8L 1 Arrow $0.54
Octal Transceiver GPIB Control Texas Instruments SN75161BDW SOIC 1 Arrow $1.60
LP2980-N Micropower 50-mA Ultra Low-Dropout Regulator in SOT-23 Package Texas Instruments LP2980IM5-3.3/NOPB SOT-23-5 1 Arrow $0.43
Octal Transceiver GPIB Data bus Texas Instruments SN75160BDW SOIC 1 Digikey $2.18
32-bit MCU ARM Cortex-M0+, 64 KB Flash, 8 KB SRAM, 2 KB EEPROM, USB STMicroelectronics STM32L062K8T6 LQFP32 1 Arrow $2.33

Resources

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.
  • User:Elbridge (same nick in IRC), experienced with hardware and firmware, but new to open source.