LTspice quad comparator

Discussion in 'General Electronics Chat' started by Anestis88, May 5, 2016.

  1. Anestis88

    Thread Starter New Member

    Aug 9, 2011
    19
    2
    Hello
    I want to use a model for LM2901 quad comparator. First I tried to use a general opamp2 and insert the subcircuit model but I got error about missing nodes. I assume that was because the model is for 4 comparators together. Then I tried to automatically generate the model (Right clik- 'Create Symbol') but the program shows an error regarding permission. I changed the restrictions at the C file for LTspice without any result.
    Is there a way to use a single comparator with the same performance of LM2901. For instance, can I modify the model to account for a single comparator? or what can somebody suggest.
    Thanks for any idea.

    * LM2901 VOLTAGE COMPARATOR "MACROMODEL" SUBCIRCUIT
    * CREATED USING PARTS VERSION 4.03 ON 03/14/90 AT 13:05
    * REV (N/A)
    * CONNECTIONS: NON-INVERTING INPUT
    * | INVERTING INPUT
    * | | POSITIVE POWER SUPPLY
    * | | | NEGATIVE POWER SUPPLY
    * | | | | OPEN COLLECTOR OUTPUT
    * | | | | |
    .SUBCKT LM2901 1 2 3 4 5
    *
    F1 9 3 V1 1
    IEE 3 7 DC 100.0E-6
    VI1 21 1 DC .75
    VI2 22 2 DC .75
    Q1 9 21 7 QIN
    Q2 8 22 7 QIN
    Q3 9 8 4 QMO
    Q4 8 8 4 QMI
    .MODEL QIN PNP(IS=800.0E-18 BF=2.000E3)
    .MODEL QMI NPN(IS=800.0E-18 BF=1002)
    .MODEL QMO NPN(IS=800.0E-18 BF=1000 CJC=1E-15 TR=807.4E-9)
    E1 10 4 9 4 1
    V1 10 11 DC 0
    Q5 5 11 4 QOC
    .MODEL QOC NPN(IS=800.0E-18 BF=3.378E3 CJC=1E-15 TF=930.2E-12 TR=543.8E-9)
    DP 4 3 DX
    RP 3 4 50.00E3
    .MODEL DX D(IS=800.0E-18)
    *
    .ENDS
     
  2. eetech00

    Active Member

    Jun 8, 2013
    650
    112
    HI

    Try this LM2901Test.asc and LM2901.txt file.
    I copied the subckt def from your post and placed it in a text file.
    Usually there is just one opamp definition in the subcircuit file. If you want four, just insert or copy the first instance three more times.
     
Loading...