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

0 Members and 1 Guest are viewing this topic.

Offline artag

  • Super Contributor
  • ***
  • Posts: 1082
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #1000 on: June 21, 2023, 08:25:10 pm »

So is 5V recommended where possible?

I used 5V and I think of GPIB as a 5V bus, although you might get away with 3v3.
Note that the important difference between 3v3 and 5v pro micros is not the voltage, which can be fairly easily changed, but the crystal. If run from 3v3 you can only use 8Mhz, so a 16MHz 5V version can't just have the regulator enabled / added.

If you use 3v3 / 8Mhz , also note when you program it that you need to choose an 8MHz board version. I'm not sure if the USB will work if you misconfigure it. Certainly delays and serial baud rate will be wrong.

If iot will work at 3v3 with no buffers that's useful as the pro micro has got very much more expensive than it used to be, and a cheaper alternative would be good.
 

Offline bnz

  • Contributor
  • Posts: 43
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #1001 on: September 29, 2023, 06:11:18 pm »
I have a problem getting AR488 running on a Arduino Pro Micro, 5V version (I also have a Nano and no problems there).
I use AR488 ver 0.51.18. Building and uploding to the Pro Micro works fine. The Pro Micro shows up as serial port 18 in the terminal program. The terminal program does not complain when making a connection. But the Pro Micro just does not react on commands  - 0 bytes received - regardless what I send (e.g. ++ver should produce an output and does with the Nano).

Any suggestions what I could try to get it running?
« Last Edit: September 29, 2023, 06:13:32 pm by bnz »
 

Offline dl6lr

  • Frequent Contributor
  • **
  • Posts: 458
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #1002 on: September 30, 2023, 03:05:46 pm »
Try a minimal echo program that echoes every character received. For each character received, toggle the LED. When you upload and get nothing back, you can detect by the LED if its receiving characters and fails to send. I have one chinese board that is "unreliably" sending characters. You can program it most of the time, verification usually fails and you get a lot of garbage or nothing back from the board.
 
The following users thanked this post: bnz

Offline bnz

  • Contributor
  • Posts: 43
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #1003 on: September 30, 2023, 05:49:59 pm »
An echo program works (also at 115200-speed). Moreover I tried with two different Pro Micro. They however are from the same source.
 

Offline bnz

  • Contributor
  • Posts: 43
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #1004 on: October 01, 2023, 06:49:46 am »
I found the problem. In the source, as coming from github, there are two Arduinos defined for the 328P architecture:
Code: [Select]
/*** UNO and NANO boards ***/
#elif __AVR_ATmega328P__
  /* Board/layout selection */
  #define AR488_UNO
  #define AR488_NANO
  //#define AR488_MCP23S17
  //#define AR488_MCP23017

Following the instructions that only one per architecture should be uncomented, the code worked on the Pro Micro. Why this affects the Pro Micro, but was no problem with the Nano, is strange. Well the important thing is it works now.  ^-^
« Last Edit: October 01, 2023, 07:04:13 am by bnz »
 

Offline dl6lr

  • Frequent Contributor
  • **
  • Posts: 458
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #1005 on: October 01, 2023, 03:39:30 pm »
I found the problem. In the source, as coming from github, there are two Arduinos defined for the 328P architecture:

I am a little bit confused as the Pro Micro doesn't use a 328P, it has a 32U4 (Leonardo compatible). So it should never go through that path for the Pro Micro...
 

Offline bnz

  • Contributor
  • Posts: 43
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #1006 on: October 01, 2023, 05:29:13 pm »
I know. Therefore I wrote it is a strange behaviour.
 

Offline Echo88

  • Frequent Contributor
  • **
  • Posts: 826
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #1007 on: October 26, 2023, 10:43:57 pm »
I produced/populated two boards based on user Jay_Diddy_Bs design: https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4483507/#msg4483507, many thanks  :-+
The sourcecode was changed accordingly as described in the SN7516x GPIB transceiver support-section.
Im able to control a Keysight 33509B Function generator just fine, but have trouble with reading/querying any response from a device like a DMM.
So i can control for example the voltage range of a Keysight 34401A and 34465A and they show a measurement when sending "MEAS?", but both wont send back the measurement in any ++eos/auto/read-configuration and *IDN? also wont get me any response.
Does anyone know what i might be doing wrong?
The parts i used are all from Mouser, so i dont suspect defective hardware.

Edit: Found the error. The //#define SN7516X - modifications had to be done in the config-file, not in the .ino itself, duh.  :palm:
« Last Edit: October 26, 2023, 11:53:52 pm by Echo88 »
 

Offline Echo88

  • Frequent Contributor
  • **
  • Posts: 826
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #1008 on: November 02, 2023, 11:19:30 pm »
Anyone here with a 3458A?
Everything works so far, but i cant get a nonblocking method to work with the AR488 attached to a Raspberry Pi:
I want to use STB? to poll available measurement data, so that i can do other stuff while the 3458A takes its sweet 4s time for each 100NPLC-sample.
Alternatively a RQS-solution might work, but cant get that to work also.
Any idea what im doing wrong? Apparently the 3458A never sets the weighted sum of the STB to >=128, while this method worked a few years ago with a GPIB-USB-HS-adapter.
Attached are a code snippet that reads x samples at selectable NPLCs of 1/10 or 100, tested, works.
The attached SRQ-method doesnt work for me..then again im a really bad programmer.
 

Offline caiser01

  • Regular Contributor
  • *
  • Posts: 61
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #1009 on: November 04, 2023, 02:46:43 pm »
Any idea what im doing wrong? Apparently the 3458A never sets the weighted sum of the STB to >=128, while this method worked a few years ago with a GPIB-USB-HS-adapter.

You're never reading the status byte inside the while loop. You're reading the SRQ line with the ++srq command, which can only return a 0 or 1 (SRQ not asserted or SRQ asserted) so naturally, when you test that value, it will never be 128. Instead, try using the ++spoll command ("++spoll 22\r\n" in your case). This should give you the value of the status byte for your instrument.
 

Offline Swake

  • Frequent Contributor
  • **
  • Posts: 562
  • Country: be
Re: AR488 Arduino-based GPIB adapter
« Reply #1010 on: November 15, 2023, 06:58:58 pm »
Got a bit of an issue and would like to ask for debugging help. I tried using TestController over a Nano based AR488 with an HP 34410A DMM connected to a laptop and it doesn't work.

Using the AR488 Utility it is possible to talk with the nano and to identify the DMM configured at address 1 on the GPIB.
Code: [Select]
Date,COM #,Status,Message
9:33:02 pm,COM7,Send,++ver
9:33:02 pm,COM7,Recieved,"AR488 GPIB controller, ver. 0.51.18, 26/02/2023"
9:33:11 pm,COM7,Send,*idn?
9:33:12 pm,COM7,Send,++read
9:33:12 pm,COM7,Recieved,"HEWLETT-PACKARD,34401A,0,9-5-2"

However using TestController (latest verion) it cannot identify the DMM
Code: [Select]
;; AR488 B:1 Device HEWLETT-PACKARD,34401A, do not match: null
Tried a second nano on the same PCB and same issue. The PCB seems ok, no shorts, solder joints are fine and connections from arduino to the GPIB connector measure ok.

I've been using a Pro Micro based AR488 with the same HP 34410A DMM on the same laptop and that just works fine. Therefor I think my software is configured correctly. AR488 Utility gives exactly the same reply and TC configured according to the different virtual COM port van identify the DMM and return measurements fine:
Code: [Select]
;; Found Agilent 34401A on AR488 A:1
For what it's worth 1: With the Nano the first ++ver message sent always fails. Subsequent messages all work. With the Pro Micro the first message never fails.
For what it's worth 2: The Nano is new old stock and having the 'old' arduino bootloader.
For what it's worth 3: On the Pro Micro the send and receive LED's seem on all the time. Not with the nano.
When it fits stop using the hammer
 

Online Gertjan

  • Regular Contributor
  • *
  • Posts: 119
  • Country: nl
Re: AR488 Arduino-based GPIB adapter
« Reply #1011 on: November 15, 2023, 09:11:21 pm »
I tried using TestController over a Nano based AR488 with an HP 34410A DMM connected to a laptop and it doesn't work.
Using the AR488 Utility it is possible to talk with the nano and to identify the DMM
......
However using TestController (latest verion) it cannot identify the DMM

I have seen this problem mostly with Chinese Nano clones. They are still rebooting during the TC init, and are not ready in time for answering TestControllers *IDN? question.

The solution is to add a extra line in the 34401A device definition file:
#resetDelay 3.5

See the TestController documentation: https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html#Arduino_startup_reset

Regards, Gertjan.
« Last Edit: November 16, 2023, 05:03:03 am by Gertjan »
 

Offline wilhe_jo

  • Regular Contributor
  • *
  • Posts: 179
  • Country: at
ESP32S2
« Reply #1012 on: November 16, 2023, 02:45:57 pm »
Just wanted to note that I just made a pull-request to the ESP32 repo to introduce ESP32S2 support.

General support has already been there - what's new is the support of the USB-peripheral in the ESP32-S2 module.
This allows to build simple and small adapters.

I attached photos of my first rev... it features ESD protection and programs via the internal USB and uses the same for comms.
Of course, rev1 has some medium d'oh... so there will rev2 in the close future.
Maybe this one will get open-hardware (I need to check all the 3d models, footprints,... to see if there's some licensing/copy-right issues).

If there's some additional demand (I guess, I'll need 10 for my museum...ähhh... lab to get rid of all these GPIB cabling), I could make my batch bigger.

Regards
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5941
  • Country: ca
Re: AR488 Arduino-based GPIB adapter
« Reply #1013 on: November 16, 2023, 05:25:41 pm »
even some PRO may give you problems   there is some who have different boot-loaders for 32u4  chips   ... and they way to make them work ... and they where a nightmare to fit in arduino ide ... 

just to let you know ..
 

Offline Swake

  • Frequent Contributor
  • **
  • Posts: 562
  • Country: be
Re: AR488 Arduino-based GPIB adapter
« Reply #1014 on: November 16, 2023, 10:41:08 pm »
Quote
I have seen this problem mostly with Chinese Nano clones. They are still rebooting during the TC init
Tried those delay settings to no avail unfortunately.

Quote
there is some who have different boot-loaders for 32u4
Yes, Coromonadalix, and for the nano too. Your message gave me the indirect hint to try selecting an Arduino Uno as target in the IDE as that is near the same as the Nano except for the physical size. And that made it work!

The nano with the old bootloader appears to be in a frantic reboot loop. This issue was mentioned before already in this thread, but of course one has to read that particular message from a year ago and make the link to this case.

When it fits stop using the hammer
 

Offline selevo

  • Newbie
  • Posts: 7
  • Country: ru
Re: AR488 Arduino-based GPIB adapter
« Reply #1015 on: November 27, 2023, 12:09:43 pm »
Bright thoughts to everyone! I tried to compile the project in ArduinoDroid application for sndroid smartphones and I'm getting a lot of compilation errors. the project is not going to happen.
https://github.com/Twilight-Logic/AR488/issues/42

I also tried to compile the project in the Arduino IDE online editor - the project is assembled but does not generate hex code.
Can anyone help me by uploading  for me the HEX file for Nano on atmega328 here or other sites? I don't have a computer, just a smartphone, so I can't use the Arduino IDE standard
« Last Edit: November 27, 2023, 12:30:33 pm by selevo »
В начале была мысль и только потом слово, дело и всё остальное.
 

Offline selevo

  • Newbie
  • Posts: 7
  • Country: ru
Re: AR488 Arduino-based GPIB adapter
« Reply #1016 on: November 27, 2023, 12:44:08 pm »
I also noticed a square pad for the GPIB connector. usually a square pad This is the first pin But in reality this is not the first conclusion and it is misleading.
https://github.com/konarik/AR488-multiple-PCBs
В начале была мысль и только потом слово, дело и всё остальное.
 

Offline caiser01

  • Regular Contributor
  • *
  • Posts: 61
  • Country: us
Re: AR488 Arduino-based GPIB adapter
« Reply #1017 on: November 27, 2023, 03:44:13 pm »
Can anyone help me by uploading  for me the HEX file for Nano on atmega328 here or other sites? I don't have a computer, just a smartphone, so I can't use the Arduino IDE standard

See attached.

I didn't know it was possible to flash an Arduino from a smartphone...
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: ESP32S2
« Reply #1018 on: November 27, 2023, 06:08:43 pm »
Just wanted to note that I just made a pull-request to the ESP32 repo to introduce ESP32S2 support.

General support has already been there - what's new is the support of the USB-peripheral in the ESP32-S2 module.
This allows to build simple and small adapters.

I attached photos of my first rev... it features ESD protection and programs via the internal USB and uses the same for comms.
Of course, rev1 has some medium d'oh... so there will rev2 in the close future.
Maybe this one will get open-hardware (I need to check all the 3d models, footprints,... to see if there's some licensing/copy-right issues).

If there's some additional demand (I guess, I'll need 10 for my museum...ähhh... lab to get rid of all these GPIB cabling), I could make my batch bigger.

Regards

Thanks. I will have a look at that.

There is actually already a fork of this project targeting the ESP32 which adds a couple of additional protocols. You can find it here:

https://sr.ht/~douardda/AR488-ESP/

I would like, at some point to add those features to this project but haven't had a chance to analyse the code in detail. Maybe I will get some time this winter....

 
The following users thanked this post: selevo

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: AR488 Arduino-based GPIB adapter
« Reply #1019 on: November 27, 2023, 06:31:15 pm »
Bright thoughts to everyone! I tried to compile the project in ArduinoDroid application for sndroid smartphones and I'm getting a lot of compilation errors. the project is not going to happen.
https://github.com/Twilight-Logic/AR488/issues/42

I also tried to compile the project in the Arduino IDE online editor - the project is assembled but does not generate hex code.
Can anyone help me by uploading  for me the HEX file for Nano on atmega328 here or other sites? I don't have a computer, just a smartphone, so I can't use the Arduino IDE standard

Also didn't know it was possible to compile on an Android phone. Must have a look at that!
BTW, I have seen and responded to your logged issue.
 

Offline tom_iphi

  • Regular Contributor
  • *
  • Posts: 72
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #1020 on: November 29, 2023, 02:46:03 pm »
Hi folks,

I am lately experiencing trouble with the HC-06 Bluetooth module, which I have hooked up to the AR488 adapter.
The AR488 works flawlessly, but the HC-06 seems to drop data packets. The number of bytes received on the PC side is quite often less than the number of bytes sent by the AR488. To double-check I had replaced the HC-06 by a USB to serial adapter and no problems there.
Has anybody experienced such a problem with the HC-06? Any ideas what the cause could be?

Tom
 
The following users thanked this post: croma641

Offline tom_iphi

  • Regular Contributor
  • *
  • Posts: 72
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #1021 on: November 30, 2023, 03:35:24 pm »
I think I have found the problem:
My latest batch of HC06 modules appears to be built with faked chips.
These only work without data loss up to 57,6 kBaud!
An earlier batch of the same modules from a different supplier shows no problems at all at
115,2kBaud.

SO BEWARE OF FAKE MODULES!

Tom
 
The following users thanked this post: croma641

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1882
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #1022 on: December 01, 2023, 11:47:38 am »
I think I have found the problem:
My latest batch of HC06 modules appears to be built with faked chips.
These only work without data loss up to 57,6 kBaud!
An earlier batch of the same modules from a different supplier shows no problems at all at
115,2kBaud.

SO BEWARE OF FAKE MODULES!

Tom

If you have a sample from both batches maybe you can publish a side by side picture to help future users chose them properly. Of course, if they're identically looking then is a tough choice.

 Cheers,
 DC1Mc
 

Offline moyemojee

  • Newbie
  • Posts: 1
  • Country: af
Re: AR488 Arduino-based GPIB adapter
« Reply #1023 on: December 02, 2023, 01:46:09 pm »
Witch arduino version do you have when you try to compile it  ???,  please  be more specific with your errors to help  WaveyDipole
indigocard activate
roblox exploit


« Last Edit: December 20, 2023, 11:35:58 am by moyemojee »
 

Offline tom_iphi

  • Regular Contributor
  • *
  • Posts: 72
  • Country: de
Re: AR488 Arduino-based GPIB adapter
« Reply #1024 on: December 03, 2023, 08:27:58 am »
Quote
If you have a sample from both batches maybe you can publish a side by side picture to help future users chose them properly. Of course, if they're identically looking then is a tough choice.

Both HC-06 modules are looking identical. They can be distinguished by querying the firmware version:

Good:
AT+VERSION
hc01.comV2.0

Bad:
AT+VERSION
OKlinvor
V1.8

But the bad one may also just be a clone of a working linvor device. Anyway, reducing the baud rate on the HC-06 and the AR488 adapter to 56k also fixes the problem.

Tom
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf