LM7824 OrCAS PSpice model

Thread Starter

djrama

Joined Mar 30, 2009
1
Hello!!

My version of OrCAD (16.0) doesn't have a pspice model for the 7824 regulator... I was searching in google for information but I haven't found anything useful.

Maybe modifying 7815 model (which I already have) or something, but I don't know how to do this.

Any help would be appreciated!

Thanks.
Daniel.
 

SgtWookie

Joined Jul 17, 2007
22,210
I don't have Orcad installed; I use LTSpice.
However, this might be helpful to you. A good while ago, I ran across this thread:
http://www.electronicspoint.com/spice-models-lm78xx-series-t25243.html
which had this SPICE netlist for the 78xx series:

Rich (BB code):
.SUBCKT x_LM78XX Input Output Ground PARAMS:
+ Av_feedback=1665, R1_Value=1020
*
* SERIES 3-TERMINAL POSITIVE REGULATOR
*
* Note: This regulator is based on the LM78XX series of
* regulators (also the LM140 and LM340). The model
* will cause some current to flow to Node 0 which
* is not part of the actual voltage regulator circuit.
*
* Band-gap voltage source:
*
* The source is off when Vin<3V and fully on when Vin>3.7V.
* Line regulation and ripple rejection) are set with
* Rreg= 0.5 * dVin/dVbg. The temperature dependence of this
* circuit is a quadratic fit to the following points:
*
* T Vbg(T)/Vbg(nom)
* --- ---------------
* 0 .999
* 37.5 1
* 125 .990
*
* The temperature coefficient of Rbg is set to 2 * the band gap
* temperature coefficient. Tnom is assumed to be 27 deg. C and
* Vnom is 3.7V
*
Vbg 100 0 DC 7.4V
Sbg (100,101),(Input,Ground) Sbg1
Rbg 101 0 1 TC=1.612E-5,-2.255E-6
Ebg (102,0),(Input,Ground) 1
Rreg 102 101 7k
.MODEL Sbg1 VSWITCH (Ron=1 Roff=1MEG Von=3.7 Voff=3)
*
* Feedback stage
*
* Diodes D1,D2 limit the excursion of the amplifier
* outputs to being near the rails. Rfb, Cfb Set the
* corner frequency for roll-off of ripple rejection.

*
* The opamp gain is given by: Av = (Fores/Freg) * (Vout/Vbg)
* where Fores = output impedance corner frequency
* with Cl=0 (typical value about 1MHz)
* Freg = corner frequency in ripple rejection
* (typical value about 600 Hz)
* Vout = regulator output voltage (5,12,15V)
* Vbg = bandgap voltage (3.7V)
*
* Note: Av is constant for all output voltages, but the
* feedback factor changes. If Av=2250, then the
* Av*Feedback factor is as given below:
*
* Vout Av*Feedback factor
* ---- ------------------
* 5 1665
* 12 694
* 15 550
*
Rfb 9 8 1MEG
Cfb 8 Ground 265PF
Eopamp 105 0 VALUE={2250*v(101,0)+Av_feedback*v(Ground,8)}
Vgainf 200 0 {Av_feedback}
Rgainf 200 0 1
*Eopamp 105 0 POLY(3),(101,0),(Ground,8),(200,0) 0 2250 0 0 0 0 0 0 1
Ro 105 106 1k
D1 106 108 Dlim
D2 107 106 Dlim
.MODEL Dlim D (Vj=0.7)
Vl1 102 108 DC 1
Vl2 107 0 DC 1
*
* Quiescent current modelling
*
* Quiescent current is set by Gq, which draws a current
* proportional to the voltage drop across the regulator and
* R1 (temperature coefficient .1%/deg C). R1 must change
* with output voltage as follows: R1 = R1(5v) * Vout/5v.
*
Gq (Input,Ground),(Input,9) 2.0E-5
R1 9 Ground {R1_Value} TC=0.001
*
* Output Stage
*
* Rout is used to set both the low frequency output impedence
* and the load regulation.
*
Q1 Input 5 6 Npn1
Q2 Input 6 7 Npn1 10
.MODEL Npn1 NPN (Bf=50 Is=1E-14)
* Efb Input 4 VALUE={v(Input,Ground)+v(0,106)}
Efb Input 4 POLY(2),(Input,Ground),(0,106) 0 1 1
Rb 4 5 1k TC=0.003
Re 6 7 2k
Rsc 7 9 0.275 TC=1.136E-3,-7.806E-6
Rout 9 Output 0.008
*
* Current Limit
*
Rbcl 7 55 290
Qcl 5 55 9 Npn1
Rcldz 56 55 10k
Dz1 56 Input Dz
.MODEL Dz D (Is=0.05p Rs=3 Bv=7.11 Ibv=0.05u)
.ENDS
*$
Since I'm using LTSpice, a few of the things didn't work quite right, so I had to make some minor changes, below. I still have a glitch if the output current tries to exceed 1.5A; the simulation can hang. Making certain that you have some resistance on your voltage source will help prevent it from hanging up. Other than that, you're getting it as-is.

This collection of subcircuits should be saved as 78xx.sub:
Rich (BB code):
* 78xx.sub
* ---------------- 78xx ----------------
*
.SUBCKT 78xx Input Output Ground
X1 Right_Click__And_Select_a_model,7805_to_7824
.ENDS
*
* ---------------- 7833 ----------------
*
.SUBCKT 7833 Input Output Ground
.PARAM Av_feedback=2523
.PARAM R1_Value=673
.INC 78XX.INC
.ENDS
*
* ---------------- 7847 ----------------
*
.SUBCKT 7847 Input Output Ground
.PARAM Av_feedback=1772
.PARAM R1_Value=959
.INC 78XX.INC
.ENDS
*
* ---------------- 7805 ----------------
*
.SUBCKT 7805 Input Output Ground
.PARAM Av_feedback=1665
.PARAM R1_Value=1020
.INC 78XX.INC
.ENDS
*
* ---------------- 7852 ----------------
*
.SUBCKT 7852 Input Output Ground
.PARAM Av_feedback=1601
.PARAM R1_Value=1061
.INC 78XX.INC
.ENDS
*
* ---------------- 7806 ----------------
*
.SUBCKT 7806 Input Output Ground
.PARAM Av_feedback=1388
.PARAM R1_Value=1224
.INC 78XX.INC
.ENDS
*
*
* ---------------- 7808 ----------------
*
.SUBCKT 7808 Input Output Ground
.PARAM Av_feedback=1041
.PARAM R1_Value=1632
.INC 78XX.INC
.ENDS
*
* ---------------- 7809 ----------------
*
.SUBCKT 7809 Input Output Ground
.PARAM Av_feedback=925
.PARAM R1_Value=1836
.INC 78XX.INC
.ENDS
*
* ---------------- 7810 ----------------
*
.SUBCKT 7810 Input Output Ground
.PARAM Av_feedback=833
.PARAM R1_Value=2040
.INC 78XX.INC
.ENDS
*
* ---------------- 7812 ----------------
*
.SUBCKT 7812 Input Output Ground
.PARAM Av_feedback=694
.PARAM R1_Value=2448
.INC 78XX.INC
.ENDS
*
* ---------------- 7815 ----------------
*
.SUBCKT 7815 Input Output Ground
.PARAM Av_feedback=555
.PARAM R1_Value=3060
.INC 78XX.INC
.ENDS
*
* ---------------- 7818 ----------------
*
.SUBCKT 7818 Input Output Ground
.PARAM Av_feedback=463
.PARAM R1_Value=3672
.INC 78XX.INC
.ENDS
*
* ---------------- 7820 ----------------
*
.SUBCKT 7820 Input Output Ground
.PARAM Av_feedback=416
.PARAM R1_Value=4080
.INC 78XX.INC
.ENDS
*
* ---------------- 7824 ----------------
*
.SUBCKT 7824 Input Output Ground
.PARAM Av_feedback=347
.PARAM R1_Value=4896
.INC 78XX.INC
.ENDS
*
And this saved as 78xx.inc:
Rich (BB code):
* 78xx.inc
** ---------------- 78xx ----------------
*
*.SUBCKT x_LM78XX Input Output Ground
*.PARAM Av_feedback=1665
*.PARAM R1_Value=1020
*
* SERIES 3-TERMINAL POSITIVE REGULATOR
*
* Note: This regulator is based on the LM78XX series of
* regulators (also the LM140 and LM340). The model
* will cause some current to flow to Node 0 which
* is not part of the actual voltage regulator circuit.
*
* Band-gap voltage source:
*
* The source is off when Vin<3V and fully on when Vin>3.7V.
* Line regulation and ripple rejection) are set with
* Rreg= 0.5 * dVin/dVbg. The temperature dependence of this
* circuit is a quadratic fit to the following points:
*
* T Vbg(T)/Vbg(nom)
* --- ---------------
*   0  .999
* 37.5   1
* 125  .990
*
* The temperature coefficient of Rbg is set to 2 * the band gap
* temperature coefficient. Tnom is assumed to be 27 deg. C and
* Vnom is 3.7V
*
Vbg 100 Ground DC 7.4V
Sbg (100,101),(Input,Ground) Sbg1
Rbg 101 Ground 1 TC=1.612E-5,-2.255E-6
Ebg (102,Ground),(Input,Ground) 1
Rreg 102 101 7k
.MODEL Sbg1 VSWITCH (Ron=1 Roff=1MEG Von=3.7 Voff=3)
*
* Feedback stage
*
* Diodes D1,D2 limit the excursion of the amplifier
* outputs to being near the rails. Rfb, Cfb Set the
* corner frequency for roll-off of ripple rejection.

*
* The opamp gain is given by: Av = (Fores/Freg) * (Vout/Vbg)
* where Fores = output impedance corner frequency
* with Cl=0 (typical value about 1MHz)
* Freg = corner frequency in ripple rejection
* (typical value about 600 Hz)
* Vout = regulator output voltage (5,12,15V)
* Vbg = bandgap voltage (3.7V)
*
* Note: Av is constant for all output voltages, but the
* feedback factor changes. If Av=2250, then the
* Av*Feedback factor is as given below:
*
* Vout Av*Feedback factor
* ---- ------------------
*   5  1665
*  12   694
*  15   550
*
Rfb       9 8 1MEG
Cfb       8 Ground 265PF
Eopamp  105 Ground VALUE={2250*v(101,Ground)+Av_feedback*v(Ground,8)}
Vgainf  200 Ground {Av_feedback}
Rgainf  200 Ground 1
*Eopamp 105 0 POLY(3),(101,0),(Ground,8),(200,0) 0 2250 0 0 0 0 0 0 1
Ro  105 106 1k
D1  106 108 Dlim
D2  107 106 Dlim
.MODEL Dlim D (Vj=0.7)
Vl1 102 108 DC 1
Vl2 107 Ground DC 1
*
* Quiescent current modelling
*
* Quiescent current is set by Gq, which draws a current
* proportional to the voltage drop across the regulator and
* R1 (temperature coefficient .1%/deg C). R1 must change
* with output voltage as follows: R1 = R1(5v) * Vout/5v.
*
Gq (Input,Ground),(Input,9) 2.0E-5
R1 9 Ground {R1_Value} TC=0.001
*
* Output Stage
*
* Rout is used to set both the low frequency output impedence
* and the load regulation.
*
Q1 Input 5 6 Npn1
Q2 Input 6 7 Npn1 10
.MODEL Npn1 NPN (Bf=50 Is=1E-14)
* Efb Input 4 VALUE={v(Input,Ground)+v(0,106)}
Efb Input 4 POLY(2),(Input,Ground),(0,106) 0 1 1
Rb   4 5 1k TC=0.003
Re   6 7 2k
Rsc  7 9 0.275 TC=1.136E-3,-7.806E-6
Rout 9 Output 0.008
*
* Current Limit
*
Rbcl   7 55 290
Qcl    5 55 9 Npn1
Rcldz 56 55 10k
Dz1   56 Input Dz
.MODEL Dz D (Is=0.05p Rs=3 Bv=7.11 Ibv=0.05u)
*.ENDS
*$
I didn't know a more convenient way of passing parameters in LTSpice while using the same symbol other than calling a .subckt and then .INCluding the main netlist. I did this because in LTSpice, you can simply define a single symbol for a .sub library, and then select from the .subckt names within the subckt library via a scrolling list.

As far as implementing it with Orcad, have fun!
 

SgtWookie

Joined Jul 17, 2007
22,210
A much more simple approach is to add resistance between the 7815 GND pin and ground. The GND pin current is usually somewhere in the 5mA to 5.6mA range, 5.3mA being typical. So, 24-15=9v needed, 9v/5.3mA = 1698 Ohms. 1.7k would be just about right, but that's not a standard value of resistance. However, you could use a 1.5k and 200 Ohm or a 1.6k and a 100 Ohm resistor in series to get 1.7k. You could also use 1.8k and 30k in parallel to get 1698 Ohms.

Taking that a bit further, you can start off with just a 7805 regulator, and for every ~94.5 Ohms of resistance between the GND pin and ground, you'll get ~0.5v more added on to the output.
 
Last edited:
Top