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

0 Members and 2 Guests are viewing this topic.

Offline Jay_esp32

  • Newbie
  • Posts: 2
  • Country: be
Re: AR488 Arduino-based GPIB adapter
« Reply #1050 on: March 03, 2024, 05:17:44 pm »
Hello, newly registered here....i have some old hp test equipment..8903b, 3478a and lots more, i came across the ar488 and built one based on the arduino nano. I want to use labview (community edition) and found that the prologix labview example did not work at all, i could not find much information on ar488 combined with labview. I debugged it and found that on connection the arduino resets itself, this is by design in order to program it from the arduino IDE but the labview code does not see anything returned after a command is sent because the nano is restarting during the time the command is sent and does not "see" it. This can be solved by adding a little delay after the opening of the visa device in labview. Maybe something to add to the readme of the ar488 code. 
 
The following users thanked this post: WaveyDipole

Offline Miti

  • Super Contributor
  • ***
  • Posts: 1341
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #1051 on: March 04, 2024, 12:00:08 am »
Remove the capacitor on the reset line.
Fear does not stop death, it stops life.
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #1052 on: March 12, 2024, 10:21:10 pm »
Hello, newly registered here....i have some old hp test equipment..8903b, 3478a and lots more, i came across the ar488 and built one based on the arduino nano. I want to use labview (community edition) and found that the prologix labview example did not work at all, i could not find much information on ar488 combined with labview. I debugged it and found that on connection the arduino resets itself, this is by design in order to program it from the arduino IDE but the labview code does not see anything returned after a command is sent because the nano is restarting during the time the command is sent and does not "see" it. This can be solved by adding a little delay after the opening of the visa device in labview. Maybe something to add to the readme of the ar488 code.

Jay, thank you for your interest in the AR488 project and your feedback. This problem is a known issue with older Arduino AVR boards such as the UNO R3, Nano or Mega 2560 due to the way the serial UART is implemented in order to allow the board to be programmed. It is less of a problem with the Micro or Leonardo which has a CDC serial port and a reset does not have to be forced in order to program them. I am not yet sure about the UNO R4 or the Nano BLE33 and Nano RP2040 Connect boards. I purchased the Nano Connect to test but have not got around to it yet.

If you could provide me with details (including screenshots or example listing) of what you did to add the delay after opening a visa device in labview, I would be happy to include that in the User Manual.
« Last Edit: March 12, 2024, 10:24:52 pm by WaveyDipole »
 

Offline lmester

  • Regular Contributor
  • *
  • Posts: 143
  • Country: us
    • My page
Re: AR488 Arduino-based GPIB adapter
« Reply #1053 on: March 16, 2024, 08:02:38 pm »


I have users of my HP 3478A multimeter control software that are getting checksum errors when trying to read the calibration data. This is happening with newer AR488 firmware versions. Older firmware works fine.

Might be down to the EOI bug (Issue 9) reported by m0pub? This has been addressed in the latest release which might be worth a try. Will be interested to know if the problem still persists.


The problem is still there with 0.51.28. It's very specific. You get a checksum error on the first and third cal entries.

Code: [Select]
AR488 GPIB controller, ver. 0.49.14, 02/03/2021
Reading calibration data.
**********
Verify checksums.
@@@CA@BLLLNLG : CkSum = (199 + 56) Checksum OK.
@@@@CABLLCOLO : CkSum = (207 + 48) Checksum OK.
@@@@@DBLLOELM : CkSum = (205 + 50) Checksum OK.
IIIIIDAEBAOKF : CkSum = (182 + 73) Checksum OK.
@@@@@@AEBMNML : CkSum = (220 + 35) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.
IIIE@BADODEL@ : CkSum = (192 + 63) Checksum OK.
IIII@D@E@MNKG : CkSum = (183 + 72) Checksum OK.
IIIIIA@EDNNJL : CkSum = (172 + 83) Checksum OK.
IIIIII@ECDDKI : CkSum = (185 + 70) Checksum OK.
IIIIII@EABLKE : CkSum = (181 + 74) Checksum OK.
IIIIII@EBBOKA : CkSum = (177 + 78) Checksum OK.
IIIIII@EBMAKD : CkSum = (180 + 75) Checksum OK.
IIIIII@EBDOJO : CkSum = (175 + 80) Checksum OK.
@@@BF@CNOE@MB : CkSum = (210 + 45) Checksum OK.
@@@@BECN@@MMJ : CkSum = (218 + 37) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.
IIIE@BCLCOBKJ : CkSum = (186 + 69) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.

Reading calibration data complete.
Calibration data checksum valid.
Calibration data saved to:D:\HP3478A_6\cfg\HP3478A.cal

#################################################

AR488 GPIB controller, ver. 0.51.18, 26/02/2023
Reading calibration data.
**********
Verify checksums.
@@@CA@BLLGNLG : CkSum = (199 + 51) Checksum Fail.
@@@@CABLLCOLO : CkSum = (207 + 48) Checksum OK.
G@@@@DBLLOELM : CkSum = (205 + 57) Checksum Fail.
IIIIIDAEBAOKF : CkSum = (182 + 73) Checksum OK.
@@@@@@AEBMNML : CkSum = (220 + 35) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.
IIIE@BADODEL@ : CkSum = (192 + 63) Checksum OK.
IIII@D@E@MNKG : CkSum = (183 + 72) Checksum OK.
IIIIIA@EDNNJL : CkSum = (172 + 83) Checksum OK.
IIIIII@ECDDKI : CkSum = (185 + 70) Checksum OK.
IIIIII@EABLKE : CkSum = (181 + 74) Checksum OK.
IIIIII@EBBOKA : CkSum = (177 + 78) Checksum OK.
IIIIII@EBMAKD : CkSum = (180 + 75) Checksum OK.
IIIIII@EBDOJO : CkSum = (175 + 80) Checksum OK.
@@@BF@CNOE@MB : CkSum = (210 + 45) Checksum OK.
@@@@BECN@@MMJ : CkSum = (218 + 37) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.
IIIE@BCLCOBKJ : CkSum = (186 + 69) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.

Reading calibration data complete.
Calibration data not saved. Invalid checksum!

There are more examples of this on the How to read/write cal SRAM thread. https://www.eevblog.com/forum/repair/hp-3478a-how-to-readwrite-cal-sram/msg5391623/#msg5391623
 
The following users thanked this post: WaveyDipole

Offline Jay_esp32

  • Newbie
  • Posts: 2
  • Country: be
Re: AR488 Arduino-based GPIB adapter
« Reply #1054 on: March 17, 2024, 01:37:54 pm »
Here is example code to initialise the ar488 in labview, i made the delay (3 seconds) optional. The reset at the end sends the ++clr command, also optional, to reset the measurement device to its default settings.
I nearly completed the software for the 8903b audio analyser, it works excusively on the ar488 and equivalents (prologix, galvant) and will be made available free of charge.
 
The following users thanked this post: WaveyDipole

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #1055 on: March 18, 2024, 08:41:57 pm »
The problem is still there with 0.51.28. It's very specific. You get a checksum error on the first and third cal entries.

Thanks for bringing this to my attention and posting the link to the other thread where this has been discussed in further detail and the problem identified. An update has now been posted to the repository and confirmation received that is seems to work fine now.
 

Offline CraigD73

  • Contributor
  • Posts: 19
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #1056 on: March 31, 2024, 04:12:06 am »
Just cobbled together a 488 connector connected to an old UNO. Compiled the code and managed to get a *IDN? reply from my HP53131A counter.   At first I got nothing but after setting the auto to 1 the counter's response showed up.  Next I need to try out my HP8657B signal generator.

Thanks for the nice piece of code and project manual.
 

Offline Kofen

  • Newbie
  • Posts: 3
  • Country: no
Re: AR488 Arduino-based GPIB adapter
« Reply #1057 on: May 24, 2024, 02:26:46 pm »
Hi all and WaveyDipole

To make a long story short, I have one Prologix Ethernet adapter and many GPIB instrument, normally they should be able to all be connected, even if off, but unfortunately not all instruments
stick to the standard, leaving me to either reconnect or have several unnecessary devices on.

To make life easy, I have decided to use one gpib adapter on each instrument, as a simple way of solving this issue. However, the prologix adapter is about 500 euro, leaving an investment of 5000 euro to get all my gear on a single adapter!

Luckily WaveyDipole and others has done a really great work on the AR488!
But what is missing for my case is ethernet support, I really don’t want 10+ usb serial devices to keep track of, needing to relay them over a server.

Therefore I have started to implement a fork of the project that supports ethernet as well as usb-serial as before. I have committed a fully working proof of concept, but a lot of work remains to fully integrate it, it is not the most robust interface right now, but when replacing the original prologix adapter with the prototype, all my scripts works as if nothing has happened. I have NOT tested every function! It still maintains it support for using serial instead of ethernet, but I have not tested everything here either. It should be considered a working prototype at this stage.
There is also added support for external microchip eeprom that has a unique mac address, tested, but not implemented the actual part of assigning the mac based on the eeprom, everything is hard coded right now.

Reason for this post is that I wanted to say thanks and to check if there is any interest, or maybe ongoing implementation of ethernet for the original repro? In an ideal world I think it would be cool if we could keep it to one code base, instead of me going of in my own direction.
The project has grown quite large and it is a bit due for a restructure to improve readability.
I will gladly help, but I also fully respect if neither ethernet, my way of doing it or other changes are wanted.

I have started on PCB for the ethernet version, supporting either power over ethernet or usb-c.
The usb-c will be a fully functional serial interface and I think default debug on the serial port with the possibility to switch the usb interface as the main interface can be handy.

Right now the form factor is about the same as the prologix, but will see how it turns out.
I am using the atmega4809 as it has enough flash to support ethernet and dhcp and is very cheap, I try to focus a bit on the cost, since I will need at least 10 units. If I can get 10 DIY interfaces for the price of one prologix and some hours spent, I will be very happy.

I did a quick speed comparison, with no attempt to optimize the code, and right now my fork is about 10 times slower than the prologix adapter. I can transfer about 3.2kB/s right now, and to be honest, I think that is fast enough for my needs. But still something I will look into, I haven't even
used the fastest port mapping(using the default custom config option).

Used a curiosity nano with an Arduino ethernet shield 2 to prototype it, but it should work fine with a mega or uno wifi rev2 etc as long as it has big enough flash.

My fork is up here: https://github.com/Kofen/AR488

Realize this post isn’t so short after all, sorry for the wall of text!
« Last Edit: May 24, 2024, 05:25:21 pm by Kofen »
 
The following users thanked this post: voltsandjolts, ZigmundRat

Offline ZigmundRat

  • Regular Contributor
  • *
  • Posts: 129
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #1058 on: May 29, 2024, 02:37:32 am »
Well, I appreciate the effort :)
Lots of devices out there with GPIB and an affordable Ethernet access method is welcome.
 

Offline mankan

  • Regular Contributor
  • *
  • Posts: 102
  • Country: se
Re: AR488 Arduino-based GPIB adapter
« Reply #1059 on: June 13, 2024, 10:07:24 pm »
I built a Arduino Pro Mini Atmega32U4 today and got it working fine with KE5FX tools including as a plotter with the HP 7470A emulator.

Then I built the Arduino Nano variant with CH340, which I cannot get the KE5FX GPIB configurator to find. I can use a serial terminal to confirm the ++auto setting as well as the SW version string "AR488 GPIB-USB version 6". My Nano needs to have the old bootloader processor selected in the Arduino IDE:

I have connected pin 9 and 14 on the CH340. Do I need to do the binary patching as well? Any other hints or tips?
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 6320
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #1060 on: June 14, 2024, 02:09:03 pm »
it may depend on how the ch340 chip works, it is declared as a com port once the drivers are installed  ....   

32u4  can be directly connected on usb, use lufa,  declared as usbtmc  etc ...   witch is not the same

i dont think  it will work ...   i may be wrong

i use pro / micro arduino's and 32u4 based one and work fine
 

Offline mankan

  • Regular Contributor
  • *
  • Posts: 102
  • Country: se
Re: AR488 Arduino-based GPIB adapter
« Reply #1061 on: June 14, 2024, 03:42:31 pm »
Yes, Nano is serial port based just as Prologix. Yep, I also reported that 32U4 based works fine.
I've also double checked which CH340 I have, looks like C or G. However, that is moot since both have the same CTS, and RTS pins.
 

Offline mankan

  • Regular Contributor
  • *
  • Posts: 102
  • Country: se
Re: AR488 Arduino-based GPIB adapter
« Reply #1062 on: June 16, 2024, 05:31:57 pm »
Solved it by scanning thru this thread. So I added a 10uF capacitor between RST and GND to prevent the rebooting during serial connection.
 

Online voltsandjolts

  • Supporter
  • ****
  • Posts: 2370
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #1063 on: July 30, 2024, 01:50:44 pm »
Cross-ref to a another site with experiences of using AR488 with Racal 1998 counter....tldr: all good, just a bit slower than a Prologix when sampling fast.

https://www.circuitsonline.net/forum/view/161348
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf