High Voltage Microprocessor Controlled Power Supply

To

Accompany the MCUTracer

 

By Jack Walton and Martin Hebel

Web Version: Modified March 2, 2004

 

Summary and Conclusion:

To get the most out of the MCUTracer an adjustable power supply capable of B+ and C- voltages of +400 and –50  is necessary.  The digitally controlled power supply described in Part II  uses off-the-shelf parts,  including high voltage MOSFETs as the “pass” element  for the B+ supply.   For the example shown here,  we used a Heathkit IP-17 High Voltage Regulated Power supply as the carcass – employing the chassis, meters and transformers, but discarding all of the control circuitry.  The design of the power supply is such that you can use it for the basis of upgrading the IP-17 without the microprocessor if you want. 

 

Co-author Martin Hebel wrote additional code which employs StampPlot, dedicated supervisory control and data acquisition software (SCADA) for the BASIC Stamp.  The new code for the Basic Stamp II allows you to control the microprocessor from your PC, specifying the range of plate and grid voltages and maximum current for the device under test.  An evaluation version of StampPlot can be downloaded from www.stampplot.com.

 

The Power Supply

The power supply consists of 3 modules, a digital to analog controller connected to the Basic Stamp in the MCUTracer via a 4 conductor ribbon cable, and separate B+ and C- modules.

 

The  high voltage B+ supply is a variant of that shown in The Art of Electronics[1] using instead a pair of beefy IRFPG40 HexFETS.  I kept the topology of the Heathkit supply and used a voltage doubler consisting of a pair of 1N4007 rectifiers, 330uF/450V electrolytic capacitors and 0.47R current limiting resistors.  Instead of a fixed reference as shown in the text, I used a 12-bit  0 to 4.1 volt signal from the LTC1446 DAC as an adjustable reference to the inverting input of the opamp.  This voltage to the gate of the first HexFET is biased with an adjustable reference using an LM317LZ linear voltage regulator, while this isn’t the quietest bias source it was easy to implement. The trimmer resistor can be used to set Q1’s gate threshold and will serve to set the “Zero Intercept” for the supply..  The B+ supply in the example shown below is not regulated. Because the signal to the first HexFET is biased with the LM317LZ and its associated circuitry, the output of the power supply increases monotonically with the input from the DAC. 

 

The C- supply is also a variant of The Art of Electronics  design using the International Rectifier IRFD9110 DIPFET. An Analog Devices AD825AR is used as the error amplifier, and a Linear Tech LT1014 is used to buffer the error and bias signals used to drive the gate of  the first HexFET.  I had expected to use one of the windings of the Heath power supply transformer to power the C- supply but this proved to be a little impractical without the use of a resistive divider to bring the voltage down .  Instead I borrowed the transformer from a wall wart, cracked the case and mounted it securely on perfboard and spacers on the rear of the IP17 cabinet.  I attached the secondary of this auxiliary transformer to one of the 6.3 volt windings on the IP17 filament transformer.  The primary of the transformer now became the secondary and delivers about 42 VAC to the C- supply rectifier.

 

The Controller board houses a voltage doubler circuit, 78L15 and 79L15 regulators for the operational amplifiers and a 78L05 regulator for the DAC.  An LT1013  amplifier is shown buffering the output from the LT1446 digital to analog converter, and inverting the voltage for the C- Supply.  The Linear Technology LT1446 has its own voltage reference which simplifies construction.  The controller board, B+ and C- supplies shown here use a mix of surface mount and through-hole devices, but through-hole parts could be employed just as well.

   

The schematics for B+, C- and Operational Amplifier/DAC supplies are  shown below. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Implementation:

As mentioned at the outset,  I chose to cannibalize a Heathkit IP-17 High Voltage Adjustable Power Supply as the carcass for this venture.  These supplies routinely show up on Ebay for $30 or so. (If you can’t find an IP-17, there are high voltage supplies made by Eico and Lambda, as well as earlier Heath supplies which could be pressed into service.)  The IP-17 has switchable meters for voltage and current, 5-way binding post connectors for B+, C- and 0.0-6.3-12.6 filament voltages.  Use of the IP-17 will save a lot of time and metal bending, search for transformers etc.  The IP-17 has a 12.0 x 3.7” saddle on which the original and new modular circuit boards rest.  The new boards fit right into this saddle.

 

It’s a simple matter to snip the connections, remove the saddle, drill out the rivets and install the new circuit boards.  Connections to the circuitry of the IP-17 are pretty much as they had been, except that the connections to the control potentiometers are removed along with the surplus wiring which went to the original IP-17 regulator board.      Since Heath did not include a connection from the chassis ground at the rear of the cabinet to the binding post on the front panel, I added it in my version.  In addition, the space once occupied by the 6L6GC regulator tubes has been “nibbled” out and replaced with a fan to cool the high voltage transistors. 

 

