problem with PSpice

Discussion in 'The Projects Forum' started by KFUPMer, Dec 5, 2015.

  1. KFUPMer

    Thread Starter New Member

    Nov 4, 2015
    8
    0
    Hi guys,


    I have used FilterLab to design 4th order Lowpass Butterworth filters , and I got this circuit :

    upload_2015-12-5_20-30-49.png

    and I got this Spice model :
    Code (Text):
    1.  
    2. * SUBCIRCUIT FOR SINGLE SUPPLY LOWPASS FILTER
    3. * CREATED USING FILTERLAB ON 12/5/2015 AT 20:31:28
    4. * |------------------------------------------------------------|
    5. * |This model is being supplied as an aid to circuit designs.  |
    6. * |While it reflects reasonable close similarity to the actual |
    7. * |filter in terms of performance, it is not suggested as a    |
    8. * |replacement for breadboarding. Simulation should be used as |
    9. * |a forerunner or a supplement to traditional lab testing.    |
    10. * |Neither this model nor any part may be copied without the   |
    11. * |express written consent of Microchip Technology, Inc.       |
    12. * |------------------------------------------------------------|
    13. *
    14. * 4TH ORDER BUTTERWORTH FILTER
    15. * GAIN EQUALS 1
    16. * CONNECTIONS:        INPUT
    17. *             |    OUTPUT
    18. *             |    |    POSITIVE POWER SUPPLY
    19. *             |    |    |    NEGATIVE POWER SUPPLY
    20. *             |    |    |    |
    21. *             |    |    |    |
    22. *             1    2    3    4
    23. .SUBCKT FilterLab2     10   30   3    4
    24.  
    25.  
    26. *************** Stage 1 ***************
    27. R11    10    11    3570.000
    28. R12    11    12    8660.000
    29. C11    11    20    0.000000082
    30. C12    12    0    0.00000001
    31. X11    12    20    3    4    20    MCP6xxx
    32.  
    33. *************** Stage 2 ***************
    34. R21    20    21    12400.000
    35. R22    21    22    16900.000
    36. C21    21    30    0.000000012
    37. C22    22    0    0.00000001
    38. X21    22    30    3    4    30    MCP6xxx
    39.  
    40. .ENDS
    41.  
    42. *Microchip Op Amp models are located on the Microchip website (www.microchip.com).
    43. *See the User's Guide for general guidelines to selecting an Op Amp.
    44. .SUBCKT MCP6xxx 1 2 3 4 5
    45. *               | | | | |
    46. *               | | | | Output
    47. *               | | | Negative Power Supply
    48. *               | | Positive Power Supply
    49. *               | Inverting Input
    50. *               Non-inverting Input
    51. R1 1 0 1T
    52. R2 2 0 1T
    53. R3 3 0 1T
    54. R4 4 0 1T
    55. E5 5 0 POLY(1) 1 2   0 1T
    56. R5 5 0 1T
    57. .ENDS MCP6xxx
    58.  

    The problem here that when I want to use this model I got this error:
    ERROR -- Incorrect number of interface nodes for X1
    ERROR -- Incorrect number of interface nodes for X2



    here is my Spice :
    Code (Text):
    1. project
    2.  
    3. Vs 4 0 AC 1 sin(0 1 1k)
    4.  
    5. R1 3 4 3.57k
    6. R2 1 3 8.66k
    7. R3 2 7 12.4k
    8. R4 7 5 16.9k
    9.  
    10. C1 3 2 0.082u
    11. C2 1 0 0.01u
    12. C3 7 6 0.012u
    13. C4 5 0 0.01u
    14.  
    15. X1 1 2 2 FilterLab2
    16. X2 5 6 6 FilterLab2
    17.  
    18.  
    19. * SUBCIRCUIT FOR SINGLE SUPPLY LOWPASS FILTER
    20. * CREATED USING FILTERLAB ON 12/4/2015 AT 22:42:19
    21. * |------------------------------------------------------------|
    22. * |This model is being supplied as an aid to circuit designs.  |
    23. * |While it reflects reasonable close similarity to the actual |
    24. * |filter in terms of performance, it is not suggested as a    |
    25. * |replacement for breadboarding. Simulation should be used as |
    26. * |a forerunner or a supplement to traditional lab testing.    |
    27. * |Neither this model nor any part may be copied without the   |
    28. * |express written consent of Microchip Technology, Inc.       |
    29. * |------------------------------------------------------------|
    30. *
    31. * 4TH ORDER BUTTERWORTH FILTER
    32. * GAIN EQUALS 1
    33. * CONNECTIONS:        INPUT
    34. *             |    OUTPUT
    35. *             |    |    POSITIVE POWER SUPPLY
    36. *             |    |    |    NEGATIVE POWER SUPPLY
    37. *             |    |    |    |
    38. *             |    |    |    |
    39. *             1    2    3    4
    40. .SUBCKT FilterLab2     10   30   3    4
    41.  
    42.  
    43. *************** Stage 1 ***************
    44. R11    10    11    3570.000
    45. R12    11    12    8660.000
    46. C11    11    20    0.000000082
    47. C12    12    0    0.00000001
    48. X11    12    20    3    4    20    MCP6xxx
    49.  
    50. *************** Stage 2 ***************
    51. R21    20    21    12400.000
    52. R22    21    22    16900.000
    53. C21    21    30    0.000000012
    54. C22    22    0    0.00000001
    55. X21    22    30    3    4    30    MCP6xxx
    56.  
    57. .ENDS
    58.  
    59. *Microchip Op Amp models are located on the Microchip website (www.microchip.com).
    60. *See the User's Guide for general guidelines to selecting an Op Amp.
    61. .SUBCKT MCP6xxx 1 2 3 4 5
    62. *               | | | | |
    63. *               | | | | Output
    64. *               | | | Negative Power Supply
    65. *               | | Positive Power Supply
    66. *               | Inverting Input
    67. *               Non-inverting Input
    68. R1 1 0 1T
    69. R2 2 0 1T
    70. R3 3 0 1T
    71. R4 4 0 1T
    72. E5 5 0 POLY(1) 1 2   0 1T
    73. R5 5 0 1T
    74. .ENDS MCP6xxx
    75.  
    76.  
    77. .AC dec 100 10 40meg
    78. .TRAN 0.01m 2m
    79. .PROBE
    80. .END
     
  2. eetech00

    Active Member

    Jun 8, 2013
    648
    110
    X1 and X2 should each have 4 pins in the call to Filterlab2 subcircuit

    1. X1 1 2 2 FilterLab2 <---not enough pins
    2. X2 5 6 6 FilterLab2 <---not enough pins
    1. X1 1 2 2 (pin4) FilterLab2
    2. X2 5 6 6 (pin4) FilterLab2
     
  3. KFUPMer

    Thread Starter New Member

    Nov 4, 2015
    8
    0

    Thanx u r the best :)
     
Loading...