Zener Diode Voltage Regulator

Developer(s): Dick Wagner
Date: 1993
Type: Program
Platform(s): TS 2068
Tags: Science

Designs a simple zener diode voltage regulator. Enter the minimum and maximum DC input voltage, the minimum and maximum load current in milliamps and the zener voltage; it gives the series resistance in ohms, the minimum zener diode rating in watts with the load and with no load, and the minimum wattage of the resistor, then offers another calculation (Y or N).

Lines 5 to 440 draw the circuit (DC input, resistor R, zener diode to ground, regulated output). Corrected: as printed the program went straight on to the calculation, whose first line clears the screen, so the diagram showed only for a moment; a new line 450 PAUSE 0 now keeps it until a key is pressed. The resistor wattage in line 1205 is (V2-VZ)*I2 as printed. Dick Wagner converted the calculation from the book Circuit Design Programs For The TRS-80 (REM 1000; the book’s author is not printed) and drew the diagram part himself.

Published in The Plotter September 1993 (Zener Voltage Regulation).

Image Gallery

Source Code

   5 PRINT AT 6,0;"ZENER DIODE VOLTAGE REGULATOR"
  10 PLOT 44,80: DRAW 30,0
  13 REM DRAW RESISTOR
  15 LET x=2
  20 LET y=8
  40 DRAW x/2,y/2
  50 DRAW x,-y
  60 DRAW x,y
  70 DRAW x,-y
  80 DRAW x,y
  90 DRAW x,-y
 100 DRAW x,y
 110 DRAW x/2,-y/2
 120 DRAW 54,0
 130 DRAW 0,-20
 135 REM DRAW ZENER DIODE
 140 DRAW -5,0
 150 DRAW -3,3
 155 REM plot is 142,60 for zener
 160 PLOT 142,60
 170 DRAW 5,0
 180 DRAW 3,-3
 190 PLOT 142,60
 200 DRAW -3,-3
 210 DRAW 6,0
 220 DRAW -3,3
 230 PLOT 142,60-4
 240 DRAW 0,-20
 245 REM DRAW GROUND SYMBOL
 250 PLOT 142-6,36
 260 DRAW 12,0
 270 PLOT 142-4,34
 280 DRAW 8,0
 290 PLOT 142-2,32
 300 DRAW 4,0
 310 PLOT 142,30
 320 PLOT 142,80
 330 DRAW 50,0
 340 PLOT 192,80
 350 CIRCLE 194,80,2
 360 CIRCLE 42,80,2
 370 CIRCLE 141,80,1
 380 CIRCLE 142,80,1
 400 PRINT AT 11,1;"+DC"
 405 PRINT AT 12,0;"INPUT"
 410 PRINT AT 10,10;"R"
 420 PRINT AT 15,11;"ZENER"
 425 PRINT AT 16,11;"DIODE"
 430 PRINT AT 11,25;"+REG."
 440 PRINT AT 12,25;"OUTPUT"
 450 PAUSE 0
1000 REM program converted from Circuit Design Programs For The TRS-80
1010 REM by Dick Wagner 8/93
1020 REM for the 2068 computer
1050 CLS : PRINT "ZENER DIODE VOLTAGE REGULATOR   DESIGN"
1060 PRINT : PRINT "MINIMUM DC INPUT VOLTAGE ";: INPUT V1: PRINT V1
1070 PRINT "MAXIMUM DC INPUT VOLTAGE ";: INPUT V2: PRINT V2
1080 PRINT "MINIMUM LOAD CURRENT (IN MA) ";: INPUT I1: PRINT I1
1090 PRINT "MAXIMUM LOAD CURRENT (IN MA) ";: INPUT I2: PRINT I2
1095 REM convert MA to decimal
1100 LET I1=I1*1E-3: LET I2=I2*1E-3
1110 PRINT "ZENER DIODE VOLTAGE ";: INPUT VZ: PRINT VZ
1120 LET R=(V1-VZ)/(1.1*I2)
1130 LET P=VZ*(((V2-VZ)/R)-I1)
1135 REM integer values of R and P
1140 LET R=INT (R*10+.5)/10: LET P=INT (P*100+.5)/100
1150 PRINT : PRINT "THEN:"
1160 PRINT : PRINT "REQUIRED SERIES RESISTANCE =";R;"OHMS"
1170 PRINT "MINIMUM ZENER DIODE RATING =";P;"WATTS"
1190 LET Z=VZ*((V2-VZ)/R): LET Z=INT (Z*100+.5)/100
1200 PRINT "MINIMUM ZENER DIODE RATING WITH NO LOAD =";Z;"WATTS"
1205 PRINT "MINIMUM WATTS RATING OF R ";: PRINT (V2-VZ)*I2
1210 PRINT "ANOTHER CALCULATION? (Y OR N)";: INPUT A$: IF A$="Y" THEN GO TO 1050: IF A$="N" THEN STOP

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.