Hey everyone! Its been a while since I've done an update on this project, but I finally updated my OSHW USB to GPIB adapter.
Back in 2012 I made a post here talking about the old version of my adapter. Just this past weekend I finally completed rev3 which features a few of the suggestions I have gotten over the months. I posted on my website
here some of the major changes. I'll copy the main points here:
Hardware
- Pull-up resistors have been replaced with the proper GPIB line driver ICs. This should increase the number of devices you can have attached to the bus as well as prevent the bus from powering the adapter when the PC is powered off.
- Switched from the FTDI FT232RL to the FT230X USB bridge.
Software
- Several new commands including +autoread, +reset, and +debug.
- Watchdog timer fixed, solving the recent issue on newer Linux distros where initial USB enumeration would cause the adapter to lock-up until the reset button was pushed.
GPIB handshake timeout tweaks - Error LED (red) now provides slightly more information. Each boot sequence will now quickly flash the error LED twice. If the LED stays solid red at boot it means that there are no devices powered up on the bus (or not enough of them). If the LED keeps flashing in pairs of two that means it is continuously rebooting. This is normal for approx 30sec after initially plugging the adapter into PCs running Linux distributions such as Ubuntu 13.10.
I also uploaded my first video in a long time talking about the changes I put in rev3. WARNING CONTAINS EXTRA RAMBLING. I'll try to get another video up either tomorrow or on Friday showing the adapter in action.
In the video I also mention a Python project called InstrumentKit. In order to help abstract the user away from having to deal with adapter-specific commands (eg: setting the target GPIB address, etc) my friend and I started a Python library (InstrumentKit). Here, we took things another step further and abstracted hardware-channel specific instructions away. This part is similar to that of VISA. InstrumentKit allows you to communicate with equipment via Python while maintaining a consistent API across instruments and keeping you away from having to deal with the specifics associated with the physical connection. This means serial, tcpip, nix filelikes (eg /dev/usbtmc0), my adapter, etc are all opened with a single command (or a single line in a YAML config file). Here is a quick example of how I use it to download the waveform from my TDS224:
>>> import numpy as np
>>> import instruments as ik
>>> scope = ik.tektronix.TekTDS224.open_gpibusb('/dev/ttyUSB0', 1)
>>> [x, y] = scope.channel[0].read_waveform()
But that's all I'll say about that for now and I'll make another post and video at a later time with more details. You can check out the work-in-progress at
its Github page.
You can find all the files on my
github account and the adapter can be found on my website
Galvant Industries.