Author Topic: Talking to an Anritsu PSN50  (Read 2652 times)

0 Members and 1 Guest are viewing this topic.

Offline tombiTopic starter

  • Regular Contributor
  • *
  • Posts: 163
  • Country: au
Talking to an Anritsu PSN50
« on: November 20, 2017, 04:18:48 am »
So I bought one of these PSN50 power sensor modules pretty cheaply off ebay. I thought there was PC software you could use with it but apparently the software is only used for calibration and retails for like $3K.

The unit is supposed to connect to a sitemaster or whatever unit to measure power. As a result Anritsu won't tell me how to talk to it (fair enough I suppose).

Before I put it back on ebay I thought I'd play with it to see if I could make it work.

lsusb gives me this which looks promising (see the AT command interface)

Code: [Select]
Bus 004 Device 002: ID 0b5b:ffc8 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            2 Communications
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x0b5b
  idProduct          0xffc8
  bcdDevice            0.00
  iManufacturer           1 Anritsu Company
  iProduct                2 PSN50 Power Sensor
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           67
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              0
      CDC Header:
        bcdCDC               1.10
      CDC ACM:
        bmCapabilities       0x02
          line coding and serial state
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      CDC Call Management:
        bmCapabilities       0x00
        bDataInterface          1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0001
  Self Powered

Even better - I found there is a device at /dev/serial/by-id/usb-Anritsu_Company_PSN50_Power_Sensor-if00

So I poked some commands at it but whatever I send I get a response of 'BAD CMD'

The fact that is responds seem like good new but does anybody have any ideas what it might be expecting?

I tried *IDN?, ATZ (see if AT commands might work), help, ? 'read' and a bunch of other stuff.

Thanks,

Tom Biskupic
 

Offline tombiTopic starter

  • Regular Contributor
  • *
  • Posts: 163
  • Country: au
Re: Talking to an Anritsu PSN50
« Reply #1 on: November 21, 2017, 04:36:01 am »
Ok I made some progress!

IDN? Give me  ANRITSU,PSN50,0748037,0748037,1.00

STATUS? gives me a byte but I haven't figured it out yet (I'm using a terminal)

TEMP? Gives me the current temperature.

ZERO gives no response for a while and then says "OK"

AVG? Gives me 1 if I say AVG 0 it says Ok and then AVG? says 0

Tried PWR? NPWR? POWER?

Any other guesses worth trying? These were found by guessing based on the MA24106A manual but it is clearly different.

Tom





 

Offline luma

  • Regular Contributor
  • *
  • Posts: 130
  • Country: us
Re: Talking to an Anritsu PSN50
« Reply #2 on: November 21, 2017, 01:59:44 pm »
This document from another one of their models suggests the following commands might be in play:

CommandDescription
STARTPuts the power sensor in measurement mode
STOPStops the measurement mode and puts the sensor in idle mode
IDN?Gets identification information from the sensor
PWR?Gets the power reading from the power sensor.
NPWR?Gets a new power reading from the sensor
FREQ?Gets the current cal factor frequency value from the sensor
FREQSets the cal factor frequency value
ZEROZeros the power sensor
TMP?Gets the current temperature from the sensor
STATUS?Gets the error status byte from the sensor
HATSets High Aperture Time mode
LATSets Low Aperture Time mode

edit: here's documentation from another model from their site, check out page 13-1 for a huge list of remote commands you might try.

edit2: just re-read your post, looks like we're already working from the same document.  Have you tried PWRALL?
« Last Edit: November 21, 2017, 02:07:27 pm by luma »
 

Offline tombiTopic starter

  • Regular Contributor
  • *
  • Posts: 163
  • Country: au
Re: Talking to an Anritsu PSN50
« Reply #3 on: November 21, 2017, 03:16:47 pm »
Thanks for the tip!

No - NPWR? PWR? PWRALL? Don't work either. I tried a random selection of commands from the power expert document you linked but no further hits.

Super infuriating!

I even had a peek inside in the hope I could grab some firmware but the uC is on the other side of the board so I would have to peel off stickers, unscrew the main connector etc to get to it (at which point I think its cal would be gone).

I'll keep guessing. Oh and I might very nicely ask Anritsu support for a hint. You never know.

Tom

 

Offline luma

  • Regular Contributor
  • *
  • Posts: 130
  • Country: us
Re: Talking to an Anritsu PSN50
« Reply #4 on: November 21, 2017, 06:45:31 pm »
I should note that POWERALL doesn't have a trailing ?, despite my placing one there in my question.
 

Offline darrell

  • Regular Contributor
  • *
  • Posts: 51
Re: Talking to an Anritsu PSN50
« Reply #5 on: November 21, 2017, 07:38:48 pm »
It might require a trigger. I send my R&S NRP-Z55 sensor "INIT:IMM\nFETC?\n" to fetch a measurement. The INIT:IMM is in specified in the SCPI standard to force a trigger and worth a try. INIT:CONT ON should give continuous measurements.

Also worth a try is SYST:ERR? and/or SYST:ERR:ALL? to see what errors your commands are generating. SYST:HELP:HEAD? (or SYST:TREE? which is non standard) may return a list of possible commands, but that one is optional in the SCPI standard.

 

Offline tombiTopic starter

  • Regular Contributor
  • *
  • Posts: 163
  • Country: au
Re: Talking to an Anritsu PSN50
« Reply #6 on: November 22, 2017, 04:20:22 am »
Thanks!

I don't think it is SCPI. The other sensors they make certainly aren't and the syntax seems to be  <command>? to read and <command><space><param> to write.

I got desperate - I wrote a python script that went through all the three letter read comments so AAA through to ZZZ. I found AVG and IDN that I already knew about and then (and this is a total  :palm:) I found POW? Yes obvious in hindsight!

I might get it to do the 4 letter commands too.

The thing is the device loses it if I send the commands too quickly so I have to put small sleeps between commands. This makes it take ages.

Finding the set commands is much harder as I could potentially damage things. Also if I don't supply a param to AVG (or too many params) it responds with BAD COMMAND so then I don't know if I that is not a command or just needs more parameters.

From the specsheet I think the only commands I am missing are the ones to set the CAL table (which I don't want to do), one to enable/disable MAX hold mode and maybe to set the frequency.

Tom
 
 

Offline ua4yhz

  • Contributor
  • Posts: 24
  • Country: 00
Re: Talking to an Anritsu PSN50
« Reply #7 on: July 11, 2022, 07:17:49 pm »
This document from another one of their models suggests the following commands might be in play:

CommandDescription
STARTPuts the power sensor in measurement mode
STOPStops the measurement mode and puts the sensor in idle mode
IDN?Gets identification information from the sensor
PWR?Gets the power reading from the power sensor.
NPWR?Gets a new power reading from the sensor
FREQ?Gets the current cal factor frequency value from the sensor
FREQSets the cal factor frequency value
ZEROZeros the power sensor
TMP?Gets the current temperature from the sensor
STATUS?Gets the error status byte from the sensor
HATSets High Aperture Time mode
LATSets Low Aperture Time mode

edit: here's documentation from another model from their site, check out page 13-1 for a huge list of remote commands you might try.

edit2: just re-read your post, looks like we're already working from the same document.  Have you tried PWRALL?
Today I wrote a small terminal program. Some commands don't match the ones you described.
PWR, NPWR, PWRALL?, FREQ?, FREQ, TMP? - The response comes from the sensor "BAD CMD".
Strange, but my sensor has other commands.
IDN?, TEMP?, ZERO, AVG? - The commands are working.
« Last Edit: July 11, 2022, 07:27:37 pm by ua4yhz »
 

Offline ua4yhz

  • Contributor
  • Posts: 24
  • Country: 00
Re: Talking to an Anritsu PSN50
« Reply #8 on: July 19, 2022, 02:30:10 pm »
I have completed a program for working with this sensor today.
Works on win 11.
I added this sensor to my laboratory.
« Last Edit: July 20, 2022, 10:22:18 am by ua4yhz »
 

Offline gdelucia

  • Newbie
  • Posts: 1
  • Country: it
Re: Talking to an Anritsu PSN50
« Reply #9 on: January 01, 2023, 09:50:10 pm »
Hi, is it possible to try your software?
I am interested in buying one of these sensors.
Cheers
Gian
 

Offline apples

  • Newbie
  • Posts: 4
  • Country: gb
Re: Talking to an Anritsu PSN50
« Reply #10 on: December 19, 2023, 08:40:20 am »
OK, I realize this is an old thread, but is anyone else working on these PSN50 sensors still?

I'm fairly close to making mine useable using the serial interface, but having difficulty with the USB interface.
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 5897
  • Country: ca
Re: Talking to an Anritsu PSN50
« Reply #11 on: December 19, 2023, 11:37:07 am »
« Last Edit: December 19, 2023, 11:38:57 am by coromonadalix »
 

Offline Robert999

  • Newbie
  • Posts: 6
  • Country: pl
Re: Talking to an Anritsu PSN50
« Reply #12 on: March 13, 2024, 10:14:40 pm »
Hello, I am looking for software for the ANRITSU PSN50 sensor. The program I downloaded from this website from ua4yhz. I have Win 7, the PSN50 program starts but does not see the sensor. The USB driver is installed. After connecting the sensor, the system detects its connection to the computer but nothing happens. Can anyone help me on this matter?

Robert
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf