Benoit Frigon
My blog about electronic projects, telephony and other stuff...

Programming » Python library for 364X series PSU

View on GitHub

I wrote a python library for remotely controlling an Array 364x series bench power supply. These PSU are re-branded under many names (Circuit specialist, Array, 3Com). It is likely they all have the same firmware, so it should be compatible. I have tested it on my Circuit Specialist 3645A.

What it does

  • Read/Set operating parameters (max. current, max. power, max. voltage, voltage set)
  • Measure output parameters (output state, output voltage, output current, output power)
  • Set output ON-OFF
  • Read serial number, model number and firmware version

What it does not do

  • Calibration. The commands needed for calibration are not implemented yet.

Dependencies

  • pyserial

Installation

If you already have Python and pip on your system you can install the library simply by running:

pip install psu364x

-OR-

git clone https://github.com/bfrigon/python-psu364x.git

cd python-psu364x

python setup.py install

Interfacing to the PSU

These PSU have a DB-9 port on the back. It is not a standard RS-232 serial port, You need to use 3.3 volts TTL level serial, standard USB to RS232 converters will NOT work! You can buy a converter specially made for this. I built my own using the widely used FT232RL usb to UART IC. This chip has an onboard 3.3v regulator, if you connect the 3V3OUT to VCCIO, the output will be driven to 3.3 volts.

Example

import os,sys
import psu364x

PORT = "/dev/ttyUSB0"
SPEED = 9600
ADDRESS = 0

try:

    print "Establishing communication with PSU...\n\n"
    psu = psu364x.Psu(PORT, ADDRESS, SPEED)

    info = psu.getInfo()

    print "Power supply {0}, serial number {1}".format(info.model, info.serial)


    print "\n\nClosing connection..."
    psu.close()

except psu364x.UnexpectedResponse as e:
    print "Unexpected response from PSU ({0})".format(str(e))