The LTC1446 DAC, its power supply and operational amplifiers are mounted on one PCB (this version uses surface mount components), and the B+ and C- supplies on separate PCBs.  Connections from the DAC to the Non-Inverting inputs of the Error Amplifiers and the error amplifier power supplies  are made via small ribbon cables fitted with 0.100” Molex connectors.  Connection between the microcontroller of the MCUTracer and the power supply is also made with a 4-conductor ribbon cable.  The controller, B+ and C- supplies, mount right onto the IP-17 saddle as shown in the picture below.  Note that in order to allow the filter capacitors (mounted on the bottom of the printed circuit board) to clear the bottom of the IP17 chassis I had to mount the B+ supply on  ½ inch insulated spacers.

 

Where the 6L6GC regulator tubes were in the original were located I mounted a 12 volt fan to cool the pass MOSFETs.  On the rear of the cabinet is a small power supply which borrows 6.3VAC, rectifies and filters the voltage for the fan.  I also replaced the neon bulbs (they weren’t functional) on the front of the cabinet with a red and green LED to indicate whether Plate or Grid voltages were being measured by the front panel meters.  These are powered from the fan supply.  Note that heat sinks are used on the B+ supply but these were omitted for clarity: 

 

 

 

Printed Circuit Boards:

The topside traces of the controller PCB are shown in green, the bottom side (jumpers) in red:

 

 

I make my printed circuit boards “topside up” with traces on the top and jumpers on the bottom.  Illustrated below is the top foil of the controller printed circuit board:

Graphical User Interface (GUI)

The most difficult part of the project was to provide an interface which would be easy to implement and effective in use.  In Part I of this article we used Parallax's StampDAQTM  interface between the Basic Stamp II and Microsoft Excel.  For Part II of the article Martin developed a macro which implements the GUI using StampPlot®, a more sophisticated program.  StampPlot and the Macro are freeware available on his his website, www.stampplot.com  To use StampPlot, Copy the Basic Stamp II code in the Appendix to your microprocessor, download StampPlot, install and run once.  Then download the HVSupply macro, save to your desktop, double-click to open and you’re good to go!

 

Several “Text Boxes” in which the user can input data are shown in the screenshot of the StampPlot HVSupply GUI  shown below:

 

 

 

 

 

The Plate and Grid text boxes supply data to the Basic Stamp for the two 12-bit words  used by the LTC1446 DAC to control the power supply.  The PVStep and GVStep text boxes tell the Basic Stamp how to increment the plotting of data.  Finally, I Max, highlighted in red, provides the  user with a threshold which, if reached, causes the program to stop operation and brings the Power Supply to “StandBy”, bringing all voltages to zero.

 

Testing the Power Supply:

Do not yet connect the B+ and C- power supplies to their regulator circuitry.   The first order of business it to test the DAC and Error Amplifier control circuitry to see that they are working correctly.  Enter 400 volts into the Maximum Plate Voltage and 50 Volts into the Maximum Grid voltage text boxes,  100 into the Plate Voltage STEP box and 10 for the Grid Voltage Step Box. Attach oscilloscope probes to each of the DAC outputs.  Power up the press the CONNECT check-box and Mouse-Click the Run button.  Examine the resulting waveforms, they should appear as the  ramps shown below:

 

 

The chart above illustrates that with the grid voltage initially set at zero, the plate voltage will be stepped from 0 to 400 volts (five steps including zero). The grid voltage is then reduced 10 volts and the plate voltage stepped again.

 

TESTING THE HIGH VOLTAGE CIRCUITS: In working with high voltage circuits it’s always a good idea to keep one hand in your pocket, or at least out of harm’s way.  This will prevent any inadvertent (and catastrophic!) application of current across your heart!  The heat sinks should be attached to the transistors using fiber shoulder washers and an insulation pad.

 

Make  the high voltage transformer connections to their respective regulatory circuits.  Set the trimmer potentiometers to their midpoint positions.  Put the midpoint supply voltages (200 Volts for the B+ supply and 25 Volts for the C- supply) into the respective boxes on StampPlot.  By typing a  “1” into each of the Grid and Plate  STEP boxes the Power Supply goes into a “Static Calibration Mode”, that is, the DAC will not ramp, but provide only one voltage to the amplifier on the power supply board.  Attach a digital voltmeter to the B+ and C- outputs on the power supply.  Switch on the power supply and examine the B+ and C- voltages, click on the CONNECT and RUN checkboxes and the voltage on the meters should approximate half of full scale.  You will undoubtedly have to adjust the trimmer potentiometers so that the range of voltages covered tracks linearly the output of the DAC on the controller board.   The potentiometer which attaches to the power supply output, the “Error Amplifier” potentiometer adjusts the slope of the power supply output.  The pot which is attached to the LM317 or LM337LZ bias supply adjusts the “Zero-Intercept”.  A scope is very handy in making these adjustments, but with a little patience they can be done by hand.

 

The output of the high voltage supply versus DAC input, after twiddling with the adjustment potentiometers is illustrated by the chart below:

 

 

Using the MCU Power Supply and MCUTracer:

With the MCUTracer and MCU Power Supply connected, input the correct plate and grid voltages for the proper range of B+ and C- voltages.  Enter the increment of voltage steps in the appropriate TEXT BOX. Enter the maximum plate current in the text box where indicated. 

 

To connect the HV Power Supply and MCUTracer to the PC, mouse-over and check the “Connect” check-box.  Next mouse-over the “Run” button and click once to begin graphing plate current (Y-Axis) versus Plate Voltage (X-Axis). To halt operation, mouse-over the STOP! Button and click. 

 

If the Maximum Plate Current value is exceeded during operation the MCUTracer will halt operation, and bring the plate and grid voltages to zero. If this situation occurs, you will have to make the appropriate adjustment in one or more of the parameters try again.  As an example, perhaps the Grid Voltage was too close to zero, in which case a different minimum value should be chosen.

 

You can use StampPlot to take a JPEG screenshot of the data.  You can also save the data and download it into a spreadsheet program for later analysis or reference.  More information on the operation of StampPlot can be found on the website www.stampplot.com .  


 


The Basic Stamp Program

Data from the text boxes for Plate and Grid voltages, increments and Plate current are read by the PC using the “!Read” function in StampPlot.  These values are transmitted to the Stamp using the “SERIN” command. 

 

The number of iterations and lines drawn are calculated from user-supplied inputs “PV Steps” for Plate Voltage steps and “GV Steps” for Grid Voltage Steps.  Every time a new Grid Voltage is calculated another line is plotted in a different color from the previous. 

 

The code, as written below, will first measure the Plate Voltage and Current for Device 1, and then plot a small circle on the Chart at this location.  When the plate voltage is incremented another circle is plotted and a line is drawn between the two points.  The Basic Stamp then sets the grid voltage back to its initial setting and performs the same routine for another device.  For the second device, however, only a circle is plotted.  If no second device is attached it will just plot a bunch of circles along the X-Axis.  You can remove the code lines for a second device if you want, snipping where necessary!  When the program has made one complete iteration for a particular grid voltage, the grid voltage is plotted just to the left of the

 

Changes and improvements in the code will be posted on the StampPlot website,  http://www.selmaware.com/stampplot/pubs_products/MCU_Tracer/home.htm

 

StampPlot Graphical User Interface Code:

Controller Code:

'StampPlot Graphical User Interface Code:

'Controller Code:

'{$STAMP BS2}

'{$PBASIC 2.5}

CLK       CON  0                        ' Clock Pin

CS1       CON  1                        ‘ Chip Select ADC LT1093

DPIN1     CON  2                      ' Data Pin ADC

MUX       CON  3                        ' MUX of ADC

CLK2      CON  5                      ' Clock DAC LTC1446

DPIN2     CON  6                       ' Chip Select for DAC

CS2       CON  7                        ' Data to DAC

DATUM     VAR   Word              ' Variable Holder for ADC and DAC

butRun    VAR   Bit                   ' Holds status of RUN Button

butStop   VAR   Bit                    ' Stop Button

PlateVMin VAR   Word              ' Plate voltage Minimum

PlateVMax VAR   Word             ' Plate Voltage Maximum

PlateVStep VAR   Byte              ' Plate Voltage Steps

PlateV    VAR    Word

GridVMax     VAR   Byte           ' Max Grid voltage from slider

GridVMin     VAR   Byte             ' Min Grid voltage from slider

GridVStep    VAR   Byte             ' Steps to increment Plate Voltage

GridV     VAR   Word

Amps      VAR   Word                ' Maximum plate current from text

ChkRun    VAR   Bit

V_X       VAR   Word                  ' temp X to plot

I_Y       VAR   Word                  ' temp Y to plot

LastX     VAR   Word                  ' Last X

LastY     VAR   Word                  ' Last Y

 

Color     VAR   Nib                     ' Color to plot with

 

Start:

PlateVMin  = 0

PlateVMax  = 0

