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

0 Members and 1 Guest are viewing this topic.

Offline Miti

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #50 on: December 28, 2018, 10:32:04 pm »
Hi Miti,

It definitely works without an USB-to-UART adapter, but it would be very hard to diagnose any problems without one.
How did you download the firmware then?
The "standard" fuse settings used on those atmega328p boards should work.
However the recommended efuse configuration is at the bottom of the following page:
https://kirill-ka.github.io/hp3478ext/basic-impl.html

I programmed using USB-AVR-ISP. Both main flash and EEP pass verification.

Edit: I have a feeling that the Arduino bootloader is still needed. However, it was erased when I programmed it using the ISP programmer. Could that be the cause?
« Last Edit: December 28, 2018, 10:42:24 pm by Miti »
That big spark at power up was by design!
 

Offline kirill_ka

  • Regular Contributor
  • *
  • Posts: 185
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #51 on: December 29, 2018, 07:12:38 am »
Could that be the cause?
Yes. Then you need  to disable the bootloader with fuse bits...
 

Offline Miti

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #52 on: December 29, 2018, 05:20:54 pm »
I did but it still doesn't work. See attached screen shots for flash and EEP verification and the fuses status.
That big spark at power up was by design!
 

Offline kirill_ka

  • Regular Contributor
  • *
  • Posts: 185
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #53 on: December 29, 2018, 06:26:41 pm »
I'm almost out of ideas what can we try without the serial interface.
What's the GPIB address of HP3478A? Is it set to default?
You may try to set PWR ON SRQ DIP switch to see if SRQ annunciator is cleared after power off.
Do you see LSN or TLK annunciators blinking after powering 3478A on?

I'll check fuse config later, but your setting looks right.
 

Offline Miti

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #54 on: December 29, 2018, 06:44:12 pm »

What's the GPIB address of HP3478A? Is it set to default?
You may try to set PWR ON SRQ DIP switch to see if SRQ annunciator is cleared after power off.
Do you see LSN or TLK annunciators blinking after powering 3478A on?

I'll check fuse config later, but your setting looks right.

The GPIB address was set to 2. I set it to 0 and still nothing. What should it be? I set the PWR ON SRQ and SRQ is displayed and stays there.
LSN and TLK never blink.
« Last Edit: December 29, 2018, 06:49:35 pm by Miti »
That big spark at power up was by design!
 

Offline kirill_ka

  • Regular Contributor
  • *
  • Posts: 185
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #55 on: December 29, 2018, 06:52:07 pm »
The GPIB address was set to 2. I set it to 0 and still nothing. What should it be? I set the PWR ON SRQ and SQR is displayed and stays there.
LSN and TLK never blink.
The default address for HP3478A is 23.
 

Offline Miti

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #56 on: December 29, 2018, 07:00:50 pm »
 :-+

That was it, the address was wrong. You should add that to the instructions. Thanks a lot Kirill!
That big spark at power up was by design!
 

Offline kirill_ka

  • Regular Contributor
  • *
  • Posts: 185
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #57 on: December 29, 2018, 07:46:14 pm »
That was it, the address was wrong. You should add that to the instructions.
Yes, I will.  I'm glad you got it working.
Power on SRQ is also recommended setting, since it helps to detect 3478A's reset condition.
« Last Edit: December 29, 2018, 09:59:02 pm by kirill_ka »
 
The following users thanked this post: Miti

Offline Miti

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #58 on: December 29, 2018, 10:16:14 pm »
I like your project! I think I'll put it on a proper PCB and install it in my two meters.  :clap:  :-+

Edit: Is the UI diagram in page one up to date? Mine doesn't seem to follow it or I don't understand it.
« Last Edit: December 29, 2018, 10:50:20 pm by Miti »
That big spark at power up was by design!
 
The following users thanked this post: kirill_ka

Offline kirill_ka

  • Regular Contributor
  • *
  • Posts: 185
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #59 on: December 31, 2018, 08:17:21 am »
Edit: Is the UI diagram in page one up to date? Mine doesn't seem to follow it or I don't understand it.
Autohold, diode and temperature functions are missing from it. Other than that, it seems to be correct.
The (SRQ)) thing means that you have to press SRQ number of times. The particular order of menu entries is not shown.
Also note, that autohold seems to work better in 4 digit mode.
 

Offline kirill_ka

  • Regular Contributor
  • *
  • Posts: 185
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #60 on: December 31, 2018, 08:25:39 am »
I think I'll put it on a proper PCB and install it in my two meters.
Then I owe you to describe how I connected the UART-USB module...
 

Offline Miti

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #61 on: December 31, 2018, 12:56:05 pm »
Then I owe you to describe how I connected the UART-USB module...

That won't be necessary, I think I know how to connect them. I will send you the schematic for validation before I do the layout. I have couple of questions though:
1. In one of your pictures you connect the GPIB on top of the add-on module. Can you have it both ways, add this extra functionality, the USB and have the GPIB functional as well? Do you put everything in tri-state? I don't think that can be done.
2. What's the PWM frequency of the buzzer? It seems to be a bit low for the buzzer that I have. They work best close to their resonant frequency, did you have a specific part in mind when you selected that frequency?
That big spark at power up was by design!
 

Offline kirill_ka

  • Regular Contributor
  • *
  • Posts: 185
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #62 on: December 31, 2018, 04:23:19 pm »
I pulled up TX pin of CP2101 to it's internal 3.3V regulator and connected to 328p's RX through a diode. USB 5V is also connected to 328p through a Shottky diode. So the CP2101 is not powered through the arduino board.
I used unregulated 5V supply (which is more like 15V) to power the arduino board to use it's diode, fuse, and internal regulator.

1. It should be fine if you disable 3478A extensions (OX0 command). Most* GPIB lines are not actively pulled high in atmega. I assume 2 scenarios:
1) external USB controller is used, then atmega board does nothing.
2) hp3478ext can be used as a controller for other devices connected to HP3478A externally.
Although, in both cases GPIB signals should stay within allowed atmega pin voltage.
* I should check the code, and tell you how it works exactly. May be I haven't put enough thought in it...

2. If it's a buzzer, it doesn't require PWM. Initially I used piezo speaker (which requires a driver to sound properly). When I switched to the buzzer, I left pwm so the buzzer doesn't sound loud. I can add eerpom config to it so you can tweak it.

UPDATE:
IEEE 488 specifies maximum signal level as 5.25V. This should be fine for AVR.
All GPIB signal lines in hp3478ext are driven in open collector way. There's no strong pull up.
DAV and SRQ lines are weakly pulled up. Current hp3478ext firmware pulls DIO low when inactive. I'm going to remove this behaviour, because it would conflict with an external GPIB controller.
« Last Edit: January 01, 2019, 03:48:17 pm by kirill_ka »
 

Offline Miti

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #63 on: January 01, 2019, 09:46:32 pm »
I got bored today and put together a schematic.
That big spark at power up was by design!
 

Offline kirill_ka

  • Regular Contributor
  • *
  • Posts: 185
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #64 on: January 02, 2019, 07:19:53 pm »
I got bored today and put together a schematic.
It looks good. Thanks.
Please, consider the modifications I made.
J3: 2.54mm pitch connector for USB B socket (which can be mounted on the back of 3478A).
 

Offline Miti

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #65 on: January 05, 2019, 05:04:28 pm »
Hi Kirill,

I have a couple of questions:

1. What's the benefit of powering the FT232 from USB only? It is held in reset while USB is not plugged anyway and I save three diodes.
2. What's D6 doing? Is it a heart beat indicator?

Thanks,
Miti
That big spark at power up was by design!
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 2043
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #66 on: January 05, 2019, 05:15:05 pm »
D6 could be an heart beat, activity monitor etc ..  it depends on the firmware coding, i dont think the ft232 would be held in reset,  i have FTDI usb adapters always connected to my pc,  until you open connection on com ports, they stand still and are waiting ?? and the coms on the "slave" interfaces are not held in reset too, they function normally.

I have FTDI usb-rs232, but hey have an added buffer bidirectional i/o chip inside.  We did had problems of isolation / data lines not pulled correctly and when i made some tests it affected the "slave" instruments circuits.

Not sure the ft232 would have some isolation ?? You may end with ground problems if you take some measurements with the meter and be connected to an computer.

Thats why i push some good isolation circuit for the usb-gpib interface ??  I know, i know  its not a 5$ dongle, but when you measure voltage potential between pc ground and interface grounds you may have some surprise(s).

I would have added an small dc-dc 5 volts converter isolator, they have a very small footprint, it would add more isolation, but not on the data signals.

Is the Official HP Agilent  usb-gpib   has known available schematics ??  since we have so many cloned devices from china.

Usb isolator:  9$ usd
https://www.ebay.com/itm/1500V-USB-to-USB-Isolator-Board-Protection-Isolation-ADUM4160-ADUM3160-Module/152382773951?hash=item237ab89abf:g:2d8AAOSwEzxYbQMG:rk:2:pf:0
« Last Edit: January 05, 2019, 05:31:54 pm by coromonadalix »
 

Offline kirill_ka

  • Regular Contributor
  • *
  • Posts: 185
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #67 on: January 05, 2019, 09:24:25 pm »
Hi Miti.
1. What's the benefit of powering the FT232 from USB only? It is held in reset while USB is not plugged anyway and I save three diodes.
The idea is to allow the whole thing to be USB powered.
a) for testing purposes
b) for external GPIB connection
c) to allow firmware updates while the 3478A is turned off
Anyway, you can leave pcb jumpers and leave those components unpopulated.
2. What's D6 doing? Is it a heart beat indicator?
Current firmware blinks it when it's in the GPIB listen state.
It can be repurposed for something... Heart beat may be a better use for it. So you know the firmware is alive.
 

Offline kirill_ka

  • Regular Contributor
  • *
  • Posts: 185
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #68 on: January 05, 2019, 09:32:18 pm »
Not sure the ft232 would have some isolation ?? You may end with ground problems if you take some measurements with the meter and be connected to an computer.
Digital part of HP3478A is already isolated from analogue part. I don't see why the USB isolation would be necessary.
 

Offline Miti

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #69 on: January 05, 2019, 10:00:51 pm »
... i dont think the ft232 would be held in reset,  i have FTDI usb adapters always connected to my pc,  until you open connection on com ports, they stand still and are waiting ?? and the coms on the "slave" interfaces are not held in reset too, they function normally.

Read section 6.2 in the attached datasheet.

I have FTDI usb-rs232, but hey have an added buffer bidirectional i/o chip inside.  We did had problems of isolation / data lines not pulled correctly and when i made some tests it affected the "slave" instruments circuits.

Not sure the ft232 would have some isolation ?? You may end with ground problems if you take some measurements with the meter and be connected to an computer.

Thats why i push some good isolation circuit for the usb-gpib interface ??  I know, i know  its not a 5$ dongle, but when you measure voltage potential between pc ground and interface grounds you may have some surprise(s).

I would have added an small dc-dc 5 volts converter isolator, they have a very small footprint, it would add more isolation, but not on the data signals.

Is the Official HP Agilent  usb-gpib   has known available schematics ??  since we have so many cloned devices from china.

Usb isolator:  9$ usd
https://www.ebay.com/itm/1500V-USB-to-USB-Isolator-Board-Protection-Isolation-ADUM4160-ADUM3160-Module/152382773951?hash=item237ab89abf:g:2d8AAOSwEzxYbQMG:rk:2:pf:0

Take a look at the block diagram in the service manual of HP3478A. The meter has two sections, the analog, measuring section and the digital, processing, displaying, communication section. These two sections are galvanically isolated. The two sections are present in all bench meters and they are called chassis common/floating common in this particular HP meter, inguard/outguard in Fluke meters. The data transfer between sections is done through transformers or optocouplers. Unless you do something (stupid, maybe dangerous and, in case of bench meters, useless) to isolate the chassis from the ground (earth), the meter chassis and the PC chassis that is connected to, should be at the same level, ground level. The measurements should not be affected at all.
That big spark at power up was by design!
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 2043
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #70 on: January 06, 2019, 03:17:39 am »
Sorry

I forgot the meter circuit ingard outgard circuit(s),  disregard my comments,  same for my 34401a   loll    :palm:
 

Offline Miti

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #71 on: February 17, 2019, 02:56:46 am »
And here's the board. Populated, tested. Tomorrow I will take some pictures inside the meter.

Kirill,

Is the source code Arduino or C? Could you share it?

Edit: Added picture inside the meter.
Edit1: Never mind, brain fart, the code is on github.
« Last Edit: February 17, 2019, 02:56:18 pm by Miti »
That big spark at power up was by design!
 
The following users thanked this post: Melt-O-Tronic

Offline kirill_ka

  • Regular Contributor
  • *
  • Posts: 185
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #72 on: February 17, 2019, 05:58:20 pm »
Great news! Thanks. I see you found a proper socket with long pins. I used pin headers meant for Arduino shields. They didn't fit well.
 

Offline kirill_ka

  • Regular Contributor
  • *
  • Posts: 185
  • Country: ru
Re: project: extending HP3478A functionality
« Reply #73 on: February 17, 2019, 07:02:32 pm »
This is how I installed USB type B socket for remote control and programming.
I used a cable like that:
https://www.ebay.com/itm/2pcs-90-Degree-Left-Right-Angled-USB-B-Type-Male-to-Female-Extension-Cable/262054119211

EDIT: it's a fail! The socket can't be used while GPIB cable is plugged. It should be moved further away from the GPIB connector.
« Last Edit: February 22, 2019, 09:53:39 pm by kirill_ka »
 

Offline Miti

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ca
Re: project: extending HP3478A functionality
« Reply #74 on: February 17, 2019, 09:15:38 pm »
Great news! Thanks. I see you found a proper socket with long pins. I used pin headers meant for Arduino shields. They didn't fit well.

Lool!

That's exactly what I used, the pins from an Arduino stackable header kit on the bottom and a socket on the top. Pretty hard to keep together and solder...and that kit is damn expensive.
The problem with the sockets with long pins is that they are square and pretty thick. One insertion would damage the socket on the meter. I couldn't find a socket with long, flat pins.

Edit: It doesn't work with external GPIB adapter in parallel with the extension for me. You may want to look at the code and see if all the lines are high impedance/inputs while waiting for buttons press/serial communication.
« Last Edit: February 17, 2019, 09:34:23 pm by Miti »
That big spark at power up was by design!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf