LM7824 OrCAS PSpice model

Discussion in 'General Electronics Chat' started by djrama, Sep 2, 2011.

  1. djrama

    Thread Starter New Member

    Mar 30, 2009
    1
    0
    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.
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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:

    Code ( (Unknown Language)):
    1. .SUBCKT x_LM78XX Input Output Ground PARAMS:
    2. + Av_feedback=1665, R1_Value=1020
    3. *
    4. * SERIES 3-TERMINAL POSITIVE REGULATOR
    5. *
    6. * Note: This regulator is based on the LM78XX series of
    7. * regulators (also the LM140 and LM340). The model
    8. * will cause some current to flow to Node 0 which
    9. * is not part of the actual voltage regulator circuit.
    10. *
    11. * Band-gap voltage source:
    12. *
    13. * The source is off when Vin<3V and fully on when Vin>3.7V.
    14. * Line regulation and ripple rejection) are set with
    15. * Rreg= 0.5 * dVin/dVbg. The temperature dependence of this
    16. * circuit is a quadratic fit to the following points:
    17. *
    18. * T Vbg(T)/Vbg(nom)
    19. * --- ---------------
    20. * 0 .999
    21. * 37.5 1
    22. * 125 .990
    23. *
    24. * The temperature coefficient of Rbg is set to 2 * the band gap
    25. * temperature coefficient. Tnom is assumed to be 27 deg. C and
    26. * Vnom is 3.7V
    27. *
    28. Vbg 100 0 DC 7.4V
    29. Sbg (100,101),(Input,Ground) Sbg1
    30. Rbg 101 0 1 TC=1.612E-5,-2.255E-6
    31. Ebg (102,0),(Input,Ground) 1
    32. Rreg 102 101 7k
    33. .MODEL Sbg1 VSWITCH (Ron=1 Roff=1MEG Von=3.7 Voff=3)
    34. *
    35. * Feedback stage
    36. *
    37. * Diodes D1,D2 limit the excursion of the amplifier
    38. * outputs to being near the rails. Rfb, Cfb Set the
    39. * corner frequency for roll-off of ripple rejection.
    40.  
    41. *
    42. * The opamp gain is given by: Av = (Fores/Freg) * (Vout/Vbg)
    43. * where Fores = output impedance corner frequency
    44. * with Cl=0 (typical value about 1MHz)
    45. * Freg = corner frequency in ripple rejection
    46. * (typical value about 600 Hz)
    47. * Vout = regulator output voltage (5,12,15V)
    48. * Vbg = bandgap voltage (3.7V)
    49. *
    50. * Note: Av is constant for all output voltages, but the
    51. * feedback factor changes. If Av=2250, then the
    52. * Av*Feedback factor is as given below:
    53. *
    54. * Vout Av*Feedback factor
    55. * ---- ------------------
    56. * 5 1665
    57. * 12 694
    58. * 15 550
    59. *
    60. Rfb 9 8 1MEG
    61. Cfb 8 Ground 265PF
    62. Eopamp 105 0 VALUE={2250*v(101,0)+Av_feedback*v(Ground,8)}
    63. Vgainf 200 0 {Av_feedback}
    64. Rgainf 200 0 1
    65. *Eopamp 105 0 POLY(3),(101,0),(Ground,8),(200,0) 0 2250 0 0 0 0 0 0 1
    66. Ro 105 106 1k
    67. D1 106 108 Dlim
    68. D2 107 106 Dlim
    69. .MODEL Dlim D (Vj=0.7)
    70. Vl1 102 108 DC 1
    71. Vl2 107 0 DC 1
    72. *
    73. * Quiescent current modelling
    74. *
    75. * Quiescent current is set by Gq, which draws a current
    76. * proportional to the voltage drop across the regulator and
    77. * R1 (temperature coefficient .1%/deg C). R1 must change
    78. * with output voltage as follows: R1 = R1(5v) * Vout/5v.
    79. *
    80. Gq (Input,Ground),(Input,9) 2.0E-5
    81. R1 9 Ground {R1_Value} TC=0.001
    82. *
    83. * Output Stage
    84. *
    85. * Rout is used to set both the low frequency output impedence
    86. * and the load regulation.
    87. *
    88. Q1 Input 5 6 Npn1
    89. Q2 Input 6 7 Npn1 10
    90. .MODEL Npn1 NPN (Bf=50 Is=1E-14)
    91. * Efb Input 4 VALUE={v(Input,Ground)+v(0,106)}
    92. Efb Input 4 POLY(2),(Input,Ground),(0,106) 0 1 1
    93. Rb 4 5 1k TC=0.003
    94. Re 6 7 2k
    95. Rsc 7 9 0.275 TC=1.136E-3,-7.806E-6
    96. Rout 9 Output 0.008
    97. *
    98. * Current Limit
    99. *
    100. Rbcl 7 55 290
    101. Qcl 5 55 9 Npn1
    102. Rcldz 56 55 10k
    103. Dz1 56 Input Dz
    104. .MODEL Dz D (Is=0.05p Rs=3 Bv=7.11 Ibv=0.05u)
    105. .ENDS
    106. *$
    107.  
    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:
    Code ( (Unknown Language)):
    1. * 78xx.sub
    2. * ---------------- 78xx ----------------
    3. *
    4. .SUBCKT 78xx Input Output Ground
    5. X1 Right_Click__And_Select_a_model,7805_to_7824
    6. .ENDS
    7. *
    8. * ---------------- 7833 ----------------
    9. *
    10. .SUBCKT 7833 Input Output Ground
    11. .PARAM Av_feedback=2523
    12. .PARAM R1_Value=673
    13. .INC 78XX.INC
    14. .ENDS
    15. *
    16. * ---------------- 7847 ----------------
    17. *
    18. .SUBCKT 7847 Input Output Ground
    19. .PARAM Av_feedback=1772
    20. .PARAM R1_Value=959
    21. .INC 78XX.INC
    22. .ENDS
    23. *
    24. * ---------------- 7805 ----------------
    25. *
    26. .SUBCKT 7805 Input Output Ground
    27. .PARAM Av_feedback=1665
    28. .PARAM R1_Value=1020
    29. .INC 78XX.INC
    30. .ENDS
    31. *
    32. * ---------------- 7852 ----------------
    33. *
    34. .SUBCKT 7852 Input Output Ground
    35. .PARAM Av_feedback=1601
    36. .PARAM R1_Value=1061
    37. .INC 78XX.INC
    38. .ENDS
    39. *
    40. * ---------------- 7806 ----------------
    41. *
    42. .SUBCKT 7806 Input Output Ground
    43. .PARAM Av_feedback=1388
    44. .PARAM R1_Value=1224
    45. .INC 78XX.INC
    46. .ENDS
    47. *
    48. *
    49. * ---------------- 7808 ----------------
    50. *
    51. .SUBCKT 7808 Input Output Ground
    52. .PARAM Av_feedback=1041
    53. .PARAM R1_Value=1632
    54. .INC 78XX.INC
    55. .ENDS
    56. *
    57. * ---------------- 7809 ----------------
    58. *
    59. .SUBCKT 7809 Input Output Ground
    60. .PARAM Av_feedback=925
    61. .PARAM R1_Value=1836
    62. .INC 78XX.INC
    63. .ENDS
    64. *
    65. * ---------------- 7810 ----------------
    66. *
    67. .SUBCKT 7810 Input Output Ground
    68. .PARAM Av_feedback=833
    69. .PARAM R1_Value=2040
    70. .INC 78XX.INC
    71. .ENDS
    72. *
    73. * ---------------- 7812 ----------------
    74. *
    75. .SUBCKT 7812 Input Output Ground
    76. .PARAM Av_feedback=694
    77. .PARAM R1_Value=2448
    78. .INC 78XX.INC
    79. .ENDS
    80. *
    81. * ---------------- 7815 ----------------
    82. *
    83. .SUBCKT 7815 Input Output Ground
    84. .PARAM Av_feedback=555
    85. .PARAM R1_Value=3060
    86. .INC 78XX.INC
    87. .ENDS
    88. *
    89. * ---------------- 7818 ----------------
    90. *
    91. .SUBCKT 7818 Input Output Ground
    92. .PARAM Av_feedback=463
    93. .PARAM R1_Value=3672
    94. .INC 78XX.INC
    95. .ENDS
    96. *
    97. * ---------------- 7820 ----------------
    98. *
    99. .SUBCKT 7820 Input Output Ground
    100. .PARAM Av_feedback=416
    101. .PARAM R1_Value=4080
    102. .INC 78XX.INC
    103. .ENDS
    104. *
    105. * ---------------- 7824 ----------------
    106. *
    107. .SUBCKT 7824 Input Output Ground
    108. .PARAM Av_feedback=347
    109. .PARAM R1_Value=4896
    110. .INC 78XX.INC
    111. .ENDS
    112. *
    113.  
    And this saved as 78xx.inc:
    Code ( (Unknown Language)):
    1. * 78xx.inc
    2. ** ---------------- 78xx ----------------
    3. *
    4. *.SUBCKT x_LM78XX Input Output Ground
    5. *.PARAM Av_feedback=1665
    6. *.PARAM R1_Value=1020
    7. *
    8. * SERIES 3-TERMINAL POSITIVE REGULATOR
    9. *
    10. * Note: This regulator is based on the LM78XX series of
    11. * regulators (also the LM140 and LM340). The model
    12. * will cause some current to flow to Node 0 which
    13. * is not part of the actual voltage regulator circuit.
    14. *
    15. * Band-gap voltage source:
    16. *
    17. * The source is off when Vin<3V and fully on when Vin>3.7V.
    18. * Line regulation and ripple rejection) are set with
    19. * Rreg= 0.5 * dVin/dVbg. The temperature dependence of this
    20. * circuit is a quadratic fit to the following points:
    21. *
    22. * T Vbg(T)/Vbg(nom)
    23. * --- ---------------
    24. *   0  .999
    25. * 37.5   1
    26. * 125  .990
    27. *
    28. * The temperature coefficient of Rbg is set to 2 * the band gap
    29. * temperature coefficient. Tnom is assumed to be 27 deg. C and
    30. * Vnom is 3.7V
    31. *
    32. Vbg 100 Ground DC 7.4V
    33. Sbg (100,101),(Input,Ground) Sbg1
    34. Rbg 101 Ground 1 TC=1.612E-5,-2.255E-6
    35. Ebg (102,Ground),(Input,Ground) 1
    36. Rreg 102 101 7k
    37. .MODEL Sbg1 VSWITCH (Ron=1 Roff=1MEG Von=3.7 Voff=3)
    38. *
    39. * Feedback stage
    40. *
    41. * Diodes D1,D2 limit the excursion of the amplifier
    42. * outputs to being near the rails. Rfb, Cfb Set the
    43. * corner frequency for roll-off of ripple rejection.
    44.  
    45. *
    46. * The opamp gain is given by: Av = (Fores/Freg) * (Vout/Vbg)
    47. * where Fores = output impedance corner frequency
    48. * with Cl=0 (typical value about 1MHz)
    49. * Freg = corner frequency in ripple rejection
    50. * (typical value about 600 Hz)
    51. * Vout = regulator output voltage (5,12,15V)
    52. * Vbg = bandgap voltage (3.7V)
    53. *
    54. * Note: Av is constant for all output voltages, but the
    55. * feedback factor changes. If Av=2250, then the
    56. * Av*Feedback factor is as given below:
    57. *
    58. * Vout Av*Feedback factor
    59. * ---- ------------------
    60. *   5  1665
    61. *  12   694
    62. *  15   550
    63. *
    64. Rfb       9 8 1MEG
    65. Cfb       8 Ground 265PF
    66. Eopamp  105 Ground VALUE={2250*v(101,Ground)+Av_feedback*v(Ground,8)}
    67. Vgainf  200 Ground {Av_feedback}
    68. Rgainf  200 Ground 1
    69. *Eopamp 105 0 POLY(3),(101,0),(Ground,8),(200,0) 0 2250 0 0 0 0 0 0 1
    70. Ro  105 106 1k
    71. D1  106 108 Dlim
    72. D2  107 106 Dlim
    73. .MODEL Dlim D (Vj=0.7)
    74. Vl1 102 108 DC 1
    75. Vl2 107 Ground DC 1
    76. *
    77. * Quiescent current modelling
    78. *
    79. * Quiescent current is set by Gq, which draws a current
    80. * proportional to the voltage drop across the regulator and
    81. * R1 (temperature coefficient .1%/deg C). R1 must change
    82. * with output voltage as follows: R1 = R1(5v) * Vout/5v.
    83. *
    84. Gq (Input,Ground),(Input,9) 2.0E-5
    85. R1 9 Ground {R1_Value} TC=0.001
    86. *
    87. * Output Stage
    88. *
    89. * Rout is used to set both the low frequency output impedence
    90. * and the load regulation.
    91. *
    92. Q1 Input 5 6 Npn1
    93. Q2 Input 6 7 Npn1 10
    94. .MODEL Npn1 NPN (Bf=50 Is=1E-14)
    95. * Efb Input 4 VALUE={v(Input,Ground)+v(0,106)}
    96. Efb Input 4 POLY(2),(Input,Ground),(0,106) 0 1 1
    97. Rb   4 5 1k TC=0.003
    98. Re   6 7 2k
    99. Rsc  7 9 0.275 TC=1.136E-3,-7.806E-6
    100. Rout 9 Output 0.008
    101. *
    102. * Current Limit
    103. *
    104. Rbcl   7 55 290
    105. Qcl    5 55 9 Npn1
    106. Rcldz 56 55 10k
    107. Dz1   56 Input Dz
    108. .MODEL Dz D (Is=0.05p Rs=3 Bv=7.11 Ibv=0.05u)
    109. *.ENDS
    110. *$
    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!
     
    djrama likes this.
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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: Sep 3, 2011
    djrama likes this.
Loading...