PlateVStep = 0

GridVMax   = 0

GridVMin   = 0

GridVStep  = 0

GridV      = 0

Amps       = 0

 

DO

  DEBUG "!READ (ChkRun)",CR             ' Request run checkbox value

  SERIN 16,84,[DEC ButRun]                  ' Accept data

  PAUSE 100

  DEBUG "!STAT NOT RUNNING",CR

LOOP WHILE (ButRun=0)                      ' Wait UNTIL checked

 

PAUSE 100

 

DEBUG "!READ (txtPVMax)",CR            ' Request TextBox Max Plate voltage

SERIN 16,84,[DEC PlateVMax]               ' Accept data

PAUSE 100

 

DEBUG "!READ (txtPVMin)",CR             ' Request TextBox Min Plate voltage

SERIN 16,84,[DEC PlateVMin]                ' Accept data

PAUSE 100

 

DEBUG "!READ (txtPVStep)",CR            ' Request TextBox Plate voltage Increment

SERIN 16,84,[DEC PlateVStep]              ' Accept data

PAUSE 100

 

DEBUG "!READ (txtGVMin)",CR             ' Request Grid Voltage Minimum

SERIN 16,84,[DEC GridVMin]                 ' Accept data

PAUSE 100

 

DEBUG "!READ (txtGVMax)",CR            ' Request Maximum Grid voltage

SERIN 16,84,[DEC GridVMax]                ' Accept data

PAUSE 100

 

DEBUG "!READ (txtGVStep)",CR            ' Request Grid voltage Steps

SERIN 16,84,[DEC GridVStep]                ' Accept data

PAUSE 100

 

DEBUG "!READ (txtPlateMax)",CR         ' Request maximum Plate Current

SERIN 16,84,[DEC Amps]                      ' Accept data

PAUSE 100

 

AMPS      =  AMPS * 10                        ' Normalize Amps for 10  bit max ADC output

LastX = 0 : LastY = 0                             ' Clear last positions

                       

IF (PlateVStep = 1) OR (GridVStep=1) THEN    ' Entering a "1" causes the DAC to enter static mode

  GOSUB StaticRoutine

  ELSE

  GOTO Main

ENDIF

 

MAIN:

 DEBUG "!STAT RUNNING!",CR

COLOR = 1

FOR GridV = GridVMin TO GridVMax STEP GridVStep

  'V_X=PlateVMin

  GOSUB PlateStepper

NEXT

HIGH CS2

  LOW CS2

  SHIFTOUT DPIN2,CLK2,1,[0\24]

  HIGH CS2

DEBUG "!O butRun = 0",CR                   ' Clear the run button

DEBUG "!BELL",CR                               ' Sound the bell

DEBUG "!STAT DONE!",CR

DEBUG "!O chkRun=0",CR

GOTO Start                                           ' Start over

 

 

PlateStepper:

FOR PlateV = PlateVMin TO PlateVMax STEP PlateVStep

  HIGH CS1

  HIGH CS2

  LOW CS2

  PAUSE 10

  DATUM = GridV * 80                            ' Converts desired GV to BITS

  SHIFTOUT DPIN2,CLK2,1,[DATUM\12]   ' Send first 12 bits to DAC

 

  DATUM= PlateV*10

                                                            ' Multiply Plate Voltage * 10 for 12 bit DAC

  SHIFTOUT DPIN2,CLK2,1,[DATUM\12]   ' Send second 12 bits to DAC

 

  HIGH CS2                                           ' Load and enable DAC

                                                            ' Set MUX of ADC to Channel 0

  LOW CS1                                           ' Enable ADC

  PAUSE 10

  SHIFTOUT CLK,MUX,1,[99\7]                ' Sends ADC MUX Selection -- Channel 0, Unipolar, MSBF

  SHIFTIN CLK,DPIN1,2,[DATUM\10]       ' Read Actual Plate Voltage

  V_X = DATUM

 

  PAUSE 10

  SHIFTOUT CLK,MUX,1,[115\7]              ' Sends ADC MUX Selection -- Channel 2, Unipolar, MSBF

  SHIFTIN CLK,DPIN1,2,[DATUM\10]       ' Read Plate Current

  I_Y = DATUM * 250                              ' Normalizes Current for 4.1 Volt Reference

  V_X=PlateV

  PAUSE 10

 

  DEBUG "!fcir  ",                                   ' Plot a point at VoltPlat & IP

        DEC V_X, ",",

        DEC I_Y, ",.7A,",

        DEC Color,CR

  DEBUG "!LINE ",                                 ' Draw a line between last and current

        DEC V_X, ",",

        DEC I_Y, ",",

        DEC LastX, ",",

        DEC LastY, ",",

        DEC Color,CR

  LastX = V_X                                        ' Update last values

  LastY = I_Y

  HIGH CS1

