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

0 Members and 1 Guest are viewing this topic.

Offline artag

  • Super Contributor
  • ***
  • Posts: 1064
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #725 on: June 13, 2021, 07:00:22 pm »
Good to see all those little adapters. That's exactly how I thought they should be used.
 

Offline maxwell3e10

  • Frequent Contributor
  • **
  • Posts: 869
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #726 on: June 14, 2021, 02:32:41 am »
Thanks for writing the program for HP3457! I tested it and it looks like there is a lot of useful functionality there!
A few things that didn't seem to work:
Pressing on Graph caused the program to crash every time. It said "could not add data to graph window" and did not open any new window on Windows 7. Table feature works OK.
(minor) Switching gender of speech voice doesn't work

A few things that would be nice to add:
A way to save current configuration, so the meter can be restored to previous state. It can be done using SSTATE and RSTATE commands of HP3457 or the program could keep its own configuration file to keep track of other parameters.

A way to use a scanner card. The simplest step is just add CHAN command. The next feature to implement is SLIST and SADV command. A more complicated feature would allow different types of measurements on different channels, but that comes closer to scripting and would be awkward to add.

Add the cal memory dump feature. There are such programs, but I have yet to find one that works seamlessly with AR488.
https://www.eevblog.com/forum/metrology/dumping-cal-ram-of-a-hp3457a/?all
https://www.eevblog.com/forum/metrology/3458a-logging-via-windows-app-revisited/?all
 

Offline Nx-1997

  • Regular Contributor
  • *
  • Posts: 112
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #727 on: June 14, 2021, 08:03:29 am »
Thanks for the feedback.

I was able to replicate the graph window crashing the program. Net framework 4.7.2 is required, you probably have an older .NET framework installed. I probably should have mentioned this on the GitHub download page, my bad. I included instructions on how to install 4.7.2 framework on Windows 7 if there are any difficulties installing it.

Also, for the speech synthesizer issue, Windows 7 only has the female voice installed. The voice gender options will have no effect on Winnows 7. Microsoft improved the speech synthesizer feature on Windows 10, its much better compared to Windows 7.

Adding a way to save the current configuration might not be easy, this is due to how I wrote this software.

My 3457A does not have the scanner card option, it has the rear terminals option installed. So, I can't really add this feature to the software as I have no way of testing it.

I am working on HP3457A Cal dump utility for AR488, it will be a separate app. The app will only read the cal info, not write it. As I am scared to implement the cal write feature and test it.
 
The following users thanked this post: maxwell3e10

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #728 on: June 14, 2021, 10:08:58 am »
Alright, I finished making GUI software for 34401A, 3457A, 3456A, and 3478A. They will work with Windows 10, 7, 8. I personally tested them on Window 10 and 7.
You can download the software from their GitHub links. Let me know if you encounter any issues.

Thank you for posting this. I have downloaded the HP34401A version and since I work on Linux, will test it in Wine when I have some spare time.
 

Offline maxwell3e10

  • Frequent Contributor
  • **
  • Posts: 869
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #729 on: June 14, 2021, 02:20:01 pm »
Nx-1997, thanks for quick reply and detailed instructions on .NET installation. Now the graph window opens and it has lots of goodies!

Maybe a general approach to handle commands that are not implemented is just to add a terminal window for direct SCPI commands.
 

Offline Nx-1997

  • Regular Contributor
  • *
  • Posts: 112
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #730 on: June 14, 2021, 04:56:41 pm »
For the HP3457A, I updated the software. I added the ability to send custom commands. The users are responsible for any errors shown by the meter due to bad commands. Also, I tested the SSTATE and RSTATE commands. They work but the software keeps track of the measurement settings locally, so if you use SSTATE/RSTATE commands to change the meter's config such as DCV to ACV, the software will not reflect these changes. I am not doing to do anything about that, sorry.

For the HP344401A, I tried running the software on Ubuntu 20.04 LTS using Wine with no success. Every time I try to open the COM Selecting window the software crashes. I think the best bet is to run the software in a windows virtual machine, kind of extreme in my opinion.
 
The following users thanked this post: maxwell3e10

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #731 on: June 17, 2021, 08:07:00 am »
So far, I haven't been able to get the program to run at all on Wine. I have the latest version from WineHQ, but there appears to be something missing:

0548:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)

0548:err:eventlog:ReportEventW L"An unhandled Microsoft .NET Framework exception occurred in HP 34401A.exe [1320]. Just-In-Time debugging this exception failed with the following error: Not implemented.\n\nCheck the documentation index for 'Just-in-time debugging, errors' for more information."

0504:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)

I am not sure where to find this missing component? Winetricks shows only common-controls 5.80
I am assuming its a 64-bit app? I tried downloading and installing VisualBasic6-KB896559-v1-ENU.exe but that didn't help.

Regarding serial ports, this might be useful:

https://wiki.winehq.org/index.php?title=Wine_User%27s_Guide&oldid=2519#Serial_and_Parallel_Ports

They get mapped in a rather strange manner but you can also map them manually. The command:

ls -l ~/.wine/dosdevices

lets you see what is mapped to where.
 

Offline maxwell3e10

  • Frequent Contributor
  • **
  • Posts: 869
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #732 on: June 19, 2021, 01:06:22 pm »
For the HP3457A, I updated the software. I added the ability to send custom commands.
Thanks! I was able to use it now for my current project involving scanning several channels at high resolution and it works well.
A few more suggestions based on the use:
Acquisition:
Add number of samples/second received recently, maybe on the bottom where number of samples is shown, useful for optimizing throughput
Graph window:
Add an option to have x axis in seconds
Add rectangular window zooming. Using right mouse button works, but hard to zoom on region of interest
Maybe add manual axis range choice
Regarding 3457 7th digit:
I saw in the code you check the Range of DMM, perhaps its necessary in some cases, but also slows it down somewhat
When saving to log file, its not necessary always to save different components of the 7th digit.

 

Offline maxwell3e10

  • Frequent Contributor
  • **
  • Posts: 869
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #733 on: July 06, 2021, 02:00:38 am »
I am working on HP3457A Cal dump utility for AR488, it will be a separate app. The app will only read the cal info, not write it. As I am scared to implement the cal write feature and test it.
Did you get a chance to finish the cal dump utility for HP3457A?
Thanks
 

Offline Nx-1997

  • Regular Contributor
  • *
  • Posts: 112
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #734 on: July 06, 2021, 08:39:03 pm »
Hi, maxwell3e10

Sorry, I could not reply earlier. I did finish the cal dump utility for HP3457A. The only thing missing is to convert the received data into a proper bin file, I will implement this in the coming few weeks.
Be wary of PEEK 10, PEEK 12 and PEEK 14 those peek values may not return data. You can try it out when you have time.

GitHub Link: https://github.com/Niravk1997/HP3457A-Calibration-Dump-Utility-for-AR488-GPIB-Adapter
GitHub Download Link: https://github.com/Niravk1997/HP3457A-Calibration-Dump-Utility-for-AR488-GPIB-Adapter/releases

Also, as for 3457A's 7th digit range check, the reason why range needs to be checked is due to auto range and is required to calculate the proper number of significant digits. I got this idea from Sigrok's HP3457A source code. Link, see line 309: https://sigrok.org/gitweb/?p=libsigrok.git;a=blob;f=src/hardware/hp-3457a/protocol.c;h=f0197290f3b6d0e4825194335309d8a1a0df8d42;hb=HEAD

I also improved NPLC 100 measurement speed, it should be much faster now. The Rectangular zoom region was already implemented, click and hold the middle mouse button on the graph. Date Time graph has also been added, see if that might be of any use to you.

I included the calibration dump for my HP3457A, old revision address and new revision address.
 
The following users thanked this post: maxwell3e10

Offline softfoot

  • Contributor
  • Posts: 44
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #735 on: August 21, 2021, 04:33:47 pm »
Hi, I have been using a UNO based interface for a while now using version "ver. 0.48.24, 25/04/2020".

I recently tried to upgrade to "ver. 0.49.14, 02/03/2021" and ran into a problem with the "LON 1" command.

I use the command sequence "++mode 0" "++addr 5" "++lon 1" to capture from a TEK 744A scope.

Under 0.48.24 the firmware returned to command mode at the end of the data stream (due to an EOI?).
However, 0.49.14 doesnt ... it reports seeing an EOI but just sits there reporting a timeout see the attached log file.

I also tried with "++eoi 1" thinking that may bee needed but it made no difference .

Regards,
Dave
« Last Edit: August 21, 2021, 04:55:14 pm by softfoot »
Grumpy Old Software/Hardware Engineering Git
Dave
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #736 on: August 23, 2021, 02:53:05 pm »
Thanks for posting and for the log. I will have a look when I get a chance.
 

Offline softfoot

  • Contributor
  • Posts: 44
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #737 on: August 23, 2021, 05:30:30 pm »

Thanks, Actually it seems to be worse than that ... while LON==1 it also ignores all ++ commands.

I also found that the screen dump data passed up via the USB is corrupted ... with teraterm logging in binary mode the data copied to the log file is wrong - it worked beautifully under "ver. 0.48.24, 25/04/2020".

Going back to "ver. 0.48.24, 25/04/2020" for now.

Best regards,
Dave
Grumpy Old Software/Hardware Engineering Git
Dave
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #738 on: August 24, 2021, 04:18:05 pm »
That's odd as I didn't make any changes that ought to impact LON. Still, thanks for reporting it. I will have a look and do some testing.
 

Offline Nx-1997

  • Regular Contributor
  • *
  • Posts: 112
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #739 on: September 06, 2021, 03:47:10 am »
I got the Tektronix Hardcopy capture working with the latest firmware, for pro micro adapter. I used ++eor 7, ++eoi 1, ++read_tmo_ms 8000, ++addr GPIB_Address, everything else is default. I tested it with TDS784D and TDS684B. I made an app for it, https://github.com/Niravk1997/Tektronix_TDS_HardCopy_AR488
Mono Hardcopy takes 7.5 seconds while color takes 31 seconds.
Not sure if the app will work with UNO adapter.
 
The following users thanked this post: croma641, Gertjan, dl6lr

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #740 on: September 20, 2021, 05:25:14 pm »
Looks like a very nice app. Unfortunately I don't have one of the supported Tek instruments nor a C# installation to test with with so am not in a position to provide any feedback. It does look like you have a lot of Leonardo's connected there?
« Last Edit: September 20, 2021, 05:30:38 pm by WaveyDipole »
 

Offline justjason

  • Contributor
  • Posts: 18
  • Country: it
Re: AR488 Arduino-based GPIB adapter
« Reply #741 on: October 03, 2021, 04:15:15 pm »
Is anyone using this project to send data to an actual plotter over GPIB? Looking at the issues on Git https://github.com/Twilight-Logic/AR488/issues/12 I am not clear about the flow control capabilities when sending large HPGL files that would over flow the buffer without flow control.
« Last Edit: October 03, 2021, 04:23:04 pm by justjason »
 

Offline null-a

  • Newbie
  • Posts: 8
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #742 on: October 06, 2021, 02:35:19 pm »
(Edited to add: The PCBs mentioned below have now all been taken.)

I have a few Pro Micro PCBs left over from a run I did at JLCPCB, using the gerbers from earlier in this thread:

https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3362552/#msg3362552

If you're in the UK and would like one, message me and I'll happily send you one in the post. (First come, first served, I suppose.)

P.S. This is a lovely project -- thanks to everyone involved!
« Last Edit: November 17, 2021, 01:40:06 pm by null-a »
 
The following users thanked this post: artag

Offline leo1984

  • Newbie
  • Posts: 3
  • Country: it
Re: AR488 Arduino-based GPIB adapter
« Reply #743 on: November 12, 2021, 05:29:27 pm »
I have a potentiostat/galvanostat from EG&G Princeton Applied Research model 263A v2.19, with ieee 488 socket (attached picture). i need to connect it to a modern pc, do you think this AR488 will be suitable for the scope? How can i check the compatibility a priori?
« Last Edit: November 12, 2021, 08:27:02 pm by leo1984 »
 

Offline caiser01

  • Regular Contributor
  • *
  • Posts: 61
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #744 on: November 13, 2021, 08:17:15 pm »
I wanted to say a big thanks to WaveyDipole, artag, and all the others who've contributed to AR488.

I just came across this fantastic project a few weeks ago so I decided to get some parts and try it out.

I used artag's V3 PCB design: https://oshpark.com/shared_projects/yfUOmUzA
(If you want to use a different PCB vendor, you can still download the Gerbers at that link)

For the Arduino Pro Micro, I bought the HiLetgo version: https://www.amazon.com/HiLetgo-Atmega32U4-Bootloadered-Development-Microcontroller/dp/B01MTU9GOB

The connectors came from Digi-Key:
https://www.digikey.com/en/products/detail/norcomp-inc/111-024-113L001/955147
https://www.digikey.com/en/products/detail/sullins-connector-solutions/PPTC121LFBN-RC/807231

Once I had all the parts in hand, it was simply a matter of soldering the connectors to the boards, plugging in the Arduino, and flashing the code. I did not have to make any changes to the code at all.

This project is just as good as people have been saying; way better than using an NI USB GPIB adapter with their bloated software as I did about 10 years ago.

And yes, I'm another person looking forward to finally backing up my HP 3478A calibration!

Again massive thanks to everyone whose made this project happen!
 
The following users thanked this post: croma641, artag

Offline pqass

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #745 on: November 15, 2021, 02:16:54 am »
I would also like to give a big thanks to WaveyDipole and everyone that contributed to AR488.

Last Feb 2020, I remember watching Dave's video on scoring cheap eBay bench meters.  With a little research, I stumbled upon the thread on how to read the 3478A calibration, and then this project.  It was too compelling and so I pulled the trigger and bought my first bench meter.

Using the well written AR488 manual and my Arduino UNO with a junk-shop IEEE488 connector, I successfully read the calibration! I then replaced the battery without incident.

A couple of months ago I turned-on my 3478A and it suddenly reported that it was uncalibrated! It serves me right to buy a 10 year lithium battery from a local guy that's probably been sitting around for 9 of those years.  But since I had downloaded the calibration, reinstalling was a breeze.

I've been mulling over a more robust AR488 implementation for a while (rather than using an UNO) and settled on one with the 7516x drivers. Rather than the  conventional/heavy/expensive multi-conductor cabling, I decided to use flat ribbon with female IDC connectors (like PATA cables); I made my own IDC header to solder-cup IEEE488 connector adapter which is still cheaper than the purpose made IDC-IEEE488 connectors.  I didn't want an AR488 per device and then having to terminate them on a USB hub.  My test gear hoard has since grown to a 34401A and four XANTREX XT-series power supplies; each GPIB controllable.

See attached for my AR488 GPIB-to-RS232 implementation.  Although, I'm seriously considering one with a ENC28J60 Ethernet and PoE. I think both the EtherCard library and AR488 code may just fit in 32KB. It would need a 74HC299 bi-directional serial-to-parallel for GPIB-data and re-mapping the GPIB-control pins to make the SPI pins available for the Ethernet and '299 chips. Maybe when I have more time.

Thank you everyone!
« Last Edit: November 15, 2021, 03:29:24 am by pqass »
 
The following users thanked this post: croma641, bitseeker

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #746 on: November 18, 2021, 03:57:31 pm »
I have a potentiostat/galvanostat from EG&G Princeton Applied Research model 263A v2.19, with ieee 488 socket (attached picture). i need to connect it to a modern pc, do you think this AR488 will be suitable for the scope? How can i check the compatibility a priori?

Having had a look at the manual online, despite the characters on the rear plate, Appendix B describes this as a standard IEE488 port so I see no reason why the AR488 should not enable communication with the instrument using a USB port on your PC.

https://lin-web.clarkson.edu/~skrishna/Model_263A_Command_Set_Handbook.pdf
 
The following users thanked this post: leo1984

Offline leo1984

  • Newbie
  • Posts: 3
  • Country: it
Re: AR488 Arduino-based GPIB adapter
« Reply #747 on: November 18, 2021, 04:08:58 pm »
I have a potentiostat/galvanostat from EG&G Princeton Applied Research model 263A v2.19, with ieee 488 socket (attached picture). i need to connect it to a modern pc, do you think this AR488 will be suitable for the scope? How can i check the compatibility a priori?

Having had a look at the manual online, despite the characters on the rear plate, Appendix B describes this as a standard IEE488 port so I see no reason why the AR488 should not enable communication with the instrument using a USB port on your PC.

https://lin-web.clarkson.edu/~skrishna/Model_263A_Command_Set_Handbook.pdf
Thanks for the confirmation!
 

Offline douardda

  • Regular Contributor
  • *
  • Posts: 82
  • Country: fr
Re: AR488 Arduino-based GPIB adapter
« Reply #748 on: November 21, 2021, 05:15:46 pm »
Hi everyone,

I've recently been working on porting the AR488 project on ESP32 (also made it work on stm32).
Doing so I've started a pretty massive refactoring of the code and started adding new features.

My version of the project is at https://github.com/douardda/AR488/tree/esp32

The things I've done so far:

Concerning the project source code:
- started a major refactoring of the code (e.g. split the big AR488.ino source file in parts) 
- make it compilable on ESP32 (tested with several esp32 and esp32s2 boards) and STM32 (tested with a Nucleo STM32F303)
- use platformio to compile the project   
- port the documentation as a sphinx project https://www.sphinx-doc.org/en/master/ (which results in something like https://sdfa3.org/david/ar488/ )
- use github actions to automatically rebuild the documentation and compile a number of firmware on git push (eg. https://github.com/douardda/AR488/actions/runs/1473093046)

Firmware features
- rewrote the macro system to make macros editable (stored in EEPROM/NVS, so not much room on AVR but plenty on ESP32),
- on esp32: add support for BT-SPP (serial over Bluetooth) and wifi (no web app, just a raw TCP socket, credentials are set using a new '++wifi' commands and stored as config using the '++savecfg' command; the automatic connection to wifi on startup is a matter of adding the '++wifi connect' to the macro 0)
- automatically select the command stream from which there is activity, so you can have the main serial interface, the BT one and the TCP connection at the same time; when you type a command on one of the stream, the AR488 select this stream as main command I/O device)
- add support for the IEEE 488-1 'TCT' command (allow the controller in charge to transfer the control to a device, typically usefull for plottingm see https://pouet.chapril.org/@douardda/107276364706227913 , I've been able to plot from my HP3562A using the HPGL python plotter emulator I wrote years ago having the AR488 in controller mode, but then when I hit the plot button or send the 'PLOT' GPIB command, the HP3562A ask the controller to take control, which the AR488 does using this new 'TCT' command and put itself in device mode listening on address 5, then take back control when the 3652A signal its job is done).
- add support for the IEEE 488-2 'FINDLSTN' common controller protocol (quick list listening devices on the bus, see https://pouet.chapril.org/@douardda/107289038291757650)

The documentation still needs a lot of work to be adapted to all these changes, and all this is far from being done (I am still not satisfied with the code structure, especially the content of commands.cpp, and the responsibility of the 'GPIB' class vs the 'Controller' class; implement OTA on esp32, and many other new features ).
 
I've been discussing with @WaveyDipole about all this, and since he actually also have a bunch of refactoring on his plate, it's not clear yet if this work will be merged back to the main project at some point, or if it will remain as a friendly fork.
 
Anyway I've though this may interest some of you. TBH using "legacy" AVR arduino nowadays does not make a lot of sense when you can get an esp32 board for 5 bucks, so I've kept the code "compatible" with avr boards but I may not keep it that way in the future (my version of the fw already do not fit in the arduino micro anymore for example).

HW side, I've also made a small modular PCB (I am waiting for the delivery from jlcpcb). It's a 2 parts assembly: one with the Centronics socket and the driver ICs (SN7516x, should be compatible with both the SN75161 and SN74162), and a daughter board to adapt to the chosen MCU module (I have made one for the esp32-devkitc, one for the esp32-s2-saola, and one for the Arduino Nano for now):






Once validated, this very simple design will be published.

If any (or all) of this interest you, I'm open for discussions and contributions on github :-)   

David 
« Last Edit: November 21, 2021, 05:21:00 pm by douardda »
 

Offline dl6lr

  • Frequent Contributor
  • **
  • Posts: 458
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #749 on: November 24, 2021, 12:56:18 pm »
I got the Tektronix Hardcopy capture working with the latest firmware, for pro micro adapter. I used ++eor 7, ++eoi 1, ++read_tmo_ms 8000, ++addr GPIB_Address, everything else is default. I tested it with TDS784D and TDS684B.

I debugged a little bit and found: Everything else MUST be default, see above. Especially if the adapter is left in auto-read mode or in device mode, it will not work. Tested with a TDS540 OK (mono only, color will get a mono BMP too as the graphics adapter only supports monochrom, HPGL plots are in color).
 
The following users thanked this post: Nx-1997, WaveyDipole


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf