Author Topic: GPIB specifications  (Read 21168 times)

0 Members and 1 Guest are viewing this topic.

Offline ealexTopic starter

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: ro
GPIB specifications
« on: November 18, 2014, 01:12:14 pm »
Hello

I'm interested in developing a small USB to GPIB adapter that will support IEEE 488.1 implementation
I could find electrical specifications, flow control description, etc
I've seen there some commands like untalk / unlisten, but no "talk" \ "listen" command

This link was useful: IEEE488 HP Tutorial description of the Hewlett-Packard interface bus

What i can't find is how the bus controller selects the active talker and listener - the specific command sequence to specify that device with id 10 is the talker and device id n-m are listeners.
Is this command sequence vendor specific ?

 

Offline nfmax

  • Super Contributor
  • ***
  • Posts: 1556
  • Country: gb
Re: GPIB specifications
« Reply #1 on: November 18, 2014, 01:42:13 pm »
The controller sets the talker by asserting ATN and sending the device's talk address. The controller sets a listener by asserting ATN and sending the device's listen address. Since there can only be one active talker, if a currently active talker sees another device's talk address, it must untalk itself. There can be multuple listeners: the controller 'unlistens' them by asserting ATN and sending the 'unlisten' address (31)
 

Online free_electron

  • Super Contributor
  • ***
  • Posts: 8515
  • Country: us
    • SiliconValleyGarage
Re: GPIB specifications
« Reply #2 on: November 18, 2014, 02:13:50 pm »
Get the ieee standard at ieee.org.
That is the ONLY document you need.

And please , there have been so many of these boxes already, for once make one that does it right.
Please Use the proper bus driver chips.
Please make it compatible with the standard io libs
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline ealexTopic starter

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: ro
Re: GPIB specifications
« Reply #3 on: November 18, 2014, 03:19:03 pm »
i intend to use SN7516 and SN75160 - they seem to be the "proper bus driver chips"

i don't know about the standard io libs - i want to make it using a usb->uart

for now i'm just playing with the idea of making one for my personal use - i'm at the design / requirements step.

i plan to have the following hardware:

PC CONNECTED SIDE
    USB->RS232 transceiver
    optocouplers for the RX and TX line
    isolated power supply ( a dedicated block / 2 transistor royer converter / - must check the price )

BUS CONNECTED SIDE
    secondary LDO for 5V and 3.3V
    microcontroller ( need to determine how much computing power i need - a CM0 should be more than enough )
    bus tranceivers
    some line protection resistors + diodes to 5V and gnd

I'll keep updating this thread for each step
I've seen the article at ieee.org, but did not dare to see how much it costs :)
 

Online free_electron

  • Super Contributor
  • ***
  • Posts: 8515
  • Country: us
    • SiliconValleyGarage
Re: GPIB specifications
« Reply #4 on: November 18, 2014, 03:30:13 pm »
Good start.
in terms of computing power you don;t really need a lot. the classic gpib controllers don;t even use a processor. they are hard logic.

make the software in such a way that it first receives the entire command from usb and then blasts it in one shot to the target.
same for reading ; receive as fast as you can from the machine, buffer it in the cpu , complete the gpib transaction and then shoot the buffer to the pc.
don't make the mistake to stall the gpib bus becasue you have to stuff data into the pc , then receive another few bytes, send to pc , receive another few bytes. you are stalling the gpib bus. gpib is made for burst operation. transmit the block of data and sit in idle.

there are machines out there that are blocked when they are mid-transmission. and that is not good.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2252
  • Country: ca
Re: GPIB specifications
« Reply #5 on: November 18, 2014, 03:59:40 pm »
Hello

I'm interested in developing a small USB to GPIB adapter that will support IEEE 488.1 implementation
I could find electrical specifications, flow control description, etc
I've seen there some commands like untalk / unlisten, but no "talk" \ "listen" command

This link was useful: IEEE488 HP Tutorial description of the Hewlett-Packard interface bus

What i can't find is how the bus controller selects the active talker and listener - the specific command sequence to specify that device with id 10 is the talker and device id n-m are listeners.
Is this command sequence vendor specific ?
Look at table 2.4 and table 4.1 in that document.
 

Offline electronic_eel

  • Regular Contributor
  • *
  • Posts: 201
Re: GPIB specifications
« Reply #6 on: November 18, 2014, 04:34:09 pm »
There is an open source hardware GPIB / USB adapter available:
http://galvant.ca/shop/gpibusb/

You can either buy from them or make your own clone from the data available on github. They also developed the Python InstrumentKit to allow easy interfacing to GPIB instruments from Python.

But if you still want to roll your own design you can maybe get some ideas from their source code and schematics.
 

Offline lincoln

  • Regular Contributor
  • *
  • Posts: 155
  • Country: us
Re: GPIB specifications
« Reply #7 on: November 18, 2014, 05:59:35 pm »
 

Offline rx8pilot

  • Super Contributor
  • ***
  • Posts: 3634
  • Country: us
  • If you want more money, be more valuable.
Re: GPIB specifications
« Reply #8 on: November 18, 2014, 06:11:09 pm »
There is an open source hardware GPIB / USB adapter available:
http://galvant.ca/shop/gpibusb/

I just ordered one from Galvant, although I am not sure if there is any ready to go software that can get me started. I am hoping to do simple remote control of my power supplies and create automated volt/time ramps. Writing custom scripts may be too long a learning curve for me at this time.

The written IEEE spec looks fairly simple, but I am hoping to find something already done and tested if possible. OP: Can you say why you are trying to spin your own? I have just started the search and you likely know more than me. Are the ones on the market have issues?
Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline ealexTopic starter

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: ro
Re: GPIB specifications
« Reply #9 on: November 19, 2014, 09:04:03 am »
@free_electron - how big can gpib frames get  ? reserving something like 4K for the gpib buffer will be enough ?
@lincoln  - thanks, i'll start reading them once i have some spare time

i'm looking at STM32F100RCT6TR for the cpu - i'm used with that series (24k RAM, 256KB flash, 24MHz )

I've looked over the one made by Galvant, i keep it as a fold-back option if i'll not end with a working unit
 

Offline Narmaraktuk

  • Contributor
  • Posts: 20
  • Country: nl
Re: GPIB specifications
« Reply #10 on: November 19, 2014, 02:51:55 pm »
There is an open source hardware GPIB / USB adapter available:
http://galvant.ca/shop/gpibusb/

I just ordered one from Galvant, although I am not sure if there is any ready to go software that can get me started. I am hoping to do simple remote control of my power supplies and create automated volt/time ramps. Writing custom scripts may be too long a learning curve for me at this time.

This is pretty easy to do with InstrumentKit + the galvant GPIB USB adapter, provided there is a suitable driver for your PSU. What type of PSU do you want to automate?

Example voltage time ramp on a HP6632b using InstrumentKit on linux:
Code: [Select]
import instruments as ik
import time
psu = ik.hp.HP6632b.open_gpibusb('/dev/ttyUSB0', 6)
psu.voltage = 10
psu.current = .1
psu.output = True  # Enable output
for i in range(1,10):
   psu.voltage = i
   time.sleep(1)
 

Offline rx8pilot

  • Super Contributor
  • ***
  • Posts: 3634
  • Country: us
  • If you want more money, be more valuable.
Re: GPIB specifications
« Reply #11 on: November 19, 2014, 05:28:10 pm »
I've looked over the one made by Galvant, i keep it as a fold-back option if i'll not end with a working unit

Are you going to write the front-end code as well or use something that is already written? Is this a 'learning experience' project or do you think that you can make a better mousetrap? Don't take that comment the wrong way, I am just learning about GPIB control and do not know what I am in for. If there is truly a need to make your own GPIB interface, I may re-consider.

This is pretty easy to do with InstrumentKit + the galvant GPIB USB adapter, provided there is a suitable driver for your PSU. What type of PSU do you want to automate?

Example voltage time ramp on a HP6632b using InstrumentKit on linux:

I just got an HP6653A and planning a few other purchases to eventually work up to GPIB automated production PCB testing. It looks like InstrumentKit is Python so it should not be a problem on a Win7 machine [guessing]

Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline TerraHertz

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: au
  • Why shouldn't we question everything?
    • It's not really a Blog
Re: GPIB specifications
« Reply #12 on: November 20, 2014, 09:26:41 am »
Get the ieee standard at ieee.org. That is the ONLY document you need.

Ha ha ha...

standards.ieee.org/findstds/standard/488.1-1987.html
Buy --> http://www.techstreet.com/products/2969    "PDF  download $114.00 Members pay $91.00"

standards.ieee.org/findstds/standard/488.2-1992.html
Buy --> http://www.techstreet.com/ieee/products/1779348   "PDF download  $304.00  Members pay $243.00"

For those of us who absolutely won't even contemplate paying US$418.00 dollars for a few MB of downloaded bits, the non-IEEE documents are all we'll see. Unless a parrot should land on one's shoulder.

Personally, I am of the opinion that unless something is freely available, it *can't* be a standard. If I was dictator, that would be the law.

Not sure if I have copies of these somewhere or not. Probably not.
Collecting old scopes, logic analyzers, and unfinished projects. http://everist.org
 

Offline Narmaraktuk

  • Contributor
  • Posts: 20
  • Country: nl
Re: GPIB specifications
« Reply #13 on: November 20, 2014, 09:40:05 am »
I just got an HP6653A and planning a few other purchases to eventually work up to GPIB automated production PCB testing. It looks like InstrumentKit is Python so it should not be a problem on a Win7 machine [guessing]

Lets continue guessing :):

There is a HP6652a driver that might work for the HP6653a. The commandset is similar according to the HP manuals.

Win7/Linux: I think only the path you feed to the driver needs to change.

 

Offline ealexTopic starter

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: ro
Re: GPIB specifications
« Reply #14 on: November 20, 2014, 01:10:20 pm »
One of the links above has those pdf's - posted by lincoln

i want to make this a 'learning experience' - i know i don't have a chance / enough time to make a "commercial  grade" interface / at least create hardware that can be easily expanded from what i'll be able to implement - that's if anyone will be interested

i want to make it as an exercise - get something isolated from the computer ground and send some data to my R&S SMS signal generator - it's implementing only a basic listener, so i don't have equipment to check more advanced functionality.

I had a lot of stuff that used GPIB at my old job ... here i have an almost usable Hantek ....

i did not think about the front end code - it would be better to make it work with something that's already implemented.

for now i'm looking at the hardware requirements - getting a design that will support the entire protocol / BOM / pcb .
I intend to use MCP2200 for the USB-UART interface ( with flow control ) - is that chip good ? i've only used FTDI until now

Initial BOM sketch-up:

USB B / micro connector ( i prefer USB-B - seems more rugger + trough hole )
USB protection diodes ( are they really needed ? )
leds for RX/TX
MCP2200 + support components configured for 1Meg baud
Optocouplers on RX / Tx / RTS / CTS ( HCPL-2601.S )
5V rail decoupling + filtering for the power supply
Isolated power supply brick or a simple 1 transistor flyback / royer ( i still need to decide - royer will require 2 center tapped windings + feedback + extra inductor )
-------- isolation --------
5V and 3.3V LDO for the output drivers and mcu
STM32F100RCT6TR mcu + support
SN75160
SN75161
protection diodes to GND and a 5.6V high power zener to clamp the inputs + 10 ohm series resistors ( 1206 pref. )
connector: http://ro.farnell.com/multicomp/spc15336/connector-centronics-plug-24way/dp/2112386 for the first version - pull it out of the case and install it on the board edge
SWD debug interface
2-4 leds to show status, etc

Layout constraints - 100x50mm - if the connector lands fit in this area, try to have components only on 1 side so it can be assembled on a hot plate

I'll add a schematic as soon as i have one available ( estimated: end of next week )
 

Offline electronic_eel

  • Regular Contributor
  • *
  • Posts: 201
Re: GPIB specifications
« Reply #15 on: November 20, 2014, 02:08:18 pm »
Optocouplers on RX / Tx / RTS / CTS ( HCPL-2601.S )
5V rail decoupling + filtering for the power supply
Isolated power supply brick or a simple 1 transistor flyback / royer ( i still need to decide - royer will require 2 center tapped windings + feedback + extra inductor )
-------- isolation --------
Why do you need isolation in the GPIB/USB-Adapter? Usually the instruments isolate the GPIB bus from their outputs.
 

Offline ealexTopic starter

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: ro
Re: GPIB specifications
« Reply #16 on: November 21, 2014, 09:32:56 am »
i've disassembled my signal generator and it seems the GND rail is connected to the chassis ( thumb size diode bolted directly on the chassis with no insulation). also, the power line earth is also bolted on the same plate

I already have a ground loop issue when i'm using it to act as a LO for a I/Q demodulator - ground loop via the signal generator chassis and the sound card input - i had to run the notebook on battery or add a transformer on the LO line to break DC path.

=> i don't want to take any chances - i've seen motherboards blow by similar issues - the usb host chip would just fail dead short when connecting some devices that were plugged in a different socket  ( at work ... )
 

Offline TerraHertz

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: au
  • Why shouldn't we question everything?
    • It's not really a Blog
Re: GPIB specifications
« Reply #17 on: November 21, 2014, 11:04:48 am »
One of the links above has those pdf's - posted by lincoln

Ah, thanks, I'd missed that link.

I shall call the parrot "Wants"  Polly Wants...
Collecting old scopes, logic analyzers, and unfinished projects. http://everist.org
 

Offline electronic_eel

  • Regular Contributor
  • *
  • Posts: 201
Re: GPIB specifications
« Reply #18 on: November 21, 2014, 12:30:09 pm »
i've disassembled my signal generator and it seems the GND rail is connected to the chassis ( thumb size diode bolted directly on the chassis with no insulation). also, the power line earth is also bolted on the same plate
ouch. Is this from a reputable manufacturer?

Another idea would be to use ethernet. There the isolation is always part of the design. And if you use an RTOS with all the neccessary tcp/ip libs already built in, I think it wouldn't be that much more complicated than usb.
 

Offline ealexTopic starter

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: ro
Re: GPIB specifications
« Reply #19 on: November 21, 2014, 09:37:15 pm »
it a very old rohde & schwarz sms2 generator ( 20kg, original schematics - i'm searching for a scanner that can do 2xA3 in one pass, chip dates form around 1978 - 1979 - i promise a tear down when i get some good light source ) and it seems it was designed this way - the chassis is connected to GND via the diodes for the 5V rail
it took me a while to understand were i can reach GND - it's designed to be easy fixable ( even got included raiser boards to make each module easy to measure, almost all chips are mounted on sockets and are easy to find parts ) but on the power supply "debug" headers i could not find GND

i'll think about ethernet - i'm sick of working with RTOS - a pain to debug if things go wrong, even for high-end ones
 

Offline ealexTopic starter

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: ro
Re: GPIB specifications
« Reply #20 on: December 18, 2014, 09:12:33 am »
Hello

I's been a while, but i had time to work on the schematic and pcb lay-out

This is the initial schematic version, and a print screen of the current lay-out. I plan to try and have all component on one side of the board - so i can reflow it on a hot plate.
For now i can't fit the protection diodes - either i remove them from the design, or i keep them on the bottom layer and mount them by hand.

The lay-out is still a mess, the usb-connected part is mostly ready - i need to remove / clear all in-pad vias - there are quite a lot of them now
 

Offline ealexTopic starter

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: ro
Re: GPIB specifications
« Reply #21 on: December 19, 2014, 08:39:08 am »
Lay-out update

I've managed to fit all parts on board, left only the protection diodes on the bottom side, only 16 SOT23-3 parts
Also added some 3D views

Still some via in pads - i've read that they are not recommended but seem to work properly if the drill is small enough - i'm using 0.3mm holes

Next:

- remove D119 and R121 - they are useless
- add another status LED -> i''ll have 2 LED's to show cpu status.
- add a jumper somewhere for an eventual boot loader, to allow firmware updates via UART
- make the 3V and 5V tracks a little thicker and move them around a bit to free up the area under C102 and C101
- put the status leds and the boot loader jumper in the freed spate / some text directly on the copper layer  - i will not add a solder mask / silk screen to keep cost down


 

Offline artag

  • Super Contributor
  • ***
  • Posts: 1061
  • Country: gb
Re: GPIB specifications
« Reply #22 on: December 19, 2014, 10:19:18 pm »
Please Use the proper bus driver chips.

While this can be very useful, those chips are built to drive a full line of 15  GPIB loads. This is exactly what you want if you have one adapter and several instruments : but you also need several expensive, unwieldy cables.

If you have a crude adapter that uses cheap buffers or even the micros own IO pins, it will only drive one or two instruments before the signals become poor. But is that unreasonable ? With a USB microcontroller or even ethernet on each adapter, you might no longer use the parallel cables. It could be cheaper to fit an adapter to every instrument.

Are there any signals that can't be handled correctly if you limit the device to one instrument ?


 

Offline TerraHertz

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: au
  • Why shouldn't we question everything?
    • It's not really a Blog
Re: GPIB specifications
« Reply #23 on: December 19, 2014, 10:40:22 pm »
Please Use the proper bus driver chips.

While this can be very useful, those chips are built to drive a full line of 15  GPIB loads. This is exactly what you want if you have one adapter and several instruments : but you also need several expensive, unwieldy cables.

If you have a crude adapter that uses cheap buffers or even the micros own IO pins, it will only drive one or two instruments before the signals become poor. But is that unreasonable ? With a USB microcontroller or even ethernet on each adapter, you might no longer use the parallel cables. It could be cheaper to fit an adapter to every instrument.

Are there any signals that can't be handled correctly if you limit the device to one instrument ?

Arrgh! No! This is probably exactly the thinking that resulted in so many non-compliant adapters out there.
"several expensive, unwieldy cables"
Actually, HP-IB cables are more or less free, because there are so many floating around. And it's how it's supposed to work. Please use the right driver chips.
Cost difference is not much, and with them you can still use an adapter per instrument if that's preferable.
Collecting old scopes, logic analyzers, and unfinished projects. http://everist.org
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2252
  • Country: ca
Re: GPIB specifications
« Reply #24 on: December 19, 2014, 11:46:04 pm »
Please Use the proper bus driver chips.

While this can be very useful, those chips are built to drive a full line of 15  GPIB loads. This is exactly what you want if you have one adapter and several instruments : but you also need several expensive, unwieldy cables.

If you have a crude adapter that uses cheap buffers or even the micros own IO pins, it will only drive one or two instruments before the signals become poor. But is that unreasonable ? With a USB microcontroller or even ethernet on each adapter, you might no longer use the parallel cables. It could be cheaper to fit an adapter to every instrument.

Are there any signals that can't be handled correctly if you limit the device to one instrument ?

Arrgh! No! This is probably exactly the thinking that resulted in so many non-compliant adapters out there.
"several expensive, unwieldy cables"
Actually, HP-IB cables are more or less free, because there are so many floating around. And it's how it's supposed to work. Please use the right driver chips.
Cost difference is not much, and with them you can still use an adapter per instrument if that's preferable.
If you limit to just one instrument, then you will have no problem to drive the signals from virtually any microcontroller. The micro must have 5 V inputs and outputs, and must have TTL level inputs (<0.8V LOW and >2.0V HIGH).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf