Talking to an Anritsu PSN50 - Page 1
Forum section: electronics / testgear

author: tombi
author_rank: Regular Contributor
timestamp: November 20, 2017, 04:18:48 am
content: So I bought one of thesePSN50power 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:Bus 004 Device 002: ID 0b5b:ffc8Device Descriptor:bLength 18bDescriptorType 1bcdUSB 2.00bDeviceClass 2 CommunicationsbDeviceSubClass 0bDeviceProtocol 0bMaxPacketSize0 8idVendor 0x0b5bidProduct 0xffc8bcdDevice 0.00iManufacturer 1 Anritsu CompanyiProduct 2 PSN50 Power SensoriSerial 0bNumConfigurations 1Configuration Descriptor:bLength 9bDescriptorType 2wTotalLength 67bNumInterfaces 2bConfigurationValue 1iConfiguration 0bmAttributes 0x80(Bus Powered)MaxPower 100mAInterface Descriptor:bLength 9bDescriptorType 4bInterfaceNumber 0bAlternateSetting 0bNumEndpoints 1bInterfaceClass 2 CommunicationsbInterfaceSubClass 2 Abstract (modem)bInterfaceProtocol 1 AT-commands (v.25ter)iInterface 0CDC Header:bcdCDC 1.10CDC ACM:bmCapabilities 0x02line coding and serial stateCDC Union:bMasterInterface 0bSlaveInterface 1CDC Call Management:bmCapabilities 0x00bDataInterface 1Endpoint Descriptor:bLength 7bDescriptorType 5bEndpointAddress 0x82 EP 2 INbmAttributes 3Transfer Type InterruptSynch Type NoneUsage Type DatawMaxPacketSize 0x0008 1x 8 bytesbInterval 2Interface Descriptor:bLength 9bDescriptorType 4bInterfaceNumber 1bAlternateSetting 0bNumEndpoints 2bInterfaceClass 10 CDC DatabInterfaceSubClass 0bInterfaceProtocol 0iInterface 0Endpoint Descriptor:bLength 7bDescriptorType 5bEndpointAddress 0x03 EP 3 OUTbmAttributes 2Transfer Type BulkSynch Type NoneUsage Type DatawMaxPacketSize 0x0040 1x 64 bytesbInterval 0Endpoint Descriptor:bLength 7bDescriptorType 5bEndpointAddress 0x83 EP 3 INbmAttributes 2Transfer Type BulkSynch Type NoneUsage Type DatawMaxPacketSize 0x0040 1x 64 bytesbInterval 0Device Status: 0x0001Self PoweredEven better - I found there is a device at /dev/serial/by-id/usb-Anritsu_Company_PSN50_Power_Sensor-if00So 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

author: tombi
author_rank: Regular Contributor
timestamp: November 21, 2017, 04:36:01 am
content: Ok I made some progress!IDN? Give me ANRITSU,PSN50,0748037,0748037,1.00STATUS? 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 0Tried PWR? NPWR? POWER?Any other guesses worth trying? These were found by guessing based on the MA24106A manual but it is clearly different.Tom

author: luma
author_rank: Regular Contributor
timestamp: November 21, 2017, 01:59:44 pm
content: This documentfrom another one of their models suggests the following commands might be in play:CommandDescriptionSTARTPuts the power sensor in measurement modeSTOPStops the measurement mode and puts the sensor in idle modeIDN?Gets identification information from the sensorPWR?Gets the power reading from the power sensor.NPWR?Gets a new power reading from the sensorFREQ?Gets the current cal factor frequency value from the sensorFREQSets the cal factor frequency valueZEROZeros the power sensorTMP?Gets the current temperature from the sensorSTATUS?Gets the error status byte from the sensorHATSets High Aperture Time modeLATSets Low Aperture Time modeedit: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 triedPWRALL?

author: tombi
author_rank: Regular Contributor
timestamp: November 21, 2017, 03:16:47 pm
content: 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

author: luma
author_rank: Regular Contributor
timestamp: November 21, 2017, 06:45:31 pm
content: I should note that POWERALL doesn't have a trailing ?, despite my placing one there in my question.

author: darrell
author_rank: Regular Contributor
timestamp: November 21, 2017, 07:38:48 pm
content: 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.

author: tombi
author_rank: Regular Contributor
timestamp: November 22, 2017, 04:20:22 am
content: 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) 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

author: ua4yhz
author_rank: Regular Contributor
timestamp: July 11, 2022, 07:17:49 pm
content: Quote from: luma on November 21, 2017, 01:59:44 pmToday 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.

author: ua4yhz
author_rank: Regular Contributor
timestamp: July 19, 2022, 02:30:10 pm
content: I have completed a program for working with this sensor today.Works on win 11.I added this sensor to my laboratory.

author: gdelucia
author_rank: Newbie
timestamp: January 01, 2023, 09:50:10 pm
content: Hi, is it possible to try your software?I am interested in buying one of these sensors.CheersGian

author: apples
author_rank: Newbie
timestamp: December 19, 2023, 08:40:20 am
content: 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.

author: coromonadalix
author_rank: Super Contributor
timestamp: December 19, 2023, 11:37:07 am
content: have you seen this thread ?https://www.eevblog.com/forum/testgear/anritsu-psn50-calxpert-software-discontinued-do-you-have-it/

author: Robert999
author_rank: Newbie
timestamp: March 13, 2024, 10:14:40 pm
content: 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

author: ua4yhz
author_rank: Regular Contributor
timestamp: March 17, 2025, 10:30:34 am
content: Quote from: ua4yhz on July 19, 2022, 02:30:10 pmI wrote a new program in C++. It works on all Windows via RS-232 connector.I also wrote a PSN50 sensor simulator on Arduino nano to test my program.The program is not finished yet and will be updated gradually.Demo version of the program working with the simulator:https://drive.google.com/drive/folders/1Uo9N84_5ZNAk2QcKs0AMXWvVdNXCPnMm?usp=drive_linkWhen connecting a real PSN50 sensor, it should correctly identify its model and serial number.The sensor is very sensitive to interference. Connect it to a laptop running on battery power.When connected to a PC, the sensor will either not work at all or will work with large delays due to interference.It is advisable to power the PSN50 sensor from a low-power transformer power supply. It can be unstabilized.

author: coromonadalix
author_rank: Super Contributor
timestamp: March 17, 2025, 11:02:22 am
content: can you share this software to the community ? or send me a private link ?nicely done

author: ua4yhz
author_rank: Regular Contributor
timestamp: March 23, 2025, 08:00:21 pm
content: If you connect to the sensor via the RS-232 connector, you will need a null-modem cable or an adapter as in the photo and a USB to RS-232 adapter (CH-340 or FTDI).one more note. The new CH-340 2024 year driver does not work. you need to install older drivers from 2011-2019 years .P.S. Almost all users have the PSN50 sensor that does not work via USB.I don't know what this is connected to, perhaps with different Windows builds for different countries.I recommend using the connection only via the RS-232 connector.