Programmable Power Supply Controller

email me.mailto:knotinweb@rau-deaver.comcastbiz.net?subject=PPSC

The Programmable Power Supply Controller (PPSC) allows you to create an arbitrary voltage profile for a programmable power supply to generate. In a sense this is a high power output, slow, arbitrary waveform generator. There is a rudimentary ‘looping’ function, but there is no exit condition, it loops forever. And due to the generally slow communications between a computer and a power supply, your time resolution is large, maybe tens of milliseconds on a fast computer, and not very accurate, but it does allow you to test products for applications like the voltage profile of a starting car, power supply dip, and power supply instability. The program can work with any programmable power supplies on the market if you can write or find a .dep file for it. The .dep file format is not a standard, it is specific to this program. The download includes a .dep template and five .dep files for B&K Precision 1658B, Tenma (72-6630), Lambda (ZUP family) and Agilent programmable power supplies (the Agilent one is untested).


To use the program, you must have the .dep file in the “PPSC dep files” folder. Launch the program and all the dep files will be available in the top pop-up menu. Select your power supply. If your power supply is identified in the .dep file as having an addressable bus for supporting multiple power supplies, the next two pop-up menus will be available, otherwise they will remain grayed out.


The voltage profile file is a comma-separated values file with two columns. The first column is time and the second column is the voltage. Select the format of your voltage profile file, your options are:

Seconds, Volts

Seconds, Millivolts

Minutes, Volts

Minutes, Millivolts


A blank line in your voltage profile will end the sequence. This allows you to add comments after an empty line in the file.


Now open your voltage profile file; it will appear in the large edit file where you may edit it if needed. If you want the power supply set to zero volts after the file is finished generating your profile, check the box at the bottom. Now just push Start to generate your voltage profile from your power supply.


An Example

Here is a sample file:

1, 2

2, 3

3, 4

4, 5

5, 6

6, 7

7, 8

8, 9

9, repeat, 4

In this example, one second after the start button is pressed the power supply will be commanded to 2 volts. The following second, three volts and so on. At 9 seconds we loop back to line 4 where we command the supply to 5 volts. Throughout the repeat loop the times are relative, keeping the same delta time between voltages.


.dep files

The communication protocol and power supply limits of the power supply is detailed in the power supply .dep file. Currently I only support serial interfaces (and serial over USB). The download includes a prototype .dep file and four real ones in the  PPSC .dep files folder. The download includes both a Windows and Macintosh OS X versions and a sample voltage profile file of the battery voltage of my 2000 Ford Contour starting up.


If you use PPSC and make a .dep file for another power supply, I would like it if you would email it to me so I could include it on my web site to share with all. Please indicate in the email how you would like me to credit your work.


AppleScript

There are three AppleScript commands for PPSC. PPSC must be launched, power supply selected, and communications established before sending any AppleEvents. PPSC’s setup is not scriptable yet.


OpenSequenceFile will open a text file with time and voltage points. The file path must be POSIX compliant. The command returns:

        0    Success

        -1   File open error - not found

        -2   File open error - not a text file

        -3   File open error


StartSequence will do the same as pressing the Start button with checking/unchecking the Zero volts when stopped checkbox. If the parameter is zero, the voltage is set to zero after the sequence is done, otherwise the supply is left at its last programmed voltage. The command returns:

        0    Success

        -3   Can’t start, a sequence was already running


SetVoltage will simply set the output voltage immediately and return. The command returns:

        0    Success

        -7   Communications could not be established

        -6   PPSC was not setup


Below is the sample Applescript file included in the download below. There is an example of each of the three commands. Each example line is independent, they are not intended to be all uncommented and run together.

Download the Macintosh OSX (Intel) version of PPSC 1.1.0b.PPSC_files/PPSC_Mac%20OS%20X%20%28Cocoa%20Intel%29.zip
Home > Robert_Rau.html
Electronics >Electronics.html

Programmable Power Supply Controller

Visit my other pages:

Electronic Design ToolsElectronics.html
Rocketry ApplicationsRocketry.html
Green LivingEco.html
Thermal CalculatorThermal_Calculator.html
Engineering Links for softwareLinks.html
SchematicsSchematics.html

Here is a scope capture of the voltage profile file of my 2000 Ford Contour starting up. Using PPSC it can be played back over and over for testing.

My page about making this application AppleScriptable

XOJO Scripting

set StartSequenceZero to 0

tell application "PPSC"

activate


-- ONLY UNCOMMENT ONE  set testvar.....  line at a time. Each one does a different demo


-- uncomment to read a file in after program is launched and a power supply is selected and the serial port is selected.

set testvar to OpenSequenceFile "/Users/JohnDoe/Documents/myPowerProfile.txt"


-- uncomment to start a sequence file after program is launched and a power supply is selected and the serial port is selected.

--set testvar to StartSequence StartSequenceZero


-- uncomment to set a voltage after program is launched and a power supply is selected and the serial port is selected.

--set testvar to SetVoltage "2.5"

--display dialog (testvar)

end tell

Download the Windows version of PPSC 1.1.0b.PPSC_files/PPSC_W1-1-0b.zip

This was written in XOJO and I have a page where I describe how I made the application AppleScriptable here.