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

0 Members and 2 Guests are viewing this topic.

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #875 on: November 08, 2022, 04:50:55 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

I am sorry to hear this. I can't vouch for pro_micro_h as its part of the board library but am curious about the DEVNULL library. I have added instructions to the manual and the Readme indicating that the library needs to be installed using the Arduino IDE. I haven't tested the code in Arduino 2.0.x yet but it should work fine in 1.8.19. In the meantime, I will make a point of testing it in 2.0.x.

When you say it misses files, I presume you are getting error/warning messages during compile? If its still an issue, could I ask you to raise a case and post the related error messages here please:

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

The DEVNULL library is quite simple and I could have just copied the code into one of my project files, but on the other hand it is not unusual for a project to depend on other third party libraries. It means that one does not have to re-invent the wheel and can simply download the library via the IDE from the maintainer. Doing so also gives them credit for the work. In the end I decided to add it as a dependency. If this is causing too much hassle then I am open to re-thinking that approach.

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.

This is a good point. On Microsoft Windows it doesn't matter since the FAT32 and NTFS filesystems are case insensitive. On other operating systems where file system are case sensitive, it will be importent to ensure that #include entries in code are specified in the same case as the ffilename. That having been said, I develop on Linux which IS case sensitive so, in theory, I should be catching any problem in that regard during development. On the other hand, my project files are on a shared NTFS drive. I therefore just checked the DEVNULL library. It's name is in uppercase in the Arduino IDE Library Manager. The filenames in libaries/DEVNULL are named DEVNULL.h and DEVNULL.cpp, both uppercase except for the extension, as is the already mentioned directory name. Its entry in the library_index is also upper case:

"providesIncludes": [
        "DEVNULL.h"

"name": "DEVNULL",

For good measure, I also checked the developers GitHub page and its also in upper case there, so everything looks consistent.

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

What "web tricks" are you referring to? Are you using the Arduino Cloud editor by any chance?

Regarding that Nano V3, a quick search seems to indicate that the 328BP is different from the 328P and I will have a look at the detail. On eBay all the boards I found seem to have the 328P. Could you post a link to where you purchased the your Nano V3 board from?

I did also find a Nano 'red' board on eBay which has a 168P MCU. I have not tested either the 328PB or the 168P but perhaps it would perhaps not hurt to get a couple to try. If it differs, I would be able to create a layout for them.

It sounds like you have not had much 'fun' with your Sparkfun board. I have never tried one of these, but I was able to recover two 32u4 boards that had failed during upload by using a usbasp programmer to burn the bootloader back on to them. Woth regards to bootloaders, I would expect brand new Nano boards to be using the new bootloader, although if one has an old Nano board lying around it might still have the old bootloader on it. Of course with boards from the far east one never knows....

Incidentally I was considering to move the AR488 code to VsCode/PlatformIO at some point but haven't made a decision on that yet. However, before I get ahead of myself, I will test on Arduino IDE 2.0.x first.
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #876 on: November 08, 2022, 05:13:45 pm »
Just a quick update. I updated my IDE 2.0.0 installation to IDE 2.0.1 (I am using the ZIP file version). I then tried compiling the AR488 project and uploading it to my UNO test setup and it worked without any difficulty. As with IDE 1.8.19, I selected the .ino file and the IDE loaded all of the remaining project project files just as it does in IDE version 1.8.x. Based on this test, I don't envisage any problems with compiling on account of upgrading to IDE 2.0.x. However, just because I did not encounter any difficulties does not means that others might not, so I continue to be interested in hearing about any problematic experiences that others have encountered while compiling this project using IDE 2.0.x.
« Last Edit: November 08, 2022, 05:16:52 pm by WaveyDipole »
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5906
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #877 on: November 08, 2022, 10:54:58 pm »
hi,  well   on the sparkfun pro mini (32u4)  it did finally work, or seems to ??   Still waiting for the connectors ...

Reinstalled Arduino IDE, installed the devnull package,  re-downloaded the ar488 master,  but not so sure if i flashed it at 9600 baud instead of 115200 ???


The prologix gpib configurator now see it, but no options are available (all greyed out) is it a normal behavior ? 

And Emanuele Guirlando  is still working ok, and the options are not greyed out  ??


What is the normal adapters speeds in theses cases : ar488  and  Emanuele Guirlando ??

thks         



the"tricks" i mentioned earlier where for the other  arduino board i had, i got refunded  .... i tried many "328BP boards definitions packages" to add it properly into IDE, but did not work
« Last Edit: November 08, 2022, 10:59:36 pm by coromonadalix »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #878 on: November 09, 2022, 03:31:50 pm »
Emanuelle's version ran at 115,200 baud. AR488 also runs at 115,200 baud by default. The baud rate is not that critical so long as the baud rate configured in the connecting software matches that of the adapter. I believe that the default baud rate for KE5FX is also 115,200 baud although this can be set to an alternative value in CONNECT.INI.

In order for KE5FX to recognize the interface, it must have a specific character sequence in the string returned by the ++ver command. The same is true for EZGPIB.

KE5FX requires the sequence 'Version 6' and is case insensitive.
EZGPIB requires 'GPIB-USB'

The fixed character sequence returned by Emanuelle's program when using the ++ver command is:

Code: [Select]
ARDUINO GPIB firmware by E. Girlando Version 6.1

On the AR488 the version string displayed with the ++ver can be set to anything convenient by using the following example commands:

Code: [Select]
++id verstr AR488 GPIB-USB version 6
++savecfg

This will set the version string to 'AR488 GPIB-USB version 6' and should be enough to get the interface recognized by the Prologix GPIB Configurator program in KE5FX Tools. The version number does not actually require the '.1' suffix, but there is no harm leaving it in if preferred as per Emanuelle's version string. The second command saves the setting to EEPROM. This is important since we need the version string setting to survive a reset. That the string has been saved can be confirmed by resetting or power cycling the adapter and using the command:

Code: [Select]
++id verstr

This should display the string entered in the previous command.

That PB variant of the 328 seems to be a bit of an oddity as it is not supported as a processor for the Nano in Arduino IDE 1.8.19 or 2.0.1, both of which support, as you have noted 328P and 328P (Old bootloader), as well as the 168. No listing of the PB variant in either IDE. The PB variant appears to be almost the same as the 328P but there are some minor differences including fuse values. Not having come across one of these myself, I am not sure how to deal with it yet, but I am happy to purchase a couple to experiment with if someone could point me in the right direction.

Incidentally, all these chips have EEPROM. The 32u4 has 512 bytes, the 328P and the 328PB both have 1024 bytes. Non-AVR boards may not have EEPROM. Examples include the ESP8266 and ESP32. However, the Arduino framework for both of these boards supports an EEPROM library that implements EEPROM in flash.
« Last Edit: November 09, 2022, 04:11:40 pm by WaveyDipole »
 
The following users thanked this post: coromonadalix

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5906
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #879 on: November 09, 2022, 09:31:04 pm »
Success    thks for your patience and understanding(s)

++id verstr AR488 GPIB-USB version 6
++savecfg

worked fine     :-+

Q:  is there a way to implement/set it up in the sketch file ??    or just add a comment in the documentation ??    unless I've totally overlooked it ??
« Last Edit: November 09, 2022, 09:33:42 pm by coromonadalix »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #880 on: November 10, 2022, 05:18:56 pm »
Glad to hear that worked.

Near the top of the AR488_Config.h file there is a line like this:

Code: [Select]
#define FWVER "AR488 GPIB controller, ver. 0.51.15, 12/10/2022"
Thinking about your request it occurred to me that you could just change that line to:

Code: [Select]
#define FWVER "AR488 GPIB-USB version 6"
This would make the above character sequence the default version string returned by the ++ver command and it would then be stored as part of the program code.

I will add some instructions regarding all of this to the manual. There is some brief information in the command reference under the ++id command, but perhaps it ought to be explained in more detail in the  section that references the KE5FX tools.
« Last Edit: November 10, 2022, 05:21:37 pm by WaveyDipole »
 
The following users thanked this post: coromonadalix

Offline simba15

  • Regular Contributor
  • *
  • Posts: 120
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #881 on: December 14, 2022, 04:25:07 pm »
So I built the AR488 for the first time.

I uploaded the code 0.51.09 ( with no changes ) Arduino Mega with D wiring config.  ( is there any changes required?)

I can get a response to ++ver, but get no reply to ++idn 1 or *idn?

Testing with 34401A ( set to gpib addr 22).

Any suggestions to troubleshoot? How could I enable Debug?

Thanks.
 

Offline justjason

  • Contributor
  • Posts: 18
  • Country: it
Re: AR488 Arduino-based GPIB adapter
« Reply #882 on: December 16, 2022, 04:20:23 pm »
++ver will confirm that the adapter is running and talking to your PC .
You may still have a issue between the adapter and your 34401A

Presuming all setting are ok ( address etc..), and you have chosen the correct board definition,  then the most likely cause after that is the connections between the Mega and the GPIB plug / cable.
These can be checked using the Xdiag function https://ar488.readthedocs.io/en/latest/main/xdiag.html   to check each pin is connected as expected
« Last Edit: December 16, 2022, 10:14:17 pm by justjason »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #883 on: December 16, 2022, 06:40:53 pm »
So I built the AR488 for the first time.

I uploaded the code 0.51.09 ( with no changes ) Arduino Mega with D wiring config.  ( is there any changes required?)

I can get a response to ++ver, but get no reply to ++idn 1 or *idn?

Testing with 34401A ( set to gpib addr 22).

Any suggestions to troubleshoot? How could I enable Debug?

Thanks.

Thank you for your interest in the project.

To enable debug, first un-comment this line in AR488_Config.h:

Code: [Select]
//#define DEBUG_ENABLE
Further down in DEBUG LEVEL OPTIONS, you will need to enable one or more options by un-commenting them. Un-commenting the following option might be helpful:

Code: [Select]
//#define DEBUG_GPIBbus_SEND
You may also want to turn on verbose mode with ++verbose.

Have you tried 0.51.15 btw?

Since the 34401 can respond to the *idn? command, there is no necessity to turn on the AR488's own IDN responder with ++idn 1. All you should need to do is send *idn? followed by a ++read and the instrument should respond. Alternatively, change the 'auto' setting to ++auto 2. The interface will then then get query responses automatically. In order to verify that a parameter has been changed, issue the command again without the parameter, for example:

Code: [Select]
++idn 1
++idn

should respond with a 1 to indicate that the AR488 IDN responder has been turned on.

Code: [Select]
++auto 2
++auto

should respond with a '2' showing that the value of the 'auto' parameter is now set to 2.
« Last Edit: December 16, 2022, 06:49:55 pm by WaveyDipole »
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #884 on: December 17, 2022, 02:41:39 pm »
So I built the AR488 for the first time.


Testing with 34401A ( set to gpib addr 22).

Any suggestions to troubleshoot? How could I enable Debug?

Thanks.

How did you build it? Did you use one of the board designs that has been shared on this forum?

Can you share a picture of your interface?

Best regards,

Jay_Diddy_B


 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1882
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #885 on: December 17, 2022, 05:45:38 pm »
Hi there, does anyone have in DE, or around, some of the Jay's PCBs for the buffered version of the adapter, or is anyone interested in a group order in Germany ?
If someone has available boars and can send please PM me, for group buy let's do it here if it's not too much of a hassle.

Cheers,
DC1MC
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #886 on: December 17, 2022, 10:28:06 pm »
Hi there, does anyone have in DE, or around, some of the Jay's PCBs for the buffered version of the adapter, or is anyone interested in a group order in Germany ?
If someone has available boars and can send please PM me, for group buy let's do it here if it's not too much of a hassle.

Cheers,
DC1MC

All the files that you need to send to a low-cost PCB factory are attached to this message:

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

If you can wait the time, and get the cheapest shipping option. I paid a total of $5.70 USD. I ordered 6 October and received the boards on the 18 October. Using DHL would have reduced the time in half, but the cost would be 5 times.

Similarly, I ordered the connectors from Aliexpress for $1.60 each on 9 October and received them 17 October (Aliexpress Standard Shipping) in Canada.

The buffer chips SN75160BN and SN75161BN I bought from Digikey and Mouser. I don't want to mess with counterfeit chips.

Regards,

Jay_Diddy_B
 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1882
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #887 on: December 18, 2022, 08:15:48 am »
Many thanks Jay for all the support, unfortunately I have exactly zero experience with ordering PCBs to be manufactured, could you kindly go "the last mile" and share the link to the PCB service so I can order a number of them, with the Christmas stuff and the general tardiness of the German customs, they'll arrive most likely after my Christmas vacation will be over, but that's on me for MY tardiness and at least some boards will be quickly available for members in DE.

Cheers,
DC1MC
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #888 on: December 18, 2022, 11:26:43 pm »
Many thanks Jay for all the support, unfortunately I have exactly zero experience with ordering PCBs to be manufactured, could you kindly go "the last mile" and share the link to the PCB service so I can order a number of them, with the Christmas stuff and the general tardiness of the German customs, they'll arrive most likely after my Christmas vacation will be over, but that's on me for MY tardiness and at least some boards will be quickly available for members in DE.

Cheers,
DC1MC

I only have used JLCPCB recently. I have had to no reason to go anywhere else. Let me take you through the process.

Data Preparation

I generated the artwork using the open source software KICAD. I am using version 5.
When I am finished the design, I generated the Gerber files and the drill data. These files are all zip together. I use the Protel naming conventions for the different layers. Because of the naming convention it is not necessary to give any instructions to JLCPCB.

The zipfile contains:



These are all the files needed to make the board. gko is the outline, xln is the drill data etc.

JLCPCB website

Go to the JLCPCB website. At some point you will have to register. I registered a while ago.

Find the instant quote button and click on it.



When prompted click on add gerber file button.




Select the zipfile. This will upload all the manufacturing data to JLCPCB.

You will be given a preview:



It should look like this. You can change the color of the board if you require. You can also change the quantity of boards. When you are happy with the quantity and price, add to cart.

Shipping options



There are a number of shipping options available. If I am not in a hurry and it is a low value shipment, I use the cheapest economical. If I am in a hurry I use DHL DPP. DPP means that the customs charges and taxes are pre-paid. No big surprise bills from the courier.


Jay_Diddy_B
« Last Edit: December 18, 2022, 11:32:19 pm by Jay_Diddy_B »
 
The following users thanked this post: ledtester, djadeski

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1882
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #889 on: December 19, 2022, 05:27:29 pm »
I can confirm that ordering from JLPCB is that simple, 10pcs with the cheapest shipping to Germany costs €9.56 so I comes to 1.80 to send around Germany in a letter envelope is someone wants.
All that is left for me now is to see if the software compiles on my machine and, most important, to find an Arduino that is not a total fake and doesn't take a millennia to arrive. Suggestions for DE area are appreciated.

 In the end one more
Herzliche Dank:clap: to Jay and the other project contributors for their effort spent on this project.

 Cheers,
 DC1MC
 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1882
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #890 on: December 21, 2022, 07:09:07 am »
Some update:
I've downloaded and compiled the software on Arduino IDE 1.18.19, to my great amazement and pleasure "It just compiled" ᵀᴹ (I did spend a couple of seconds actually reading the README and installed the DEVNULL library), none of the crap the other forum member experienced in his own thread  :clap:
Now I'm waiting for the two Nanos I've bought from a seller Germany to see if it loads and runs, but, if the Nanos are not the most miserable fakes, I expect to happen without issue.
The boards are "In production" for a couple of days, hopefully soon they'll board the slow China boat to reach Kartoffelfressendland :D.
 
Cheers,
DC1MC
 

Offline gmac34

  • Regular Contributor
  • *
  • Posts: 68
  • Country: no
Re: AR488 Arduino-based GPIB adapter
« Reply #891 on: December 22, 2022, 02:19:21 am »
Hi, I'm having a weird issue trying to control two devices with an Arduino.
I have been successfully using AR488 for a couple of months, controlling an old Philips 5390 (A low-frequency synthesizer) with python, making it do frequency swipes and so on, and it worked very well. Then I got a Keithley 2000, and I thought I could pair the two to do frequency response measurements.

Since the Philips doesn't use the usual gpib connector I had to chop a glib cable in two and terminate it on one side with a DB-25 connector.
the other side plugs in the Keithley on one side and the Arduino on the other (usual pass trough GPIB connector)


Here comes the problem, the cable I made seems to work fine if the Keithley is disconnected, but if all are connected on the bus I start getting errors in the communication to the Philips, some commands are not sent at all others get corrupted, even if the Keithley is off. The weirdest part is that consistently, if an instruction includes a 7 (for example set the frequency to "F175000") all the following characters are received by the Philips as 7s

so F175000 becomes F177777 and F123789 becomes F123777 quite odd. I tried to probe the GPIB lines and it seems that half the times the messages are not transmitted at all.

The communication with the Keithley instead works fine I made measurements and got data back without issues, unfortunately I do not have any other device to test.


                         Ar
              PH____Ke               - The Philips doesn't work well even if the  Keithley is powered off, the Keithley appears to work fine

                         Ar
              PH____Ke               - If the Keithley is unplugged the Philips works fine (the Keithley works alone, without issues)

Am I missing something?

 
 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1882
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #892 on: December 22, 2022, 02:22:27 am »
@gmac37 Are you using the buffered, or un-buffered version ?
 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1882
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #893 on: December 22, 2022, 03:40:16 am »
Advantages of insomnia  ;D:
Quote
Dear dc1mc,
Thank you for your order from JLCPCB. It’s our pleasure serving you. We are pleased to inform you that the items listed below have been packaged and are waiting for pick up by Global Standard Direct Line.

Liars, the tracking code is from Yun Express, not Global Standard Line  :-DD
 

Offline gmac34

  • Regular Contributor
  • *
  • Posts: 68
  • Country: no
Re: AR488 Arduino-based GPIB adapter
« Reply #894 on: December 22, 2022, 08:22:08 am »
Hi @DC1MC , Just straight from the Arduino, is this something the buffer might fix?
 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1882
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #895 on: December 22, 2022, 09:19:30 am »
Hi @DC1MC , Just straight from the Arduino, is this something the buffer might fix?

Reading trough your issue description it seems that 95% there is an driving strength problem and 5% a cabling issue. The line drivers (75160/75161) used in the buffered version of the AR488 are the absolute golden standard for GPIB compatible interfaces and it will allow you to connect up to the maximum possible number of devices while preserving signal integrity, with only some marginal extra costs (like a medium pizza, no drinks  ;D ).

So, egal if there is a cabling issue or not, I strongly recommend building yourself a buffered version.

 Cheers,
 DC1MC
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5906
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #896 on: December 22, 2022, 09:23:09 am »
Or one device for each Equipment you need to control .... they cost way less than real or fake gpib adapters from ....
 

Offline gmac34

  • Regular Contributor
  • *
  • Posts: 68
  • Country: no
Re: AR488 Arduino-based GPIB adapter
« Reply #897 on: December 22, 2022, 09:50:28 am »
Ok, I was a bit in doubt because, probing around the data lines it seemed that when the signal was coming through the edge was not visibly degraded.
I will make myself one of Jay Diddy Boards, and see. at worse, I will use one Arduino per device.

Thanks!
 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1882
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #898 on: December 22, 2022, 10:23:01 am »
Ok, I was a bit in doubt because, probing around the data lines it seemed that when the signal was coming through the edge was not visibly degraded.
I will make myself one of Jay Diddy Boards, and see. at worse, I will use one Arduino per device.

Thanks!

Actually, looking more into your post it could be a power problem as well producing glitches, some (long) USB cables, especially no name ones, have very little litze (strands ?!?) in their power conductors and may have also the "chinesian optimization", that is replacing copper with tin, or copper-clad aluminium or even iron wires. Measuring the resistance of these cables always shows surprising results. Anyways, if possible try as well with an external 5V power supply or put a beefy elco on the 5V rail of the Arduino.

PS: Got my tracking number from JLPCB, the slow ship will painfully navigate to here  :-DD

Cheers,
DC1MC


 
 

Offline gmac34

  • Regular Contributor
  • *
  • Posts: 68
  • Country: no
Re: AR488 Arduino-based GPIB adapter
« Reply #899 on: December 22, 2022, 01:02:15 pm »
good idea, I will test that too.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf