Skip to content

Latest commit

 

History

History
93 lines (70 loc) · 2.95 KB

README.md

File metadata and controls

93 lines (70 loc) · 2.95 KB

Agipibi : An Arduino to GPIB Interface

DISCLAIMER

This project was never completed due to the loss of access to native GPIB equipments. As a result a number of planned functionnalities are not implement. The initial code for SRQ support on Arduino side is known to be buggy and could lead to a locked state. I would recommend to first inspect - or remove - these functions in case of trouble with an unresponsive board.

Contributions are still accepted in the form of pull requests to be reviewed.

Description

Agipibi is a cheap GPIB interface based on the Arduino Mega board or higher models. It connects scientific instruments using IEEE 488 buses to a computer, or the micro-controller itself if you integrate it in your own code. This project goal is to provide the best open source implementation of a GPIB controller on prototyping platforms.

Features

  • system controller role
  • act as talker or listener in full address space
  • multiple concurrent listeners
  • switch instruments to remote mode
  • (un)lock front panels
  • fast reading (Arduino is buffering chunks of data)
  • group trigger
  • timeout handling when reading bus

Work-in-progress:

  • SRQ request interruption and serial polling
  • more examples for Tektronix scopes
  • bridge to LabVIEW with a Python script (TCP server)

Usage

This interface was designed for Arduino Mega 1280, to use other boards you'll have to edit the pin mapping at the top of arduino_mega.ino sketch. Be careful about the SRQ line that should have an interrupt capable output.

  1. Connect your GPIB bus/instrument to the board with no additional component. You'll find examples in the documentation directory.

  2. Build and upload the 'arduino_mega.ino' sketch in Arduino IDE.

  3. Use the Python module 'agipibi.py' to begin tests. Examples are provided. It's best to start in a scenario that doesn't require a controller or bi-directional communication. At first I put my scope in Talker mode and had it transmit a waveform using menus only. The following code would be enough in this case.

from agipibi import Agipibi
dev = Agipibi()
if dev.interface_ping():
    dev.gpib_init(controller=False)
    waveform = dev.gpib_read() # press the 'Transmit' scope button
    print 'Received %d bytes' % len(waveform)
else:
    print 'Arduino is not responding'

Authors

Thanks

Agipibi was inspired by similar projects: