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

0 Members and 2 Guests are viewing this topic.

Offline Pepsi1

  • Newbie
  • Posts: 1
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #125 on: April 17, 2019, 01:27:53 am »
Glad to be able to use the AR488 software on my Nano 3.0 it gave me the opportunity to make a small 3d case using the Centronics Connector sold by Aliexpress. The design was done using 123D Design.  I have attached the files below.... 
 
The following users thanked this post: Kean, bitseeker

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5906
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #126 on: April 17, 2019, 02:46:03 pm »
I love Pepsi  loll

nice case  :-+
 

Offline maxwell3e10

  • Frequent Contributor
  • **
  • Posts: 869
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #127 on: April 22, 2019, 03:18:53 am »
Here is one application of the ++repeat command. The HP3457A is a 6.5 digit multimeter, but  one can obtain an extra digit for NPLC=10 or 100 by sending a separate GPIB command and adding the result to the previous reading:
https://www.eevblog.com/forum/testgear/the-mysterious-_7th-digit_-(hp-3457a-dmm)/msg385219/#msg385219

This is generally somewhat annoying, so I implemented a different procedure: NPLC 1; NRDGS 10,1; TRIG SGL; - this gets 10 readings at NPLC 1 for each trigger. Then in the repeat command one sets: ++repeat 254 1 MATH STAT;TRIG SGL;RMATH MEAN; -this returns the mean of 10 measurements. It allows direct logging at 7.5 digit resolution, so any serial logger program can be used. It works a little slower, 0.9 sec for each such reading compared with 0.55 sec for one high-resolution reading at NPLC 10.

One could even use the DISP command of the multimeter to display the 7.5 digits on the display in real time if the multimeter response  could be read into the Arduino program as a string and passed on as an argument to another GPIB command.


« Last Edit: April 22, 2019, 03:23:09 am by maxwell3e10 »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #128 on: May 10, 2019, 09:09:53 pm »
It has be brought to my attention that the macro feature was left enabled in the last update. This will cause the example startup macro to run which may cause an unintentional startup configuration. My apologies for this oversight. I have now edited the file to comment out the relevant lines. Anyone downloading after 8/5/2019 will not have this issue.

If you have downloaded sketch version 0.46.20 prior to 8/5/2019 and do have a requirement to use the macro feature, then please comment out lines 29 & 30 in the Macro Options section:

Code: [Select]
//#define MACROS    // Enable the user macros feature
//#define STARTUP   // Enable the startup macro

This will ensure that macros are disabled and the startup macro will not run.

Glad to be able to use the AR488 software on my Nano 3.0 it gave me the opportunity to make a small 3d case using the Centronics Connector sold by Aliexpress. The design was done using 123D Design.  I have attached the files below.... 

I'm glad you have been able to make use of the AR488 sketch and thank you for sharing your case design.

Here is one application of the ++repeat command. The HP3457A is a 6.5 digit multimeter, but  one can obtain an extra digit for NPLC=10 or 100 by sending a separate GPIB command and adding the result to the previous reading:
https://www.eevblog.com/forum/testgear/the-mysterious-_7th-digit_-(hp-3457a-dmm)/msg385219/#msg385219

This is generally somewhat annoying, so I implemented a different procedure: NPLC 1; NRDGS 10,1; TRIG SGL; - this gets 10 readings at NPLC 1 for each trigger. Then in the repeat command one sets: ++repeat 254 1 MATH STAT;TRIG SGL;RMATH MEAN; -this returns the mean of 10 measurements. It allows direct logging at 7.5 digit resolution, so any serial logger program can be used. It works a little slower, 0.9 sec for each such reading compared with 0.55 sec for one high-resolution reading at NPLC 10.

That's an interesting and clever use of ++repeat to get 7.5 digit logging. Thank you for sharing it.

One could even use the DISP command of the multimeter to display the 7.5 digits on the display in real time if the multimeter response  could be read into the Arduino program as a string and passed on as an argument to another GPIB command.

I will investigate this possibility when time allows. Thanks.
« Last Edit: May 10, 2019, 09:30:00 pm by WaveyDipole »
 

Offline maxwell3e10

  • Frequent Contributor
  • **
  • Posts: 869
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #129 on: May 10, 2019, 11:11:06 pm »
Thanks for updating the code. I continue to find new uses of it. For example, one can use the startup macro to initialize internal parameters. Mine now has:
"++read_tmo_ms 10000 \n"
"++tmbus 0 \n"

It may be useful to provide explicitly the documentation and initialization of all internal parameters in the beginning of the file. Also documentation of the "repeat" command in the beginning of the file, as I keep referring back to this blog to check on the syntax.


 

Offline rachdatu

  • Regular Contributor
  • *
  • Posts: 54
  • Country: ch
Re: AR488 Arduino-based GPIB adapter
« Reply #130 on: May 18, 2019, 10:48:41 am »
@WaveyDipole
That's a very cool application. Congratulations!  :-+
I had to verify if my PM6666 counter was working so I quickly built an AR488 with an Arduino Uno.
And eveything works!

I guess I can put one of these cheap Saleae 16 channels logic analyzer clones between the GPIB connector and the Arduino to look at some signals.

Thanks again

Walter
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5906
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #131 on: May 21, 2019, 10:13:07 am »
have you seen the newest pre-order arduinos ?   :  the  Every, the nano 33 IOT / BLE  .... they start at 10$ usd ...     But not so sure they have 5 v  i/o 's,  seems to be yes  on the mega datasheet.

Maybe more memory and speed would  help future implementations ??
« Last Edit: May 21, 2019, 10:15:27 am by coromonadalix »
 

Offline H.O

  • Frequent Contributor
  • **
  • Posts: 816
  • Country: se
Re: AR488 Arduino-based GPIB adapter
« Reply #132 on: May 23, 2019, 06:17:56 pm »
Just wanted to say thank you to WaveyDipole and anyone else involved in this. I've be contemplating getting one of the Chinese copies of the Agilent adapter but this seem to do what I need.

Since I don't yet have a 3D-printer I asked a colleague to print a nice little enclosure for me:

 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #133 on: May 27, 2019, 05:04:55 pm »
H.O, That's a really nice case! Certainly more professional than my cheap acrylic one from eBay!

@WaveyDipole
That's a very cool application. Congratulations!  :-+
Well the original credit goes to Emanualle Girlando. I sort of picked up, I believe, due to time constraints.
https://egirland.blogspot.com/2014/03/arduino-uno-as-usb-to-gpib-controller.html

I had to verify if my PM6666 counter was working so I quickly built an AR488 with an Arduino Uno.
And eveything works!
Glad to hear it helped you out.

I guess I can put one of these cheap Saleae 16 channels logic analyzer clones between the GPIB connector and the Arduino to look at some signals.
Yes that is exactly what I did to help me with development. It can be a little puzzling to follow what is going on at first but its not that difficult. The probe wires do add a little noise, but it does work.

have you seen the newest pre-order arduinos ?   :  the  Every, the nano 33 IOT / BLE  .... they start at 10$ usd ...     But not so sure they have 5 v  i/o 's,  seems to be yes  on the mega datasheet.

Maybe more memory and speed would  help future implementations ??
Not until just now when I saw your post!. Had a quick read up on it. I wonder whether pins A6 and A7 are fully functional on the basic 8-bit version? The 32-bit versions look interesting with BT and WiFi built in. And yes, more memory would certainly be useful.
« Last Edit: May 27, 2019, 05:25:35 pm by WaveyDipole »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #134 on: May 29, 2019, 06:32:57 pm »
The sketch has been updated to version 0.46.30. The new version now includes code for Bluetooth support.
A supplementary guide has been uploaded with instructions on setting it up.
« Last Edit: June 01, 2019, 11:12:22 am by WaveyDipole »
 

Offline dkozel

  • Regular Contributor
  • *
  • Posts: 116
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #135 on: July 05, 2019, 09:51:19 am »
Does anyone know who designed the PCBs being sent out as part of the USA Cal Club?

 

Offline vindoline

  • Supporter
  • ****
  • Posts: 324
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #136 on: July 05, 2019, 11:07:37 pm »
Does anyone know who designed the PCBs being sent out as part of the USA Cal Club?



That's me!

Vindoline
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: AR488 Arduino-based GPIB adapter
« Reply #137 on: July 06, 2019, 01:41:07 am »
I thought that photo looked familiar. ;D
TEA is the way. | TEA Time channel
 

Offline vindoline

  • Supporter
  • ****
  • Posts: 324
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #138 on: July 07, 2019, 02:54:38 am »
Does anyone know who designed the PCBs being sent out as part of the USA Cal Club?



Since there's been a bit of interest in my board for the AR488 USB-GPIB project I thought I'd put the Diptrace and Gerber files up on Github (my first!)

If anyone wants to get their own GPIB adapter PCB, the files are at: https://github.com/vindoline/AR488-USB-GPIB

The gerbers have also been shared on OSHPark: https://oshpark.com/shared_projects/zpvaL7rz

For what it's worth, I've frequently seen comments by much more experienced members decrying the fact that these inexpensive adapters don't use the correct GPIB line driver chips and that they probably won't work with multiple devices. I have my little adapter running an automated measurement setup with an HP 3488A switch, an HP 3456A voltmeter, a Fluke 8506A DMM and a Keithley 196 DMM with no problems! YMMV of course!

Have fun! And thank you again for the excellent re-write of the GPIB firmware!  :-+ :-+ :-+
« Last Edit: July 07, 2019, 02:56:13 am by vindoline »
 

Offline ArthurDent

  • Super Contributor
  • ***
  • Posts: 1193
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #139 on: July 07, 2019, 03:18:10 am »
I'm hoping there is still one of the blank boards left when the USA Cal Club reference get to me. I getting pretty close on the list!
 

Offline vindoline

  • Supporter
  • ****
  • Posts: 324
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #140 on: July 07, 2019, 12:34:48 pm »
I'm hoping there is still one of the blank boards left when the USA Cal Club reference get to me. I getting pretty close on the list!

I've got a pretty good feeling that you'll be fine... 8)
 

Offline Kinkless Tetrode

  • Regular Contributor
  • *
  • Posts: 66
  • Country: ca
  • Tubes, Test & Measurement, Audio, and RF
Re: AR488 Arduino-based GPIB adapter
« Reply #141 on: July 12, 2019, 10:06:56 am »
Since there's been a bit of interest in my board for the AR488 USB-GPIB project I thought I'd put the Diptrace and Gerber files up on Github (my first!)

If anyone wants to get their own GPIB adapter PCB, the files are at: https://github.com/vindoline/AR488-USB-GPIB

The gerbers have also been shared on OSHPark: https://oshpark.com/shared_projects/zpvaL7rz

For what it's worth, I've frequently seen comments by much more experienced members decrying the fact that these inexpensive adapters don't use the correct GPIB line driver chips and that they probably won't work with multiple devices. I have my little adapter running an automated measurement setup with an HP 3488A switch, an HP 3456A voltmeter, a Fluke 8506A DMM and a Keithley 196 DMM with no problems! YMMV of course!

Hi vindoline,

Thanks for the links, this is exactly what I've been looking for.

I want to create an automated measurement setup just like what you have.  In fact, we almost have exactly the same equipment.  We are just off by one on the model numbers... I have an HP 3488A, 3457A, Fluke 8505A! (and a Keithley 197 but without GPIB)  :-+

I want to setup a measurement network with 3488A to switch between DMMs and probes and automate the process via GPIB.  I'm just getting started with this project, so I'm still learning the details.

How long has your setup been up and running?  Was it difficult to configure and get it all going?
Whilst others count beans, I count electrons, and photons too.
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: AR488 Arduino-based GPIB adapter
« Reply #142 on: July 14, 2019, 08:32:32 am »
I don't have Prologix's original software, but the behavior I observed with Girlando's code is that in ++auto 1 mode just one ++read command is issued after each command sent to the device. This generally make sense, since most GPIB instruments (except some meters in auto mode) don't have new data available in the buffer for reading at all times, only in response to a specific command.

On the other hand, for the case when data are available, it maybe useful to keep the auto mode as you have implemented it, simulating "Talk only" GPIB mode. So perhaps it would make sense to keep the continuous reading option that you have already implemented with something like ++auto 2 setting.

An even fancier implementation would be to look for "?" as the last character in the command sent to the meter. If there is a ?, then execute one ++read command, if not then don't execute the read command.  Otherwise, the ++auto 1 mode can still cause errors if a command doesn't generate a response from the device.

Or even simpler using ++spoll , the bit 5 of the returned status byte will tell if there is a response waiting in the buffer.
Bit 5 is for 488.2, for older or non-compliant devices check in their manual.
 

Offline vindoline

  • Supporter
  • ****
  • Posts: 324
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #143 on: July 14, 2019, 04:14:19 pm »
Hi vindoline,

Thanks for the links, this is exactly what I've been looking for.

I want to create an automated measurement setup just like what you have.  In fact, we almost have exactly the same equipment.  We are just off by one on the model numbers... I have an HP 3488A, 3457A, Fluke 8505A! (and a Keithley 197 but without GPIB)  :-+

I want to setup a measurement network with 3488A to switch between DMMs and probes and automate the process via GPIB.  I'm just getting started with this project, so I'm still learning the details.

How long has your setup been up and running?  Was it difficult to configure and get it all going?

How difficult it is will depend on your software skills. Mine were practically non-existent at the beginning. My measurement setup consists of the various meters daisy-chained together with GPIB cables. Then the GPIB-USB adapter. This is connected to a headless Raspberry Pi running the various logging scripts written in Python. The Pi also has two BME280 sensors to log the ambient temperature and humidity. I connect to the raspberry Pi from any of my computers by wifi. The starting point for all of my logging scripts was provided by member Muxr. It's called muxrplot: https://github.com/sirmo/muxrplot. If you search, the original posts will show up. One of these days I plan on doing a more complete expaination of the setup.
 
The following users thanked this post: Kinkless Tetrode

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: AR488 Arduino-based GPIB adapter
« Reply #144 on: July 14, 2019, 10:38:35 pm »
Vindoline, let me know when you post that setup description. I'll link to it from the Cal Club User Guide. :-+
TEA is the way. | TEA Time channel
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3483
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #145 on: July 23, 2019, 05:40:10 pm »
First and foremost a *huge* thank you to WaveyDipole, cellularmitosis, TiN and vindoline for their work.

Now that I am logging data and can finally relax I'm thinking about what next.  Trying to combine the system time, the Tempduino T & RH and the DMM measurements was *rather* a headache.

So I've been considering what a better arrangement for logging DMM data would look like and could that be incorporated in the AR488 software.  At present I am using what is basically a pair of Unos each with more than enough horsepower to do everything.

So here's what I am thinking as add ons to the basic AR488 FW functionality for junior league voltnut use.

real time clock
temperature and humidity sensor (possibly more than one)
4-8 port input relay matrix
2-4 port output relay matrix
generation of sampling requests with AR488 (from a table of commands downloaded to the board)
CSV format output stream
option to drive a pair of 44421A relay boards for input and output switching (for TiN and Andreas wannabes ;-)

Over the course of the last few days I was quite appalled at how severely my programming skills had deteriorated during several years in which I did not do any significant programming.  So I need some practice and this seems a good project for accomplishing that.  I hacked the Tempduino code to let me just grab a single T & H pair so I could generate a CSV file with seconds, temperature, humidity, DMM-1 & DMM-2.  I'm going to send that out with the kit as a spare as I was not able to reproduce bitseeker's glitches.  I did not modify the FW in the Uno bitseeker used.

The first order question is, is there anything else someone might want to have incorporated?

The card edge connectors for the 44421A relay boards are *very* difficult to source. I was able to get the driver side connectors from a 3497A backplane headed for scrap, but have not been able to source the input edge connectors.  I bought 3 boards which had the terminal blocks, but those are commonly trashed when the systems are decommissioned. 

So for most purposes just removing the relays for use in a new board makes more sense.  And most of us won't have more than 8 voltage references or resistors to measure or more than 4 DMMs to measure them with.  There are 21 relays on the 44421A boards, so it's around $1.50 per relay.

Comments?  Is there a feature I've missed?  This has been on my "ToDo" list for a long time.  Now is a good time to do it while a lot of the details are fairly fresh in my mind.

Reg
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5906
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #146 on: July 23, 2019, 08:37:22 pm »
Could be practical, but i think this project could not be called AR488 Arduino-based GPIB adapter anymore ??

I could be entirely a new project ?
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: AR488 Arduino-based GPIB adapter
« Reply #147 on: July 23, 2019, 09:49:56 pm »
@rhb, contextually, perhaps you meant to post that in the cal club thread?
TEA is the way. | TEA Time channel
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3483
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #148 on: July 26, 2019, 01:31:13 am »
I meant to post it here because it seems to me a pretty clean extension to select particular GPIO pins to control relays.  It might require a Mega256 instead of an Uno though.  But I don't see that as a big deal.

I *hate* code forks.  Far too much of my career was misery induced by code forks.  I'd much rather add "++input n" and "++output n" to the AR488 code base to control relays and "++date" for the RTC than fork the code base.

If you don't need it or want it, it doesn't cause a problem.  I don't expect WaveyDipole to code it. That would be quite unreasonable.  I'd like to know if he'd accept conditional compilation of the features, and is there more functionality that would be desirable.

I want to have a fully automated calibration system that lets me connect all my gear through a set of relays and cables and do a full cal of all my gear once a year.  Ideally referenced to a small number of references which get sent to a cal lab every 2-3 years.

I have an HP  8648C, 5386A, 8753B, 2x 34401A, 2x 3478A, 438A w/ 8481D & 8482A, 8560A, 8566B, 16500C, 33622A, a couple of GPSDOs and a Tek 11801.   That's the stuff I have today that has a GPIB port.  I'd like to hook up the system, tell it to run and 24 hours later get full cal data for the stack printed out to put in a notebook with suitable notation of  deviations from prior years.
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5906
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #149 on: July 26, 2019, 06:56:07 am »
I'm not  WaveyDipole, he's done a terrrific job up to now,  BUT   i would stay true to the ar488 project.   Other projects / variants should be taken over by other people(s) 

One of the original fork  http://egirland.blogspot.com/2014/03/arduino-uno-as-usb-to-gpib-controller.html  doesn't seem to be updated frequently, now a version 6.1  and it seem pretty stable ?


It can or will be messy with all the forks / versions,  check this error or that error ... the list goes on and on,  It will be time consuming.

As bitseeker wrote  it should be posted in the cal club thread ....
 
The following users thanked this post: vindoline


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf