This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LM393: Pspice Hysteresis comparator DCbias simulation question

Part Number: LM393

Hi team,

Customer is simulate LM393 Hysteresis comparator circuit, and they find their result doesn't match with real circuit, please check the following data. I double checked, the simulation can't get the expected result, could you help check how should the do to get the correct result? Thanks.


  • Hello Will,

    I cannot open the DSN file - it just causes Capture to close.

    Can you "package" the design. This can be done under FILE->ARCHIVE PROJECT to create a ZIP file that includes the model and symbol (be sure to highlight the top project DSN file in the explorer window).

    In the meantime, have them review the log to see if there are any errors or warnings. Also try reversing the inputs, to make sure the correct pins are connected.

  • Hi Paul,

    Please find the attached zip file. I open it use PSpice for TI, it could work normal. Let me know if you get any further questions.

    There is only one warning during compile this project, however I didn't use the model from LM393 lib, I use the model from the PSpice Texas instruments lib, so I think this will not be an issue. 

    For the part pins connection, I verified to remove the R10, then the comparator output is correct to 12V. So I think the pin connection is correct.

  • Hello Will,

    I recieved your files and I am looking at them.

    Can you also send me your lm393.olb file, too?

  • Hi Will,

    It looks like the delay line used internally to provide the propagation delay does not work properly in a DC point simulation. Essentially, the DC operating  point tries to resolve the first time point, where the signal has not propagated through the delay line yet.

    If you run a transient simulation of greater than 1us, you will get the proper result.

    If you must be able to do a DC simulation, you can bypass the prop delay in the model with a slight modification to the LM393.LIB file.

    In the "Prop_Delay" subcircuit, comment out the delay line and replace it with a resistor.

    Comment out (*) the T_TPD line and add the R_BYPASS line

    .SUBCKT Prop_Delay VIN VOUT  
    * T_TPD         N03175 0 VOUT 0 Z0=50 TD=1.22u
    R_BYPASS N03175 VOUT 50
    R_RT         0 VOUT  50 TC=0,0
    R_RS         N03175 VIN  50 TC=0,0

    This can be done by opening the lm393.lib file in notepad, or, clicking on the .\lm393.lib in the Hierarchy, which opens the Model Editor.

    If you want to run a transient response with the proper delay, then star-out the resistor R_BYPASS line and remove the star from the T_TPD line.

  • Hi Paul,

    Get it, thanks for your detailed explanation, it works now.

  • Great!

    Please click the resolved link to close this out.