Author Topic: AR488 Arduino-based GPIB adapter  (Read 279562 times)

0 Members and 7 Guests are viewing this topic.

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: AR488 Arduino-based GPIB adapter
« Reply #250 on: October 13, 2019, 02:19:47 am »
Looks great, Reg. That case fits quite nicely!
TEA is the way. | TEA Time channel
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3501
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #251 on: October 13, 2019, 03:17:02 am »
I was a bit skittish about it, but it turned out to be a great fit.  Basically, it's roughly the size of a 100 mm cigarette package.  That's a handy size.  I *think* I might even get a Mega 256 in one with a bit pf PCB trimming.  I bought 20 for $0.884 each with tax.  It will take a while for them to get here, but at that price it's well worth having a bunch on hand.

Most of the projects I've managed to finish are about this size  and consisted of $1-2 of electronics in $4-5 of enclosure.  So having a bunch of <$1 enclosures on hand is very attractive.  I'm sure I'll build more things  if a packaged version is the same cost as the breadboard version.  I've got 2" copper foil tape to line them if needed.  I've got a bin full of dead bug devices.  And a fair number are worthy of some connectors and a power jack in an <$1 box.  Connector labels and a schematic on the back.  Might not use it often, but it's a real pain trying to figure out what they are if they are just in a Jim Williams' style  bowl of stuff.

I've got stuff I built 30 years ago, but did not package because of the cost.  Now I have no idea what they are and am reluctant to reverse engineer my own work.  I wish to hell I had at least put a tag on them.  But I didn't expect to not do any electronics for 20+ years.

Have Fun!
Reg
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: AR488 Arduino-based GPIB adapter
« Reply #252 on: October 13, 2019, 03:53:49 am »
Ah, curious how the Mega will turn out. I have an open-frame acrylic case, but a fully enclosed one would better.

As for project enclosures, I actually bought some old, dead HP gear just for repurposing their cases. :-+
TEA is the way. | TEA Time channel
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2332
  • Country: 00
Re: AR488 Arduino-based GPIB adapter
« Reply #253 on: October 13, 2019, 05:52:18 am »
 
The following users thanked this post: coromonadalix, WaveyDipole

Offline artag

  • Super Contributor
  • ***
  • Posts: 1228
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #254 on: October 13, 2019, 11:06:34 am »

As for project enclosures, I actually bought some old, dead HP gear just for repurposing their cases. :-+

The horror ! You shouldn't have told us that :). You're going to get lynched in the TEA thread now ..

I hope it's really useless stuff like (imho) bit error rate testers and the like. I generally find that old equipment I buy for parts gets mended instead. It's too tempting to just have a go at it.
« Last Edit: October 13, 2019, 11:08:05 am by artag »
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: AR488 Arduino-based GPIB adapter
« Reply #255 on: October 13, 2019, 05:15:21 pm »
TEA is the way. | TEA Time channel
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: AR488 Arduino-based GPIB adapter
« Reply #256 on: October 13, 2019, 05:18:05 pm »

As for project enclosures, I actually bought some old, dead HP gear just for repurposing their cases. :-+

The horror ! You shouldn't have told us that :). You're going to get lynched in the TEA thread now ..

I hope it's really useless stuff like (imho) bit error rate testers and the like. I generally find that old equipment I buy for parts gets mended instead. It's too tempting to just have a go at it.

Have no fear. I wouldn't do that to something useful and fixable. ;) A secondary benefit is that it'll then match my other HP gear.
TEA is the way. | TEA Time channel
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3501
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #257 on: October 13, 2019, 07:45:44 pm »
Thanks for the box link.  I'm going to get some.

I've actually bought old HP gear just for the enclosure.  In particular, a 37203A GPIB extender to house an Arduino Mega driving an HP 44421A 20 channel multiplexer card to connect to a 34401A.  Major problem with the 44421A is getting the PCB edge connectors.  I really want a few more of the 37203A as I have a bunch of 44421A cards.

I'd *love* to have a pickup truck load of dead HP gear just for the enclosures.  Absolutely perfect for experimental HF radio and T&M projects.  Unfortunately, shipping cost makes getting stuff here expensive. And I don't want to drive 1000 miles to an auction on the chance I'd get a load.
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #258 on: October 13, 2019, 10:08:07 pm »
It's finished!  :-)

I got my enclosures today and my first AR488 GPIB-USB interface is completed.  This one is for AR488 FW development and to operate a stack  of 2x 34401As.  It will later move to the 2x 3478As when I build the 44421A 20 channel switch for monitoring voltage references.

Reg, that's a really neat professional looking result!


This box fits perfect for this

https://ae01.alicdn.com/kf/H19e317674568486b90a703f935ef818bt.jpg

https://pt.aliexpress.com/item/4000137043277.html?spm=a2g0o.cart.0.0.3e523c00kfgSjD&mp=1

And that's certainly better looking than those clear acrylic cases that mine are in!
« Last Edit: October 13, 2019, 10:12:51 pm by WaveyDipole »
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3501
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #259 on: October 13, 2019, 11:07:34 pm »
Ahh..   Thanks, but  I didn't show the USB cutout.  It's not as good a fit as it should have been.  I should have marked it out more carefully.  But I was impatient.  But not so OCD as to do it over.  This time ;-)

Still, it's a complete 2 device GPIB-USB interface for about $15.  The nice part of using the ribbon cable is if  you just connect a stack of devices with GPIB via USB to a Beagle or Pi with WiFi or ethernet to a PC, the cabling is short and neat.  The Uno can just sit on top of the stack or a little doubles sided tape will hold  it to the underside of the shelf.  You could easily do 4-6 34401A size devices on a shelf with a single AR488.

I'm *very* pleased with the enclosures.  At $0.89/each it's the best deal on an enclosure I've ever gotten.  The lid snaps on, so no visible screws unless you want them.  There are 4 posts for holding a PCB you could attach the cover with if you felt the need. but it's held on quite well as is.

BTW My sister gave me some plain finish, Altoid size tins and I found  I can fit my nanoVNA inside one with the crappy switches replaced with better ones on the RHS of the front panel and the SMA connectors sticking out the LHS of the tin.  Close the lid and the screen and switches are protected from mechanical damage.

But right now, priority is sorting and binning the mess around here so I can find things.
 

Offline Alfons

  • Regular Contributor
  • *
  • Posts: 176
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #260 on: October 18, 2019, 08:08:34 pm »
I was already looking for a GPIP adapter to erase the errorlog of my newly purchased TEK TDS744A. This ran over, because the device ran for years with defective Attenuators and always generated new errors. I repaired the Attenuators. Then came across the AR488 thread and found, that I have everything here to build the part. Within an hour I finished it, programmed the Arduino Mega and I was able to establish contact with the TDS744A. I was very surprised how easy it was. Entered a few commands and already the errorlog of the TDS744A was empty. Great!!!! Thanks to Emanuele (and Helpers) for this great project.
« Last Edit: October 19, 2019, 06:21:32 am by Alfons »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #261 on: October 19, 2019, 01:07:55 pm »
I was already looking for a GPIP adapter to erase the errorlog of my newly purchased TEK TDS744A. This ran over, because the device ran for years with defective Attenuators and always generated new errors. I repaired the Attenuators. Then came across the AR488 thread and found, that I have everything here to build the part. Within an hour I finished it, programmed the Arduino Mega and I was able to establish contact with the TDS744A. I was very surprised how easy it was. Entered a few commands and already the errorlog of the TDS744A was empty. Great!!!! Thanks to Emanuele (and Helpers) for this great project.

Thank you for relating your experience and your success with the Arduino Mega.
I'm glad that this project was helpful to you.
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #262 on: October 21, 2019, 12:13:22 pm »
I have just uploaded an update (0.47.51). After the re-structure of the code-base it was necessary to review and complete Device Mode which now works both with interrupts enabled and without using in-loop checking of pin status. In addition, the ++lon command has now been implemented and will print out any direct commands (e.g. SCPI) sent to instruments as well as the data/readings returned from instruments. I have been toying with the idea of providing the facility to optionally print out the GPIB commands as hex bytes. For the present it is just ++lon 0 to disable and ++lon 1 to enable as per Prologix.

I will next endeavour to complete the code for the ESP8266 module and then move on the the ESP32.
« Last Edit: October 21, 2019, 12:45:58 pm by WaveyDipole »
 
The following users thanked this post: coromonadalix

Offline Alfons

  • Regular Contributor
  • *
  • Posts: 176
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #263 on: October 21, 2019, 05:42:26 pm »
I made a small adapter. Coincidentally, I had some of the 24-pin centronix plug lying around here. These are the ones with metal housings that are also available well and cheaply. The one for crimping you hardly get and then they are also expensive, the shipping takes ...

To fix the plug, I had to come up with something, because it can not be fixed without the metal case. So I designed two panels and printed them out. The plug then comes as a sandwich between these panels and holds bombproof. In addition, a small box for the Arduino Nano and finished the part. The box could have been a little smaller. If you want the files, I can still post them.
« Last Edit: October 22, 2019, 09:20:48 am by Alfons »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #264 on: October 21, 2019, 09:08:55 pm »
To fix the plug, I had to come up with something, because it can not be fixed without the metal case. So I designed two panels and printed them out. The plug then comes as a sandwich between these panels and holds bombproof. In addition, a small box for the Arduino Nano and finished the part. The box could have been a little smaller. If you want the files, I can still post them.

That's an interesting solution to this particular problem of not having the metal components that house the plug and the versatility of the 3D printer is demonstrated once more. One day eventually I will get around to buying one.....


 
« Last Edit: October 21, 2019, 09:13:53 pm by WaveyDipole »
 

Offline jimmc

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #265 on: October 22, 2019, 01:58:01 pm »
If wires are used with a PCB mount plug, the Hammond 1551HGY enclosure is a good fit for the nano.
(There's a couple of pics in this old post https://www.eevblog.com/forum/testgear/gpib-interface-(ieee488)/msg1148751/#msg1148751.

Jim
 
The following users thanked this post: PixieDust

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #266 on: October 25, 2019, 01:31:00 pm »
Version 0.47.53 has just been uploaded and fixes a problem with the ++lon command. A new ++ton command has also been added to configure the interface in talk-only mode.

The ++lon and ++ton modes are not addressed modes and so do not require a GPIB address, therefore the set GPIB address is simply ignored. Moreover, when in either of these modes, devices are not controlled by the CIC, although in ++lon mode, the device will receive any data being sent from any talker on the bus, including any other addressed device or controller. Since only ONE talker can exist on the bus at a time, there can only be one device in "talk-only" mode on the bus, however multiple "listen-only" devices can be present and all will receive the data sent by the talker.
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #267 on: October 27, 2019, 04:53:20 pm »
I will next endeavour to complete the code for the ESP8266 module and then move on the the ESP32.

Inspired by the suggestion of running the AR488 sketch directly on the ESP32, when I looked at the board earlier in the year, I had only considered the number of available GPIO pins, which appeared to be sufficient for this purpose. The NodeMCU board could be powered directly from USB and hence 5v so it seemed a reasonable proposition.

However, it transpires from a further review of the ESP32 datasheet, that the ESP32 module, like the ESP8266, is a 3.3v device and hence works with 2.3v - 3.3v signals on its GPIO pins. The datasheet does not appear to specify the maximum current that can be handled by the GPIO pins, but under "Electrical Characteristics" in the "Absolute Maximum Ratings" table it does state that the "Maximum Drive Capability" is just 12mA. It would therefore seem that there may be insufficient current to drive the GPIB bus directly and even then, level shifting would be required on all 16 pins. If the level shifters could also be used to increase the available drive current then I suppose this might still be viable? The ESP32 should still be able to function as an add-on board connected via serial to any Arduino board that has spare Tx/Rx pins, but is it still a suitable candidate to drive the GPIB bus via its own GPIO pins? Does anyone have any thoughts on this?

In light of the above and depending on feedback, I might change priorities and look first at supporting additional layouts on the Mega 2560 including the double row end connector, and the ESP32/ESP8266 as add-on boards.
« Last Edit: October 27, 2019, 05:02:26 pm by WaveyDipole »
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14765
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #268 on: October 27, 2019, 06:26:27 pm »
A 3.3 V chip with 5 V tolerant pins would actually be a good choice for the inputs, as this would give a good threshold level - a weak point when using an AVR at 5 V.  However it also needs outputs that can sink quite some current. 12 mA would be a little on the low side for more instruments. It may still work with 2 instruments - not all instruments have the same pull ups and actual threshold level.

AFAIK there are a few pins that work as input and output. So with extra drivers one would likely need extra pins in and out for these unless one uses special bidirectional transceivers.
 

Offline artag

  • Super Contributor
  • ***
  • Posts: 1228
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #269 on: October 27, 2019, 09:18:59 pm »
Macboy pointed out upthread that the correct GPIB bus drive (at least for low speed - there is a high speed option that uses totem pole drive) is actually a 3v3 / 2k thevenin equivalent source (a divider made from 3k1 and 6k2 resistors) with open collector drive.  So it might be OK, though you'd either have to add the resistor networks or rely on the others on the bus. You could add transistors if necessary but that gets complicated with the direction switching. Maybe the popular fet-based i2c level switching circuit would work.

For a wifi interface the desire to run multiple instruments seems even less important. Personally I'm not that fond of wifi for instrumentation or control - its OK for something that can handle a bit of stutter and retry but I wouldn't want it on something that's supposed to be reliable and consistent. Even though my testgear is a couple of feet away from my router.

I think the blue pill board has the same problem, but that's got a mixture of 3v3 and 5v capable pins. there may be enough 5v pins to work.
« Last Edit: October 27, 2019, 09:22:14 pm by artag »
 

Online macboy

  • Super Contributor
  • ***
  • Posts: 2287
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #270 on: October 29, 2019, 02:12:07 pm »
Thanks, artag, I remembered pointing out the 3.3 V signal level somewhere, but couldn't remember if it was this thread or another.  In combination with appropriate clamping to protect the MCU inputs, this makes a workable solution. The GPIB bus' nominal TTL logic levels of <0.8 V for LO and >2.0 V for HI are actually much more closely compatible with 3.3 V CMOS thresholds than with 5 V CMOS thresholds, which is an important point made in my previous post.

Another option is bidirectional level shifters, like those used for I2C, as that is also an open-collector bus. These are commonly and cheaply available built up on little PCBs, sold as an Arduino module (like so many other things) for prototyping, or just build them on your PCB if you are rolling one. These use one NMOS and two resistors per data line, in an interesting configuration which uses the conductive mode of the NMOS in one direction, and its body diode in the other. Using these may introduce speed and/or current limits (consider pull-up R strength). Certainly not suggested for > 1 GPIB device.
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3501
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #271 on: October 30, 2019, 01:25:04 am »
GPIB was *implemented* with 5 V TTL.  So it is *completely* compatible with 5 V TTL.

The  HP 37203A HP-IB Extender I bought for the case is full of 7400 series logic chips. 3.3 V logic did not even exist when HP-IB was designed and went to market.

Logic high for 5 V TTL is about 3.3 V.  Read the first chapter of Don Lancaster's "TTL Cookbook".
 

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1447
  • Country: us
  • Very dangerous - may attack at any time
Re: AR488 Arduino-based GPIB adapter
« Reply #272 on: October 30, 2019, 01:34:30 am »
The  HP 37203A HP-IB Extender I bought for the case is full of 7400 series logic chips.

...and four MC3446 GPIB bus transceivers. The GPIB bus itself is not TTL. You will find 75160/75161/75162 chips in most instruments with GPIB.
 

Online macboy

  • Super Contributor
  • ***
  • Posts: 2287
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #273 on: October 30, 2019, 02:38:10 am »
GPIB was *implemented* with 5 V TTL.  So it is *completely* compatible with 5 V TTL.

The  HP 37203A HP-IB Extender I bought for the case is full of 7400 series logic chips. 3.3 V logic did not even exist when HP-IB was designed and went to market.

Logic high for 5 V TTL is about 3.3 V.  Read the first chapter of Don Lancaster's "TTL Cookbook".

Re-read what I said... more compatible with 3.3V CMOS than 5 V CMOS.

Logic high on a TTL input is not 3.3 V but 2.0 V and above. Low is 0.8 V and below. In between is undefined.  Arduino (Atmega328P) inputs are not TTL, they are CMOS, and the levels are not fully compatible at a given Vdd. At 5 V, CMOS will interpret 2.1 V as low, and TTL (GPIB) as high.
 

Offline mimmus78

  • Supporter
  • ****
  • Posts: 676
  • Country: it
Re: AR488 Arduino-based GPIB adapter
« Reply #274 on: November 17, 2019, 06:28:24 pm »
I have the first character problem with an ILX LTD-5910.

I'm using current version that is: AR488 GPIB controller, ver. 0.47.53, 25/10/2019

This device is a TEC temperature controller, if I read the current temperature I get always a 3 at begging of the string so that the "20.3" string become "30.3" and only very few times it read the right value.

If I read calibration string I get "�LX CALDATE 7-5-89" while it should be "ILX CALDATE 7-5-89".

Tested LTD-5910 with another GPIB controller and it was reading ok.

Any help?

MORE DETAILS 1: no code changes, just uncommented the board type that is an arduino mega, wired as per doc - only one device on the bus
« Last Edit: November 18, 2019, 09:29:01 am by mimmus78 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf