Showing posts with label TekPower. Show all posts
Showing posts with label TekPower. Show all posts

22 June 2017

Controlling a Tekpower TP3005P power supply from Python

I bought the Tekpower TP3005P power supply recently.  This goes for around $100.  That's not bad for a 30V, 5A, power supply with a USB interface. I've been impressed by the performance as well.  The accuracy data below was collected by controlling both the power supply and a UT61E meter via Python code. See my separate blog post for python code to control a UT61E meter.






The copy I have is reasonably accurate. The graphs show less than 0.5% error though out the voltage range under low or no-load conditions.

When the TP3005P is plugged in to a USB port, it maps in as a standard Com port. The default Windows driver can be used.

The TP3005P.py code uses the PySerial module to manage the serial port.  This must be downloaded and installed under Python before the power supply code can be run.  Other than PySerial, TP3005P.py should run on its own.  Un-comment the call to test() to run a short demo. 

Like most lab power supplies, at no load it is in voltage regulation mode.  The voltage will go to the commanded level.  If the current exceeds its set point, then the power supply changes to current regulation mode.  The voltage will drop below its set point to whatever level is necessary to prevent the current from exceeding its set point.

The power supply has commands to set the voltage and current set points that it will regulate to.  It also has commands to read back the set points.  Additionally, the power supply can measure the actual voltage and current at its output terminals.  Finally, there is a command to turn the power supply output on or off.

The voltage can be set and read at a resolution of 0.01 VDC.  The current can be set and read at a resolution of 0.001 ADC.

** 2021.10.20 Updated link to Google Drive **

TP3005P Python Code