'Read Second Set of Values

  LOW CS1                                           ' Enable ADC

  PAUSE 10

  SHIFTOUT CLK,MUX,1,[119\7]              ' Sends ADC MUX Selection -- Channel 1, Unipolar, MSBF

  SHIFTIN CLK,DPIN1,2,[DATUM\10]       ' Read Actual Plate Voltage

  V_X = DATUM

 

  PAUSE 10

  SHIFTOUT CLK,MUX,1,[103\7]              ' Sends ADC MUX Selection -- Channel 3, Unipolar, MSBF

  SHIFTIN CLK,DPIN1,2,[DATUM\10]       ' Read Plate Current

  I_Y = DATUM * 200

  PAUSE 10

 

  DEBUG "!fcir ",                                    ' Plot a DataPoint

        DEC V_X, ",",

        DEC I_Y, ",.9A,",                           ' Size of circle is ".9 Absolute"

        DEC Color,CR

 

   IF PlateV = PlateVMax THEN GOSUB GridText

 

  DEBUG "!READ ChkRun",CR            ' Reads the Run button and terminates if un-pressed

  SERIN 16,84,[DEC butRun]

  PAUSE 100

  IF butRun = 0 THEN Terminate

NEXT

 

   LastX = PlateVMin

   LastY =0

   Color = Color + 1                                ' Next color for next plot

RETURN

 

GRIDTEXT:

   PAUSE 10

   LOW CS1

   SHIFTOUT CLK,MUX,1,[105\7]             ' Sends ADC MUX Selection -- Channel 4, Bipolar, MSBF

   SHIFTIN CLK,DPIN1,2,[DATUM\10]     ' Read Actual Grid Voltage

   HIGH CS1

   IF DATUM.BIT9 = 1 THEN DATUM = ~DATUM + 1 

'Examine sign bit, if 1 value is negative

   DATUM=DATUM & 1023                     '  Mask off bit10 - bit15

   DATUM = DATUM/10                          '  Normalize output

   DEBUG "!TEXT ",                                '  Plot the actual value

   DEC V_X -10, ",",                                ' -10  to offset horizontal axis

   DEC I_Y -4, ",.7A,",                            ' -5 to offset vertical axisfont size

   DEC Color, ",",                                   ' set color

   "Grid V =",DEC DATUM,CR                 ' text to plot

RETURN

 

STATICROUTINE:                                  ' Used to Calibrate DAC or Hold Voltage Constant

                                                            ' No Data is sent to ADC

                                                            ' Routine is run until "STOP" box is checked

 

  PAUSE 100

  DEBUG "!STAT Static Calibration Routine",CR

  HIGH CS2

  LOW CS2

  PAUSE 10

  DATUM = GridVMax * 80                      ' Convert GridVMax to BITS

  SHIFTOUT DPIN2,CLK2,1,[DATUM\12]  ' Send first 12 bits to DAC

  DATUM = PlateVMax * 10                    ' Multiply Plate Voltage * 10 for 12 bit DAC

  SHIFTOUT DPIN2,CLK2,1,[DATUM\12]  ' Send second 12 bits to DAC

  HIGH CS2                                           ' Load and enable DAC

 

  DEBUG "!READ (ChkRun)",CR

  SERIN 16,84,[DEC ButRun]                  ' Accept data

  PAUSE 100

 

  IF ButRun=0 THEN

  GOTO Terminate

  ELSE

  GOTO StaticRoutine

  ENDIF

 

RETURN

 

FAULT:                                                 ' Used if Max Current Exceeded

  DEBUG "!STAT Maximum Current Exceeded!",CR

  HIGH CS2

  LOW CS2

  SHIFTOUT DPIN2,CLK2,1,[0\24]

  DEBUG "!O chkRun=0",CR

  HIGH CS2

  GOTO Start

 

 

TERMINATE:

  HIGH CS2

  LOW CS2

  SHIFTOUT DPIN2,CLK2,1,[0\24]

  HIGH CS2

  DEBUG "!STAT Running Terminated by Operator",CR

  DEBUG "!BELL",CR:DEBUG "!BELL",CR: DEBUG "!BELL",CR

  DEBUG "!O chkRun=0",CR

  PAUSE 4000

  GOTO Start

 



[1] Horowitz, Paul and Hill, Winfield “High Voltage Regulated Supply” The Art of Electronics , Cambridge University Press, Cambridge. Second Ed., 1989 page 369.