Author Topic: project: extending HP3478A functionality  (Read 61189 times)

0 Members and 1 Guest are viewing this topic.

Offline kirill_kaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #150 on: March 13, 2020, 08:38:23 am »
i have a new arduino nano v3 clone collecting dust, it can be used for this project in a basic implementation form instead the pro mini + UART to USB adapter combo?
Why not? In fact, it's better than "pro mini" variant, because you don't need a separate UART-USB converter. Just be sure that MCU is mega328 @ 16MHz
i have a gpib connector too, my idea is using the arduino externally in a suited enclosure for it and hopefully a funtional buzzer :D
The DC buzzer can be driven directly by the atmega. I'd just add a current limiting resistor. The piezo speaker thing requires a driver (or, possibly, some other schematic to limit the current).
, i think this way i will lost the conectivity (powered via usb)
What do you mean by that?
 

Offline Miti

  • Super Contributor
  • ***
  • Posts: 1324
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #151 on: March 13, 2020, 10:31:02 am »
Kirill,

I totally missed the Prologix update. I will give it a try this weekend.
Fear does not stop death, it stops life.
 

Offline Miti

  • Super Contributor
  • ***
  • Posts: 1324
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #152 on: March 14, 2020, 05:31:11 pm »
I tested v2.0 with Prologix support, it works well, I didn't see any issue with Luke's free control program. The differences from Girlando's settings are the baud rate (115200) and the ++ver response (GPIB). Other than that everything is the same. There is however a "Prologix not found" but the retry finds it, see the attached log.

Code: [Select]
Version 12-24-19
Windows 7 / S-2008 R2 Service Pack 1 Platform ID 2
Config file loaded.
Debug ON.
Command delay = 50ms.
Max COM port = 64.
OC:Open COM33 CheckCom.
CheckCom start COM33
CheckCom end CreateFileA COM33
CheckCom port found
CheckCom end CloseHandle COM33
OC:Open COM33 open port.
OC:Open COM33 OK.
CA:Start CheckAdapter on COM33
CA:Check Prologix GPIB adapter. ProVer =:"GPIB"
QS: Send:"++ver" Reply:""
CA:Prologix not found. ++ver retry for Arduino.
CA:Retry ++ver (Arduino boot delay)
-CA:Retry: Found Prologix adapter (Arduino retry).
CA:Exit checkAdapter on COM33
COM port set to COM33
IG:Start InitGPIB
IG:Find Prologix GPIB adapter.
IG:ProVer srch:"GPIB"
IG:Found Prologix adapter.
IG:set ++mode 1.
IG:set eot_enable 0.
IG:set read timeout:++read_tmo_ms 3000
IG:SetGPIB Address ++addr 23 success.
IG:set EOI 0.
IG:set EOS 0.
IG:Set auto talk mode off: ++auto 0  success.
IGT:QSB result 1
Instrument address set to GPIB 23
Send saved config to instrument
F1
RA
N5
Z1
D1
3478A using program config settings.
Instrument start
Instrument stop/local

One issue is that once I use the remote control program, it locks all the local controls from the front panel until the instrument is restarted. I don't know if that's by design or is a bug.

Thanks for your effort!
Fear does not stop death, it stops life.
 

Offline kirill_kaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #153 on: March 14, 2020, 07:01:33 pm »
and the ++ver response (GPIB).
I just wanted it to work with the default settings. Though, I might change it to return the
actual version.

There is however a "Prologix not found" but the retry finds it, see the attached log.
That's normal. Since we use "reset via DTR" same as arduino, ++ver command fails for the first time.

One issue is that once I use the remote control program, it locks all the local controls from the front panel until the instrument is restarted. I don't know if that's by design or is a bug.
I'm not sure why it does that (the transcript of data sent and received to/from the serial port would help to find out), but gou should be able to use Local key to unlock the keypad (Do you see RMT annunciator?).
However it won't re-enable "ext" features. hp3478ext  won't exit the prologix  mode until the ++exit command.
 

Offline Miti

  • Super Contributor
  • ***
  • Posts: 1324
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #154 on: March 14, 2020, 11:24:23 pm »
No, it is not in RMT, it is local. I tried pressing Local button multiple times and it doesn't work. The external GPIB works, internal GPIB works, front panel extension functionality is dead until power cycle.
Fear does not stop death, it stops life.
 

Offline lmester

  • Regular Contributor
  • *
  • Posts: 143
  • Country: us
    • My page
Re: project: extending HP3478A functionality
« Reply #155 on: March 15, 2020, 12:53:42 am »
I tested v2.0 with Prologix support, it works well, I didn't see any issue with Luke's free control program. The differences from Girlando's settings are the baud rate (115200) and the ++ver response (GPIB). Other than that everything is the same. There is however a "Prologix not found" but the retry finds it, see the attached log.

One issue is that once I use the remote control program, it locks all the local controls from the front panel until the instrument is restarted. I don't know if that's by design or is a bug.

Thanks for your effort!

The front panel buttons should be functional when the program is running but not taking measurements. You may need to push the button more than once. The program polls the instrument status every 5 seconds and will update it's settings if you change modes using the buttons. If you press a button right when the instrument is being polled, it will miss the button press.

I just tested the program. My buttons are functional after program exit.

You may want to turn on debug mode and see if any code is failing.

Also, I have code to handle the Arduino reset when the COM port is opened.

Code: [Select]
        if QuerySER("++ver",ProVer$,.2) =0 then
           if DBug then print #main.Terminal,"CA:Prologix not found. ++ver retry for Arduino."
           call sleep  1400 'Delay for Arduino reboot on COM change
           if DBug then print #main.Terminal,"CA:Retry ++ver (Arduino boot delay)"
           print #main.Terminal,"-"; 'Give an indication of a Arduino prologix detect retry
               if QuerySER(cr$;"++ver",ProVer$,.2) =0 then
                  if DBug then print #main.Terminal,"CA:Retry ++ver fail" '
               else
                   if DBug then print #main.Terminal,"CA:Retry: Found Prologix adapter (Arduino retry)."
                   af=0    'Adapter good
               end if     
       else
            if DBug then print #main.Terminal,"CA:Found Prologix adapter (No arduino delay)."
            af=0    'Adapter good
       end if
       if  af=1 then
            close #comm 'Close port if adapter failed
            COpen=0
       end if
    end if
 

Offline kirill_kaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #156 on: March 15, 2020, 06:34:56 am »
No, it is not in RMT, it is local. I tried pressing Local button multiple times and it doesn't work. The external GPIB works, internal GPIB works, front panel extension functionality is dead until power cycle.

That's strange. There's no direct control over the front panel buttons. The only way they are supposed to be disabled is the GPIB local lockout command. And the LLO command is not implemented in my code.
I haven't noticed such a behavior on my HP3478, but I didn't test it long enough. I'll check that in a couple of weeks when I return to home.
 
 

Offline kirill_kaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #157 on: March 15, 2020, 06:39:30 am »
Also, I have code to handle the Arduino reset when the COM port is opened.

It works with the hp3478ext, I see no problems.
 

Offline Miti

  • Super Contributor
  • ***
  • Posts: 1324
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #158 on: March 15, 2020, 11:31:56 am »
The front panel buttons are functional, only the extension part is disabled.
Fear does not stop death, it stops life.
 

Offline lmester

  • Regular Contributor
  • *
  • Posts: 143
  • Country: us
    • My page
Re: project: extending HP3478A functionality
« Reply #159 on: March 21, 2020, 01:27:14 am »
and the ++ver response (GPIB).
I just wanted it to work with the default settings. Though, I might change it to return the
actual version.

I use a substring search when looking for the response to ++ver. As long as your ++ver response contains "GPIB" my program will detect it.

You could have a longer version string such as "Krill GPIB adapter Vx.x". This would allow my software to detect your adpter and also give you the ability to uniquely identify your GPIB adapter.

 

Offline kirill_kaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #160 on: March 25, 2020, 09:22:53 pm »
I was trying to save two presets, one with fixed pitch for continuity test, and one with variable pitch for short detection. It looks like they are using the same EEPROM addresses as the settings overwrite each other.

I just tried that. It works for me. So maybe you couldn't guess how it's supposed to work.
The command OVariableValueW always writes to the location of "preset 0".
You need the following sequence to store another preset.
1. Set variables without writing them to the EEPROM (such as OVariableValue)
2. Enter the measurement mode you need.
3. Press SRQ multiple times until you see "M: PRESET"
4. Press LOCAL 2 times. You should see S: SAVE0
5. Press SRQ. You should see S: SAVE1
6. Press LOCAL

To load PRESET1:
1. Press SRQ multiple times until you see "M: PRESET"
2. Press LOCAL. Press SRQ. You should see L: LOAD0
3. Press SRQ. You should see L: LOAD1
4. Press LOCAL
 

Offline kirill_kaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #161 on: March 25, 2020, 09:34:42 pm »
I use a substring search when looking for the response to ++ver. As long as your ++ver response contains "GPIB" my program will detect it.
Thanks, I'll do so.
Maybe then you could send ++exit before your program terminates. So hp3478ext will exit the prologix interpreter and could take back the control of the multimeter.
 

Offline Mp3

  • Frequent Contributor
  • **
  • Posts: 361
  • Country: us
Re: project: extending HP3478A functionality
« Reply #162 on: April 12, 2020, 11:45:35 am »
I apologize for the hassle, but is it possible to install this internally and have usb connectivity without making case mods?

I'd rather have it internal with the speaker, and even if i wanted to i don't have a drill powerful enough to break thru the 3478a casing...

 I suppose i might install it internally with a usb header to plug in when i want it and otherwise leave it closed up.
High school graduate
 

Offline kirill_kaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #163 on: April 12, 2020, 04:18:41 pm »
I apologize for the hassle, but is it possible to install this internally and have usb connectivity without making case mods?

Yes, it's possible. You can ether use USB with the case open or sneak the cable through the ventilation grill.
As the MCU uses UART for connectivity, you may even hack in something like bluetooth to UART module.
Although I'm not sure if an RF module can introduce noise into the measurements.
 
The following users thanked this post: Mp3

Offline Mp3

  • Frequent Contributor
  • **
  • Posts: 361
  • Country: us
Re: project: extending HP3478A functionality
« Reply #164 on: April 13, 2020, 10:02:48 pm »
Thanks, kirill_ka.

What did you choose to pull the power for the arduino from? It looks like straight off the underside of the voltage regulator?

I still have a couple days until my arduino boards show up then I will do the install.

...I just finished reading the rest of the thread and i guess arduino pin header cables are no good?  ???
« Last Edit: April 13, 2020, 10:12:17 pm by Mp3 »
High school graduate
 

Offline kirill_kaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #165 on: April 14, 2020, 06:10:21 am »
What did you choose to pull the power for the arduino from? It looks like straight off th underside of the voltage regulator?
Yes, since I have an old style regulator in a TO3 case, I connected a jumper cable straight to the pin of the regulator.
In the case of arduino I used the unregulated supply (just to engage the protection diode and polyfuse).
For the board I got form Miti I used the regulated 5V.

...I just finished reading the rest of the thread and i guess arduino pin header cables are no good?  ???
Why? Maybe you mean the issues related to the GPIB socket? But there're no cables involved then.
« Last Edit: April 14, 2020, 06:27:53 am by kirill_ka »
 

Offline Mp3

  • Frequent Contributor
  • **
  • Posts: 361
  • Country: us
Re: project: extending HP3478A functionality
« Reply #166 on: April 14, 2020, 07:25:20 am »
Ah! okay, thank you. I didn't realize the pin length problem was only with the PCB version.

I was going install it like this. https://www.eevblog.com/forum/projects/project-extending-hp3478a-functionality/msg2074201/#msg2074201
High school graduate
 

Offline kirill_kaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #167 on: April 14, 2020, 08:06:44 am »
Ah! okay, thank you. I didn't realize the pin length problem was only with the PCB version.

I was going install it like this. https://www.eevblog.com/forum/projects/project-extending-hp3478a-functionality/msg2074201/#msg2074201
I didn't try it like that, so I don't know.
There was another issue with my unit. It uses an old kind of socket with narrow pins. This socket is not compatible with the standard 0.1" pin headers.
 

Offline Mp3

  • Frequent Contributor
  • **
  • Posts: 361
  • Country: us
Re: project: extending HP3478A functionality
« Reply #168 on: April 16, 2020, 04:36:28 pm »
Last question for now, i hope....

Does your adapter support "W" command in gpib-usb, to use it for dumping SRAM calibration data?

https://www.eevblog.com/forum/repair/hp-3478a-how-to-readwrite-cal-sram/
High school graduate
 

Offline kirill_kaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #169 on: April 16, 2020, 05:40:50 pm »
Last question for now, i hope....

Does your adapter support "W" command in gpib-usb, to use it for dumping SRAM calibration data?
Yes. No special support required for individual commands.
Did you see the following thread? Not only you can dump the calibration data, but also you can decode and tune the individual parameters.
https://www.eevblog.com/forum/testgear/free-hp3478a-multimeter-control-program/
 
The following users thanked this post: Mp3

Offline Mp3

  • Frequent Contributor
  • **
  • Posts: 361
  • Country: us
Re: project: extending HP3478A functionality
« Reply #170 on: April 17, 2020, 12:58:57 am »
Last question for now, i hope....

Does your adapter support "W" command in gpib-usb, to use it for dumping SRAM calibration data?
Yes. No special support required for individual commands.
Did you see the following thread? Not only you can dump the calibration data, but also you can decode and tune the individual parameters.
https://www.eevblog.com/forum/testgear/free-hp3478a-multimeter-control-program/

I didn't know about that! Thanks again for your help, kirill. I can't wait to get this installed.
High school graduate
 

Offline lmester

  • Regular Contributor
  • *
  • Posts: 143
  • Country: us
    • My page
Re: project: extending HP3478A functionality
« Reply #171 on: April 19, 2020, 02:51:17 am »
I use a substring search when looking for the response to ++ver. As long as your ++ver response contains "GPIB" my program will detect it.
Thanks, I'll do so.
Maybe then you could send ++exit before your program terminates. So hp3478ext will exit the prologix interpreter and could take back the control of the multimeter.

Before program exit I send the following commands:

"D1"      'Turn instrument LCD display on
"++auto 0"   'Tell instrument to stop talking
"T1"      'Instrument trigger normal on stop
"++loc"      'instrument to local mode

I have now added "++exit".

This will return an "Unrecognized command" from the real Prologix adapter but won't cause any problems.

Please test it and verify that it's working with your firmware.
 
The following users thanked this post: Miti, kirill_ka

Offline Miti

  • Super Contributor
  • ***
  • Posts: 1324
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #172 on: April 19, 2020, 10:02:22 pm »
Before program exit I send the following commands:

"D1"      'Turn instrument LCD display on
"++auto 0"   'Tell instrument to stop talking
"T1"      'Instrument trigger normal on stop
"++loc"      'instrument to local mode

I have now added "++exit".

This will return an "Unrecognized command" from the real Prologix adapter but won't cause any problems.

Please test it and verify that it's working with your firmware.

It works for me, thanks!

Now it would be nice to add Kirill's extended function to your software.  ;)
Fear does not stop death, it stops life.
 

Offline kirill_kaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #173 on: April 19, 2020, 10:34:05 pm »
Now it would be nice to add Kirill's extended function to your software.  ;)

Luke, beware, it's over 3000 lines of very dense C code already  ;)
 

Offline Miti

  • Super Contributor
  • ***
  • Posts: 1324
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #174 on: April 19, 2020, 11:59:20 pm »
Now it would be nice to add Kirill's extended function to your software.  ;)

Luke, beware, it's over 3000 lines of very dense C code already  ;)

What I meant was buttons to select your functions but I guess SRQ must be a hard press, does it?
Fear does not stop death, it stops life.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf