Skip to content

TheHWcave/GPIB-to-USB

Repository files navigation

GPIB-to-USB

GPIB-to-USB interface (Arduino Nano) and GPIB logger (Python)

The following 3 files are needed to create an Arduino Nano 3 based GPIB(IEEE488) to USB interface The files and the schematics were originally developed by Rudolf Reuter (see https://www.rudiswiki.de/wiki9/GPIBtoUSB_Nano3?highlight=%28%5CbCategoryLogicAnalyzer%5Cb%29 ) I have modified the GPIB_USB_nano.ino to add an additional command and slightly tweaked the messages generated by the program. Rudi's version (from the link on his page) is 1.4. This is version 1.5 and posted here with Rudi's permission.

  • GPIB_functions.ino
  • GPIB_nano.h
  • GPIB_USB_nano.ino

The GPIB-to-USB interface acts as a serial port on a connected PC, using speed 115200). All commands are case sensitive, not echoed and need to be terminated by a linefeed (= ctrl-j) = '\x0a' character. A full list is on Rudi's site (link above). Commands that I use most often are: C - reset I - display firmware version Ra,s - send string s to address a and read answer; example: 'R3,E' sends command E to GPIB device with address and returns device response expected as string terminated with linefeed Wa,s - write string s to address a without expecting a response Ha, - perform a read of device a without sending any command (note that the comma is still needed). This command is new in version 1.5

The file:

  • GPIBLogger.py

is a little Python3 commandline utility I wrote that uses the GPIB-to-USB interface above to periodically read a measurement (e.g. voltage) from a GPIB-connected multimeter (e.g. Solartron 7150+) and logs it with a timestamp in a file (CSV format) to allow it to be directly opened as a spreadsheet program like MS Excel or LibreOffice Calc.

GPIBLogger.py supports the follwing commandline parameters all of which are optional because the defaults happen to match my setup (sorry).

  • '-i or --inp : serial input device, default /dev/ttyUSB0'
  • '-o or --out : filename in default directory. default: LOG_<date_time>.csv'
  • '-t or --time : time in seconds between polls, default: 1.0'
  • '-d or --delta: if specified, logging occurs only if the value differs from previous by more than delta '
  • '-a or --addr : GPIB address, default 3'
  • '-c or --cmd : GPIB command string needed to poll data, default = none'

The file

  • GPIB_Control.py

Is a command line version to talk to the GPIB interface or, through it, to a device on the GPIB bus. For example, the command below will fetch a single measurement from a Solartron 7150+ multimeter (at address #3), print the result on stdout and terminate.

GPIB_Control --port /dev/ttyUSB0 -a 3

About

GPIB-to-USB interface (Arduino Nano) and GPIB logger (Python)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published