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

one2one and 1 Guest are viewing this topic.

Offline croma641

  • Contributor
  • Posts: 40
  • Country: it
Re: AR488 Arduino-based GPIB adapter
« Reply #850 on: October 07, 2022, 11:09:38 am »

Apart from the dimensions, is the layout the same with the Mega32u4?
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #851 on: October 09, 2022, 01:24:00 pm »
I have six instruments on the bus. I think it would be more convenient to talk to the instruments through a single interface.

Does this make sense?

Regards,
Jay_Diddy_B

USB hubs and cables are cheap, but if all six of your instruments are placed such that they can be, or already are cabled together with GPIB cables, then this approach including buffer chips might also make sense. Otherwise you would require 6 USB ports and your PC would need to handle up to 6 USB serial connections. An interesting project to be sure and I am very interested to see how it works out!
« Last Edit: October 09, 2022, 01:26:09 pm by WaveyDipole »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #852 on: October 09, 2022, 01:29:02 pm »
Hi,

I think I have detected an incompatibility between the AR488 and the Prologix adapter that seems to cause an issue with the KE5FX VNA toolbox.
The issue is with the ++spoll command. The KE5FX software issues it with an address, i.e. ++spoll 16, where 16 is the primary GPIB address of the polled instrument.

Here is the command sequence that works successful with the Prologix adapter in combination with the HP8510B VNA:

++addr
  16
++spoll
  1
++spoll 16
  1

For better visibility I have indented the adapter responses. So far so good.

Now, here is the same sequence using the AR488:

++ver real
  AR488 GPIB controller, ver. 0.51.09, 20/06/2022
++addr
  16
++spoll
  1
++spoll 16
 => no response from the AR488 which causes the KE5FX VNA tool to lock up.

Have I misunderstood something or can there be done something about this problem?

Thanks and best regards,
Tom DG8SAQ

Tom, could you log an issue please. It will help me keep track.

https://github.com/Twilight-Logic/AR488/issues

Just copy the contents of your post into it. Thanks.
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #853 on: October 09, 2022, 01:38:53 pm »

Hi, with the last firmware version, Timelab (for my experience) doesn't work anymore with my Hp5334a. In particular, I cannot set the instrument in talk mode.

Has anyone had the same problem?

thanks in advance

I am just wondering whether you managed to get this to work? If not, then please could you log an issue at:

https://github.com/Twilight-Logic/AR488/issues

Could you let me know what configuration you are using on the AR488 please?

I did have a look at the ++lon and ++ton commands on the assumption that you are probably using ++ton. I saw enough to establish that there may be possible problems here and I do need to do some further testing and investigating. If you log an issue that will help me to keep track. Thanks.
 

Offline tom_iphi

  • Regular Contributor
  • *
  • Posts: 72
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #854 on: October 09, 2022, 05:05:22 pm »
Quote
Tom, could you log an issue please. It will help me keep track.

Done. Thanks for looking into this!
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #855 on: October 10, 2022, 04:17:16 am »
Hi group,

Today I ordered the Sigrok FX2LP sniffer board contributed by artag. I made a few cosmetic changes to the board:



In working on this I created a couple of step files for the 24-pin microribbon connectors.





I have attached the step files.

Regards,
Jay_Diddy_B
* 3D models microribbon.zip (36.18 kB - downloaded 51 times.)
 
The following users thanked this post: artag

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #856 on: October 10, 2022, 04:52:56 am »
Hi group,

Today I worked on connecting the GPIB bus to an HP 16702A Logic Analyzer. This should also work with a MSOX Oscilloscope. I don't have the 40-pin cable to test this.

Schematic

The schematic and board artwork were generated in KiCAD.



Board Contruction

I made a single-sided PCB using my LKPF Protomat c60. The small traces were 10 mil.



HP 01650-63203 Termination Adapter

This contains 16 networks to isolate the LA from the system under test. It plugs into a 20-pin header on my board.





HP 16702A Logic Analyzer

Here is the result being displayed on an HP 16702A Logic Analyzer. It uses one 16-channel pod.



The data reads: "; <SPC> OUTP <SPC> ON <CR> <LF>"

The problem that I am trying to solve

The first write to a power supply, HP 6673A, doesn't work 100% of the time. This happens if the AR488 is disconnected from the USB port and then written to. I have seen that there is no activity on the GPIB bus. My next step will be to look at the connection between the CH340 and the ATMEGA328P. I don't know if the issue is in my VB.net program, the com port drivers or the AR488.
I have found that if you open a port the DTR line will reset the Arduino.

I am using an Arduino nano, I am not sure which bootloader.


Regards
Jay_Diddy_B
« Last Edit: October 10, 2022, 04:54:32 am by Jay_Diddy_B »
 
The following users thanked this post: edavid

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #857 on: October 10, 2022, 05:31:55 pm »
The problem that I am trying to solve

The first write to a power supply, HP 6673A, doesn't work 100% of the time. This happens if the AR488 is disconnected from the USB port and then written to. I have seen that there is no activity on the GPIB bus. My next step will be to look at the connection between the CH340 and the ATMEGA328P. I don't know if the issue is in my VB.net program, the com port drivers or the AR488.
I have found that if you open a port the DTR line will reset the Arduino.

I am using an Arduino nano, I am not sure which bootloader.

Regards
Jay_Diddy_B

Arduinos such as the UNO and Nano do use the DTR line to reset the Arduino. This is how programming works. During reset, the bootloader checks whether a particular sequence of bytes has been sent to indicate an upload is pending. If so, then it jumps to a routine that uploads the code. If not, then it runs the program already present in memory.

There is approximately a one second delay while the bootloader does its stuff. Any data sent over serial while the bootloader is running and before Serial is initialized (i.e. Serial.begin() ) is simply lost. For this reason, if using one of those boards, time has to be allowed after the serial connection is made, for the Arduino to initialise.

The reset can be prevented by placing a 10μF capacitor between  RST and GND, however, this has to be removed or switched out of circuit form programming. I have read comments from some who do not recommend doing this as they feel it is risky. I haven't had any problem doing this during testing, but if you try it, then you do so at your own risk.

The Pro Micro board and others using the 32u4 MCU do not reset themselves when a serial connection is made.

The camera angle probably makes it look a lot worse than it is, but I do hope that there is not too much mechanical stress on that PCB joint. The HP Termination Adapter looks quite bulky!
« Last Edit: October 10, 2022, 05:39:48 pm by WaveyDipole »
 
The following users thanked this post: Jay_Diddy_B

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #858 on: October 10, 2022, 06:35:26 pm »

Snip ...

There is approximately a one second delay while the bootloader does its stuff. Any data sent over serial while the bootloader is running and before Serial is initialized (i.e. Serial.begin() ) is simply lost. For this reason, if using one of those boards, time has to be allowed after the serial connection is made, for the Arduino to initialise.

Snip ...

The camera angle probably makes it look a lot worse than it is, but I do hope that there is not too much mechanical stress on that PCB joint. The HP Termination Adapter looks quite bulky!


WaveyDipole,

I am sure that you are correct. I will insert a delay in my code to allow the Arduino to start.

This is the reason that I was exploring the buffers. I was having unreliable data transfer on the first instructions sent to the power
 supplies, to turn them on.



I will give you a little insight into the application. I am testing high-power circuit boards. From left to right I have a stack of 2kW power supplies, 6671A (8V 220A) and 6673A (35V 60A). In the middle is my 'scope. and the then loads, power supplies and DMM (2x 3457A) Then another load two 6050As with a total of six 600W modules.

I run the test on multiple computers. I have to remember which instrument is on each port on each computer. If I use a single USB to GPIB interface, this is simpler.

The HP 01650-63203 has a fairly substantial flex circuit board between the two blocks. If I was using it for a longer period of time, I would use a right-angle connector and support the 01650-63203 on the PCB.

Thanks again!!

Jay_Diddy_B

 
The following users thanked this post: Smokey, WaveyDipole

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #859 on: October 11, 2022, 12:19:53 pm »
Hi group,

If made the step files for the straight versions of the microribbon connectors.







Regards,
Jay_Diddy_B
* 3D model microribbon straight.zip (56.67 kB - downloaded 31 times.)
 
The following users thanked this post: DavidKo

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #860 on: October 11, 2022, 04:50:47 pm »
I pushed an update today that should fix the SPOLL problem. If an ++spoll was sent without an address then it would return a status byte from the currently addressed device. If however the address was specified, e.g. ++spoll 3 then it would run into a problem.

I have also looked at and hopefully fixed problems with LON mode.

I have also implemented a prom(iscuous) mode that allows data sent between a controller and device on the bus to be monitored. It is similar to lon mode, except that lon mode works only with a Talk-Only node where no controller is present on the bus, whereas prom mode can operate when addressing is used. In prom mode, command bytes are ignored but the interface will receive data sent across the bus between the controller and any device.

I am still working on problems with supporting the MCP23x17 chips. I thought I had at least sorted out  MCP23S17 support. I know there were problems with supporting the MCP23017. However, some further problems have surfaced with both chips.
« Last Edit: October 26, 2022, 07:53:03 am by WaveyDipole »
 
The following users thanked this post: PerArdua, justjason

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #861 on: October 12, 2022, 12:13:46 pm »
Have just posted a further update (0.51.15) this morning that fixes a couple more bugs.
Still working on the MCP23x17 stuff.
« Last Edit: October 12, 2022, 06:15:43 pm by WaveyDipole »
 
The following users thanked this post: coromonadalix, PerArdua, ZigmundRat

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #862 on: October 25, 2022, 12:19:09 pm »
Hi group,

I have built and tested the buffered version of the AR488 that I shared in replies 850 and 851 in this thread. The board uses the SN75160BN and SN75161BN buffer chips. These were available from Digikey.

Photographs





Code Modification

A small change must be made to AR488_config.h to support the buffers:

Code: [Select]
/***** Enable SN7516x chips *****/
/*
 * Uncomment to enable the use of SN7516x GPIB tranceiver ICs.
 * This will require the use of an additional GPIO pin to control
 * the read and write modes of the ICs.

// Mod JDB

 */
#define SN7516X
#ifdef SN7516X
  #define SN7516X_TE 6
  #define SN7516X_DC 13
//  #define SN7516X_SC 12
#endif

Files

I have attached a zipfile containing the Gerber files.

Regards,

Jay_Diddy_B
* ar488_buffer_r2.zip (118.02 kB - downloaded 148 times.)
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5906
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #863 on: October 30, 2022, 06:40:54 am »
for the life of me  with the latest arduino ide   2.0.1   

It always miss some files  devnull.h or pro_micro.h        BUT they are there ??? or in the same folder than the ar488 ino file

even reverted to the old 1.8.x   no luck

all come from :  https://github.com/Twilight-Logic/AR488  and i use the latest SRC folder ???

and the arduino is the sparkfun  pro micro at 16mhz :  https://www.sparkfun.com/products/12640
 
The following users thanked this post: Gertjan

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1989
  • Country: dk
Re: AR488 Arduino-based GPIB adapter
« Reply #864 on: October 30, 2022, 08:52:43 am »
If you are using a case sensitive OS (filesystem) ... Ie. linux.
I have been "bitten" several times by the #include statement not matching the case of the file on the disk.
Usually won't be an issue on a M$ OS , but will be on linux & prob MAC too.

Not saying that this is the issue but ..... Worth a check.

« Last Edit: October 30, 2022, 08:54:26 am by bingo600 »
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #865 on: October 30, 2022, 12:16:01 pm »
for the life of me  with the latest arduino ide   2.0.1   

It always miss some files  devnull.h or pro_micro.h        BUT they are there ??? or in the same folder than the ar488 ino file

even reverted to the old 1.8.x   no luck

all come from :  https://github.com/Twilight-Logic/AR488  and i use the latest SRC folder ???

and the arduino is the sparkfun  pro micro at 16mhz :  https://www.sparkfun.com/products/12640

From: https://github.com/Twilight-Logic/AR488

You have to:

DEVNULL Library

The project requires the DEVNULL library to be installed in the Arduino IDE. To install this library, please follow these steps:

within the IDE go to Tools -> Manage Libraries... After a second or two, this should display a list of available libraries. In version 2.0rc9.x, the list ,may not appear the first time around. In that case, just go to Tools->Manage Libraries... again.

in the search box type 'DEVNULL'. This should filter the list of libraries leaving only the DEVNULL library by Rob Tillaart listed.

click the 'Install' button. This will install the latest version of the DEVNULL library.

Been there ...

Regards,
Jay_Diddy_B
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5906
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #866 on: October 30, 2022, 01:45:28 pm »
@jay  thks

Done that  so  many times, even the old arduino 1.8.18  complaint the same

ar488 master with the src folder   "AR488 GPIB controller, ver. 0.51.15, 12/10/2022"

Even the old versions in the archive are not uploading  ... sent an email to sparkfun

Even trashed the bootloader   :--

It's an 32u4 based board at 16 mhz,  tried a leonardo variant board type  ...  now it give me this :

Picture attached  --->   Prologix gpib configurator see  AR488 GPIB controller ver 0.51.15  ...  ok    but nothing else is shown or active for the other choices ??

QUESTION:   how should an ar488 device be declared in the device manager  ??   mine only shows as a serial device  ...  ??   baud rate speed ? 115200  or faster ?

some rant

Oh man i'm getting too old for this stuff, i'm forced to build an gpib adapter to try  a majority of softwares  who talks to gpib adapters / some does lan  but  i see there is no interest  to make the 34410 34411 l4411 generations work or being added

WHY   because the Keysight software only start the meter when doing data logging .......  i want to set things up before ...

I'm testing  huge power cells and this meter was fine for this setup and would be easier to protect it against an exploding battery (vibration tests  etc ..)

Talked to the Testcontroller  creator to add some of them in his definition file   but man even reading his documents is hard as h...  i'm native french

Bought an L4411 meter thinking it would be easy to interface without this adapter, an simple to use software interface, to make the meter work BEFORE  doing any data logging  ...   lost so many hours just to make an s#$$% (discovered too late) arduino clone from sparkfun work, even my never used mega 2560  doesn't want to be an ar488  ?? 

