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

0 Members and 9 Guests are viewing this topic.

Offline gmac34

  • Regular Contributor
  • *
  • Posts: 70
  • Country: no
Re: AR488 Arduino-based GPIB adapter
« Reply #900 on: December 22, 2022, 05:21:47 pm »
Well, it shouldn't be a power issue, I tried powering the Arduino form a lab psu and hot rodded a cap on the 5v rail with no difference. The buffer is the only hope
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22404
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: AR488 Arduino-based GPIB adapter
« Reply #901 on: December 22, 2022, 06:30:48 pm »
FWIW, my adapter (not exactly the same design here) drives two loads just fine, unbuffered.  With an XMEGA MCU at least.  So cables or power sound more likely.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1886
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #902 on: December 22, 2022, 11:31:48 pm »
To not let this this thread go stale and even give some useful info (TL;DR at the bottom):

- My two NANOs arrived nice and fast, but then disaster struck, they're both with ATmega168, the anemic and castrated cousin of the ATmega328P  :palm: and no matter how much code cleaning and help text removal there is no way for the AR488 current software to fit in one of these. I wanted to strangulate the seller, but then I've looked better and guess what, they mentioned that is an ATmega168 Arduino NANO, both in title and in the description, shame on me that I didn't know what's the difference  |O and considering the price I decided to keep them both (one is in use right now, one is available at cost if some one is interested).

- I've decided to get the latest fancy ORIGINAL NANOs and most likely the last model on 5V, and got a student pack of three Arduino Nano Every from the Arduino Store, they even claim that will fight with the ever watching Bundesadler and took the tax as well, so I hope the parcel will arrive directly and spare me the trip and waiting time to the Zollamt (customs), all nice and dandy, but what to do in the meantime  :scared: ?!?! I vaguely remembered that long ago I evaluated the Arduino platform for a project and got TWO pieces, digging trough the embedded systems box, at the bottom of the crate (as usual) a small modest anti-static bag holds the loot, open it and first disappointment, one NANO is an STM32F103 blue pill, at 3.3V, useless for our purpose, but the other one is an honest to God 328P NANO, and an older one from the time when vendors were competing on quality, the difference in between finishing and soldering in between the generations is staggering, not to mention the price.

- Connected the prize board to the USB cable, git checkout . to revert the desperate attempts to reduce the program size, recompile and upload the AR488 and... error, 10 attempts of upload the program all failed !!! WTF  :-//, oh looky there is a CPU version called "ATmega328P(old bootloader)", figures, is an old board it could have an old bootloader, switched and voila, load and runs  ;D, now we're talking, let's do testing, testing done, all well (actually spotted a number of bugs already, but not catastrophic), well up until the ill fated command "++rst", this produced a full lockdown of the board and a spasmodic blinkerei of the LEDs that could only be cured with power-cycle, not even the reset button on the board was able to do anything !!! what the rotating fuck again, now what  :scared:

- Oh well, after reading the code, the data-sheet and the stars configuration I have painfully  :'( extracted from google that the culprit is the friggin OLD BOOTLOADER  |O, in some situations the genius that programmed triggers at sw reset an infinite reset loop due to cretinic programming of the watchdog  :box:, let's attempt to program the "new" bootloader, here the pseudo-useless 168 board proved to be a lifesaver, got on Arduino forums an über-verbose tutorial/blog spam that attempted to explain to every simpleton how to reflash the bootloader using these psychedelic Kritzing or whatever is called that idiotic cartoon-ish  schematic capture program, and always using an Uno as programmer. Once I figured out the actual simple interconect schema I've programmed the "new" bootloader and reloaded the AR488 repeating the test of the available commands without a connected device, everything OK, including "++rst", all is well.

- Here are the first commands and the first bugletts  ;D

AR488 GPIB controller, ver. 0.51.15, 12/10/2022
Verbose: ON
> ++mode 1
Interface mode set to: CONTROLLER
> ++mode 0
Interface mode set to: DEVICE
> ++rst
AR488 GPIB controller, ver. 0.51.15, 12/10/2022
<...snip most ++help text...>
++mode: [P] Set the interface mode (0=controller/1=device) <-BUG1: inconsistent help message and command status (see above)
<...>
++srqauto: [C] Automatically condiuct serial poll when SRQ is asserted

So an inconsistent help message and a typo, did you expect more on dry run  >:D, the moment the boards arrive, I'll seriously stress all the existing functionality and even contribute some code back if thre is some stuff to fix and implement, meanwhile (finally) summary:

  • - You need at least an Arduino ATmega328P board, the castrated ATmega168 version will absolutely not fit the code.
  • - If your board has the "old bootloader" you will suffer on any soft reset, reflash it with latest one, you either need a dedicated ISP or another Arduino board, but here the most anemic one like 168 fits nicely and can be used later as ISP.
  • - Arduino Nano Every is an interesting device and may allow more functionality/better performance to be implemented.
  • - Two of the 8 boards (I will keep two) for German members have been already claimed, 6 are still available.
  • - The slow Chines boat is moving slowly to here, but don't procrastinate, I have to search for my connectors and buffers or order new ones.

Cheers,
DC1MC





 

Online macaba

  • Regular Contributor
  • *
  • Posts: 215
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #903 on: December 23, 2022, 10:28:45 am »
With regards to the failed programming, I found I had to do this (copied from my notes):

Select "Arduino/Genuino Micro" as the board and short the RST/GND pins briefly during upload.
 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1886
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #904 on: December 23, 2022, 10:46:17 am »
By the way, did anybody already designed a 3D enclosure for the AR488, I suck at mechanical designing and have no 3D printer  :'(,  but if there is no design already for the buffered version I'm offering a modest sponsorship for one and HUGE sympathy bonus  ^-^. Also of course, to be made public.

 Cheers,
 DC1MC
 

Offline Ismsanmar

  • Contributor
  • Posts: 48
  • Country: es
Re: AR488 Arduino-based GPIB adapter
« Reply #905 on: December 23, 2022, 10:58:58 am »
With regards to the failed programming, I found I had to do this (copied from my notes):

Select "Arduino/Genuino Micro" as the board and short the RST/GND pins briefly during upload.
He is talking about the ATmega328 Nano, not the ATmega32U4 Micro.
 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1886
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #906 on: December 24, 2022, 01:19:03 am »
Finally got trough the whole thread, end to end, wow, what a treasure trove of information  :-+, the bootloader infinite reset loop was mentioned already, and that the Every NANO works with small layout changes, I even realized that I've got the wrong connectors, female instead of male  |O, but they were like 3,60€ for two pieces from Ali and still could be used for the GPIB sniffer or even building a GPIB capable device :).
Also wanted to add special thanks to @WaveyDipole for relentless work to improve the code and @artag for the pcbs and all the other stuff, as well as all the other contributors, you guys rock  :clap: :clap: :clap: !!!

Cheers and Happy Christmas  (or your favorite winter festivity) to everybody,
DC1MC

 

Offline artag

  • Super Contributor
  • ***
  • Posts: 1228
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #907 on: December 24, 2022, 02:32:53 pm »

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.

Please, no.

Platfomio is an insanely overcomplicated kitchen sink thing that some may find useful for their projects. In my view it's not something that should be imposed on an open source project. VSCode even more so - an overcrowded interface where nothing is obvious and there is far too much baggage to trap the unwary.

AR488 is a great little project. Simple to build electronically and in software. It suits the Arduino IDE very well -  The IDE needs very little learning because it doesn't have much functionality. For a tool that you might be using just to put together your nice cheap little HPIB adapter it's great. Not as simple as just typing 'make' but at least it's cross-platform and self-contained.

I''m not an arduino-only person. I've been developing on embedded projects since 1980. But I think it suits a niche very well, and the unholy duo of platformio and vscode make me want to cry. Platformio has the saving grace that it can generally be run from the command line but please don't use VScode as the environment, at least not as the default for the casual builder.

 
The following users thanked this post: wkb

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 6607
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #908 on: December 25, 2022, 03:10:20 am »
+1   same toughts
 
The following users thanked this post: wkb

Offline justjason

  • Contributor
  • Posts: 18
  • Country: it
Re: AR488 Arduino-based GPIB adapter
« Reply #909 on: December 25, 2022, 11:16:39 am »

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.

Please, no.

Platfomio is an insanely overcomplicated kitchen sink thing that some may find useful for their projects. In my view it's not something that should be imposed on an open source project. VSCode even more so - an overcrowded interface where nothing is obvious and there is far too much baggage to trap the unwary.

AR488 is a great little project. Simple to build electronically and in software. It suits the Arduino IDE very well -  The IDE needs very little learning because it doesn't have much functionality. For a tool that you might be using just to put together your nice cheap little HPIB adapter it's great. Not as simple as just typing 'make' but at least it's cross-platform and self-contained.

I''m not an arduino-only person. I've been developing on embedded projects since 1980. But I think it suits a niche very well, and the unholy duo of platformio and vscode make me want to cry. Platformio has the saving grace that it can generally be run from the command line but please don't use VScode as the environment, at least not as the default for the casual builder.

Converting a project to PlatformIO does not exclude building the same project on Arduino IDE. 

I think that it is a great idea to use PlatformIO. It takes care of library management, in that you can lock the versions of libraries to the exact ones you want, as well as automatically pulling all needed libraries. A good example of this is the the new DevNull library that is not included by default. There are several posts in this thread that have mentioned the confusion caused because the project would not build - the cause being that the user had not added this to their Arduino IDE library.  This sort of thing can be completely removed by PlatfomIO using lib_deps in the .ini file.
Either way, I still would go back to the original point - a PlatformIO project does not exclude the building in Arduino  IDE, rather , it adds the option of using other tools. I will not comment on if PlatformIO is easier or harder for beginners, but for sure, I am very confident in saying it is a MUCH better platform for code dev than Arduino and seeing as the move would not exclude the use of Arduino, I am very much in favor of the move.
 

Offline artag

  • Super Contributor
  • ***
  • Posts: 1228
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #910 on: December 25, 2022, 11:39:57 am »
its much more capable,certainly. But that doesnt make it better. I think quite a lot of these devices have been built by people who just want a cheap adapter and dont want to do software development. ARduino mostly 'just works', that missing library excepted (waveydipole : just include the code if its small. avoids the need to track versions and does whats required)

building under both is more release work, but even if that's acceptable, Vscode is a daunting, overbearing mess for the new user. i speak as a long-term emacs user :). you dont want to present the casual builder with that and then expect them to find out how to do it in the simpler  - and more limited - arduino world. offer the easy one first and let the vscode/platformio user select that.

i dont know how the arduino 2 will work out . imho its too early to tell, my jnitial tryout sent me running back to what worked. doubtless it will both mature and become unavoidable. does that provide the dependency management you prefer ? arduino kind of equates libraries with include files and also offers library installation so all the bits appear to be there for automation.
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 6607
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #911 on: December 25, 2022, 01:36:57 pm »
The problem is making forks and managing them  etc ....  and it may or be a bigger time consuming thing than it was, i was lucky to get help when needed  BUT     

You can't be here all days and nights  loll

Now the project, IS  i think relatively easy, matured to great extents,    even for a noob like me,  arduino is an easy platform if i may say


The code is open,  if other people want to make some fork  let them be ... it will be their responsability


Why the rush now ???  even explained earlier ???
 

Offline justjason

  • Contributor
  • Posts: 18
  • Country: it
Re: AR488 Arduino-based GPIB adapter
« Reply #912 on: December 25, 2022, 04:49:32 pm »
I can only reapeat the point once again. PlatformIO projects can still be used under Arduino. you do not loose anything. I am NOT talking about forks nor branches, nor diverse builds, the one single project is usable in BOTH environments
 
The following users thanked this post: ledtester

Offline gmac34

  • Regular Contributor
  • *
  • Posts: 70
  • Country: no
Re: AR488 Arduino-based GPIB adapter
« Reply #913 on: December 27, 2022, 08:44:03 pm »
FWIW, my adapter (not exactly the same design here) drives two loads just fine, unbuffered.  With an XMEGA MCU at least.  So cables or power sound more likely.

Tim

Today I borrowed a national instruments adapter from work and it did work without problems with the same wiring, I also triple checked all the pins. I also don't see any sag on the power lines of the Arduino or in the GPIB data. The data streams just gets interrupted, in the screenshot I was probing 4 of the DIO lines and triggering on the ATN, always sending the same command. Something like "F12743" to set the frequency on the Philips synthesiser and sometimes the data would only go trough up to the 7 in the middle.

On another note, to get the national instruments adapter running I used pymeasure https://pymeasure.readthedocs.io/en/latest/ and it's lovely, did anyone try to use it with the AR488? it's supposed to be compatible with the Prologix adapter, but I didn't manage to get it to talk successfully with the Arduino. . The latest version of Pymeasure works perfectly with AR488
« Last Edit: April 14, 2023, 08:26:00 am by gmac34 »
 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1886
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #914 on: December 27, 2022, 08:51:06 pm »
@gmac34: You need to save an ID string to have the AR488 "pretend" that is Prologix adapter, the way to do it is in this thread if you search about Prologix. My boards are now in the clutches of the German eagle and hepfully they will release them before the new year.

 Cheers,
 DC1MC
 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1886
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #915 on: December 28, 2022, 08:02:13 pm »
Hey, look what I've got today, a nice card from Jay with a red PCB, a trifecta of original Arduino Everys and the announcement that DHL !!! will bring tomorrow my order of buffered  AR488 from JLPCB.
In the images are the Jay's gift with the very fresh and unopened Everys, a picture of Kika, the supervisor, and a cat charity donation.

 Cheers,
 DC1MC
EDIT: Six boards will be available on quick sending for Germany !!!
 

Offline gmac34

  • Regular Contributor
  • *
  • Posts: 70
  • Country: no
Re: AR488 Arduino-based GPIB adapter
« Reply #916 on: December 28, 2022, 08:32:16 pm »
I made some test and AR488 actually works with Pymeasure, and pyvisa as they support the prologix adapters, it's great. I still have my errors with the Philips synthesiser under those, will see if the buffers make any difference.
 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1886
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #917 on: December 30, 2022, 05:41:05 pm »
So it begins, I have found my old project bag with connectors and buffers from saner and healthier times, not let's assemble the first board from Jay, a beautiful menstrual red, mine are puke green  :-DD.
Still boards available for DE !!!

Cheers,
DC1MC



 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1886
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #918 on: December 30, 2022, 08:06:15 pm »
Well, there are my first two guys, they may not fit the German concept of "wunderschön" (I leave this to Claudia Schiffer  ;D ), but they do fit the concept of "Stabil"  :-DD
One little snafu, the square pins that were installed on my Arduino are totally not fitting in the cool round machine pins that I've put on Jay's red board  :palm:, there are round M-M pins but it will take ages to arrive at the end of the year  :'(, so the Everys will have to wait a bit, to have something to test I've soldered one of my green boards, putting the Arduino directly on the PCB, in solidarity, the buffers also requested direct soldering and their request was granted  >:D.
So I have still materials for two buffered boards and also for four unbuffered, does anyone knows if there is a manufacturing package (zip) with the unbuffered PCBs, I've seen the rendering but I wasn't able to find the archive in the thread  |O.

A small note to WeavyD, maybe it could be a good idea to edit the first post and add the PCB archives for both of the versions as well as the schematics, it could make the life of future AR488 builders a bit easier.

Also a note to Jay: what is the purpose of J1 ?

Well tomorrow I will stick it in my Solartron 7150 to see if I'll get the same results.

Cheers,
DC1MC
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2764
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #919 on: December 30, 2022, 09:55:51 pm »

Snip ...

Also a note to Jay: what is the purpose of J1 ?


Cheers,
DC1MC

DC1MC,

The AR488 manual, available from here: https://github.com/Twilight-Logic/AR488

contains this drawing for adding buffers to an Arduino Uno version:



I created the schematic by copying the connections from the drawing.



I kept the option to route the pin 11, DC, on the SN75161 to either D3 on the Arduino, REN on the GPIB bus or D13 on the Arduino.

The boards I have used have the jumper installed in the 2-3 position.

Remember that you have to modify the AR488 sketch to drive the buffer. This is described in the message. There is more discussion in the AR488 manual.

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

Regards,

Jay_Diddy_B
 
The following users thanked this post: DC1MC

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1886
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #920 on: December 30, 2022, 10:12:42 pm »
Thanks Jay for chiming in  :-+, besides the little modification (just x-uple check: the SC signal remains commented ?) everything is as it comes from the repository ?
All this interrupt stuff works now or should remain commented ?

I'll torture it tomorrow and then look closer to the code :). so far the sketch loads on the assemble board and nothing gets hot, so I have great expectations :)

Cheers,
DC1MC

 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2764
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #921 on: December 30, 2022, 10:13:20 pm »
DC1MC and the group,


So I have still materials for two buffered boards and also for four unbuffered, does anyone knows if there is a manufacturing package (zip) with the unbuffered PCBs, I've seen the rendering but I wasn't able to find the archive in the thread  |O.

Snip ...

Cheers,
DC1MC


The original artwork for the Arduino nano version was created by forum member artag. This was placed into a panel format by forum member DavidKo.

This is the message: https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3866630/#msg3866630

The files for PCB manufacture can be obtained from: https://github.com/konarik/AR488-multiple-PCBs

I will attach a copy of the zipfile to this message for convenience. If you use this to order from JLCPCB you will get a total of 25 of the nano style adapters.


Note: You can build the un-buffered version on my buffered PCB if you replace U1 and U2 with wire connections. Connect pins 2-19, 3-18 4-17 .. 9-12.

Regards,

Jay_Diddy_B

* 5pcs_ar488_v2-JLCPCB.zip (142.03 kB - downloaded 72 times.)
« Last Edit: December 30, 2022, 10:19:29 pm by Jay_Diddy_B »
 
The following users thanked this post: DC1MC

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2764
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #922 on: December 30, 2022, 10:15:40 pm »
Thanks Jay for chiming in  :-+, besides the little modification (just x-uple check: the SC signal remains commented ?) everything is as it comes from the repository ?
All this interrupt stuff works now or should remain commented ?

I'll torture it tomorrow and then look closer to the code :). so far the sketch loads on the assemble board and nothing gets hot, so I have great expectations :)

Cheers,
DC1MC

It is the only change that I made, and it works for me.

Make sure that you have the DEVNULL Library.

Jay_Diddy_B
 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1886
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #923 on: December 30, 2022, 11:22:10 pm »
I think I may overload you with thanks Jay   ^-^, so one more thanks for putting the zip with the un-buffered ones where I can find it, the software compiles and runs like a charm, tomorrow (actually later today ;) ) I'll stick the green one that is complete in the Solartron 7150 and see if it works then I'll start my quest to try and get my 2-3 GPIB cables to have some load.

 Cheers,
DC1MC
 

Offline gmac34

  • Regular Contributor
  • *
  • Posts: 70
  • Country: no
Re: AR488 Arduino-based GPIB adapter
« Reply #924 on: January 10, 2023, 11:50:45 am »
Two more buffered adapters are assembled. Working well!

It seems to have cured the problem I was having with my Philips PM5190 and Keithly 2000, but I'm still not sure what was the problem there.
I now have 3 GPIB instruments and with all 3 on the bus, the "naked" Arduino was also working fine.

But now this buffered version works regardless of what I connect to it. Thanks!

I have 3 extra PCBs, shipping from Norway or Sweden, if anyone needs one.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf