GPIB To USB, With A Python API

If you’re not so daft as to think Arduino-based oscilloscopes and multimeters are actually useful for all but the simplest tests and measurements, you just might have some big iron sitting around your workbench from the likes of HP, or Tektronix. You might have noticed a strange port on the back of these machines, labeled GPIB or IEEE-488. This is the standard interface for these devices, and if you’ve ever priced out a USB to IEEE-488 converter, you can see why [Steven] thought it would be cheaper to build his own.

This build is an update to an earlier version we saw a few years ago. Since then, [Steven] has taken some advice from the community and replaced a bunch of resistors with proper GPIB line driver ICs, and generally cleaned up the firmware.

Because a USB to GPIB adapter is only one small part of the tools necessary to connect these old measurement devices to a modern computer, [Steven] has also been working on InstrumentKit. It’s a Python library that takes all the standardized instrument commands and wraps them up in an easy to use API. You can check out the docs for InstrumentKit here, or just look through the board files and firmware on the Github

15 thoughts on “GPIB To USB, With A Python API

  1. I recommend you subscribe to his YouTube channel. He does a video or two a month. Some of his stuff is over my head, or not in my area of interest…..but I always seem to learn something.

  2. Good use of bus drivers. The thing I can’t believe about the one Sparkfun sells is that it uses none, so it can’t drive a cable. I just use a NI PCI-GPIB off eBay, as it has the best driver support (and will drive a 15-instrument bus with an extender to 12 more…)

    1. Its true, those “proper” GPIBUSB adapters do have the best currently-deployed software support as well as standard implementation, but the problem is the restrictions on the software environments. The project originally started because I was frustrated with how I could not get the NI adapters to work under my OS and programming environment of choice. With mine, anything that can talk to a serial port can now connect to your instruments!

  3. I love this idea. I’d built my own and done some python work with it but this is a lot more advanced.
    I will suggest that labview has a pretty snazzy set of gpib functions for a lot of common gear, and the student version is available to anyone for $50, including an arduino, from Sparkfun. If your instrument is supported, it’s superb. But a lot of stuff isn’t (including one of my scopes, my function generator, blah blah blah, at which point python is much faster than trying to gin up diy labview drivers.)
    Nice clean build. Puts mine to shame.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.