The sparkfun variant has to be resetted twice to get into DFU mode
, you have 8 seconds to reflash it or do something with it ??? avrdude cant flash it fast enough  and it will crash the 32u4 boot loader, (sparkfun made an updated bootloader)   even my 1k$$ programmer would not recover it,  because of the clock fuses it can not understand  :-- way to go ELNEC

An old stk500 clone  worked fine in isp ....                   

I'm happy to receive help from here ...  thks  even now  i'm not sure how to configure it   loll even reading the ar488 manual ...
« Last Edit: October 30, 2022, 01:52:33 pm by coromonadalix »
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #867 on: October 30, 2022, 04:35:51 pm »
Hi coromonadalix,

see this message:

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


Make sure you changed the id: "++id verstr AR488 version 6.102" so ke5fx identifies it as a prologix.

No experience myself, just remembering I had read about this issue.


Jay_Diddy_B
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5906
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #868 on: October 31, 2022, 12:00:45 am »
@Jay   thks 

Well after tons of fun with ar488 Master on Github, this SparkFun Arduino Pro micro 32u4  is stubborn,    only the Girlando v6.1  works ?? 

I Managed to get an Sparkfun Pro Micro at 16Mhz be shown in arduino ide  ....  :palm:

Now GPIB configurator see's it, and can communicate,  not sure for the pinouts in the definition file ...  i have to wait for pcb's and the connector


a Frustrating  run for me ... i do understand the gpib universe a bit, but for me  |O


Oh you can use  ComNameArbiterTool  in Admin  mode  to clean your com ports ...
« Last Edit: October 31, 2022, 07:14:42 am by coromonadalix »
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5906
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #869 on: October 31, 2022, 06:54:05 pm »
Tried a new board  NANO V3  BUT  it as an Mega328 BP    and once again  it doesn't work  with all the web tricks, another shi#$#$%  clone,  you have the old bootloader and the new bootloader .... 

with the sketch  blink ................  no led blink  nada  niet  nothing     |O   


tried other boards support for the nano v3 with  the BP variant    web tricks    no avail
« Last Edit: October 31, 2022, 06:57:30 pm by coromonadalix »
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #870 on: November 04, 2022, 11:46:14 pm »
Hi,

I just want to report that I have built and tested the Sigrok / FX2LP/ Breakout board posted by artag.



I ran into a little issue with the 'CY7C68013A-56 EZ-USB FX2LP USB2.0 Development Board Logic Analyzer EEPROM' I purchased from eBay. I bought two boards. I had to change the EEPROM on one of the boards. I don't know if it was defective or counterfeit. I replaced the EEPROM with an AT24C128C from Digikey (AT24C128C-SSHM-T) then worked properly. I was using the Cypress control center software.

The defective part was marked, ATHYC...

 

The Sigrok should be setup like this:



Regards,
Jay_Diddy_B
« Last Edit: November 04, 2022, 11:52:57 pm by Jay_Diddy_B »
 
The following users thanked this post: Kean, coromonadalix, MegaVolt

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5906
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #871 on: November 05, 2022, 12:11:52 am »
i recall there was some problems with the eeprom   on theses thing,  i have one  somewhere who is configured as an logic analyser .... saleae clone

what is the code put in it ? just to help the others
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #872 on: November 05, 2022, 12:12:33 am »
Hi group,

Here is a sample capture. 'VOLT 24; CURR 60; OUTP ON <CR> <LF> is being written to an HP6673A power supply.



Regards,
Jay_Diddy_B
 
The following users thanked this post: Kean, coromonadalix

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #873 on: November 05, 2022, 12:26:30 am »
i recall there was some problems with the eeprom   on theses thing,  i have one  somewhere who is configured as an logic analyser .... saleae clone

what is the code put in it ? just to help the others

Hi, the configuration file is:



0xC0 is a header
0x50 is VID low byte
0x1D is VID high byte

0x8D is the PID low byte
0x60 is the PID high byte

0x20
0x20
0x00 this a version code

This identifies the board as a FX2 LAFW. This does not use the Saleae software.

This is the best source of instructions that I found:

https://community.infineon.com/t5/Knowledge-Base-Articles/Cypress-EZ-USB-FX2LP-based-Logic-Analyzer-using-Open-Source-sigrok-PulseView/ta-p/252866

Regards,
Jay_Diddy_B
« Last Edit: November 05, 2022, 12:28:05 am by Jay_Diddy_B »
 
The following users thanked this post: coromonadalix

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #874 on: November 08, 2022, 03:12:35 pm »
I have received a board from Jay Diddy and have it working with my Solartron 7150 Plus DMM.
 
The following users thanked this post: Jay_Diddy_B


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf