Skip to content
forked from tymmothy/pyPSP603

Python module for controlling GW-Instek PSP power supplies via serial.

Notifications You must be signed in to change notification settings

pavelrevak/pypsp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pypsp

This is a Python module for control of GW-Instek PSP power supply units over a serial interface. It requires pyserial to be installed, and a recent (3.3+ or newer) version of Python.

Note that a special cable may be necessary to interface with the power supplies (they are optoisolated, so voltage is needed from the computer's serial port for communications to work). The power supplies communicate at 2400 baud.

Full description of communication protocol and electrical connection is in user manual

This module is fully working with USB to RS232 converters

install:

pip install .

usage:

First create serial connection (with pyserial) and give this serial connection into Psp class.

Then use properties to access values in power supply.

Example:

>>> import serial
>>> import psp
>>> serial_port = serial.Serial('/dev/ttyS0', 2400)
>>> psp = psp.Psp(serial_port)
>>> psp.voltage = 4.2
>>> psp.relay = True
>>> print psp.current

Example Set the output voltage, close the output relay, then print the output current.

Credits

Original code is written by Tymm (Twillman) Zerr and is forked and rewrited from pyPSP603 with full support of python3 and generalized name to pypsp for all PSP power supplies, because actually whole series has same protocol only differ in maximum voltage and current.

About

Python module for controlling GW-Instek PSP power supplies via serial.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%