Solving Window Comparator Circuit: What Could Be Wrong?

  • Thread starter Thread starter EEStudent
  • Start date Start date
  • Tags Tags
    Comparator Window
Click For Summary

Discussion Overview

The discussion revolves around troubleshooting a window comparator circuit simulation error related to the LM311 subcircuit being undefined. Participants explore potential causes of the error, including library issues and component definitions, while also discussing the expected voltage thresholds in the simulation.

Discussion Character

  • Technical explanation
  • Homework-related
  • Debate/contested

Main Points Raised

  • One participant reports an error indicating that the LM311 subcircuit is undefined, prompting questions about library inclusion and circuit setup.
  • Another participant suggests that the issue may stem from the library not containing the LM311 component, asking whether the participant manually added it or sourced it from elsewhere.
  • A participant asserts that the LM311 is present in their library but is still encountering the undefined error.
  • Suggestions include deleting and reinserting the LM311 components in the schematic to resolve the issue.
  • One participant proposes trying a different comparator, the LM111, to see if the error persists, while noting that the output does not produce a square wave as expected.
  • Concerns are raised about the validity of the voltage threshold levels (vtl = 5V and vth = 7V) being reported in the simulation.

Areas of Agreement / Disagreement

Participants express uncertainty regarding the cause of the undefined error, with no consensus on a definitive solution. Multiple approaches are suggested, but the effectiveness of these approaches remains unresolved.

Contextual Notes

There may be limitations related to library file directory placements and the definitions of components within the simulation software that are not fully explored or resolved in the discussion.

EEStudent
Messages
8
Reaction score
0
http://img409.imageshack.us/img409/4825/sdfsbe9.jpg

i am getting this error when i simulated the above circuit
what could be wrong

**** CIRCUIT DESCRIPTION


******************************************************************************




** Creating circuit file "window-SCHEMATIC1-window.sim.cir"
** WARNING: THIS AUTOMATICALLY GENERATED FILE MAY BE OVERWRITTEN BY SUBSEQUENT SIMULATIONS

*Libraries:
* Local Libraries :
* From [PSPICE NETLIST] section of C:\Program Files\OrcadLite\PSpice\PSpice.ini file:
.lib "nom.lib"

*Analysis directives:
.DC LIN V_V1 1 10 1
.PROBE V(*) I(*) W(*) D(*) NOISE(*)
.INC ".\window-SCHEMATIC1.net"



**** INCLUDING window-SCHEMATIC1.net ****
* source WINDOW
V_V2 N01792 0 1V
R_R3 N01792 N01819 4.7k
V_V3 N04475 0 15V
R_R4 0 N01599 4.7k
V_V4 0 N04302 15V
R_R5 N04475 N04655 4.7k
R_R7 N01692 N01792 4.7k
X_U1 N01819 N01599 N04475 N04302 N04655 0 LM311
R_R8 N01904 N01536 4.7k
R_R9 N01904 0 4.7k
R_R6 N01692 N01645 4.7k
X_U2 N01692 N01904 N04475 N04302 N04655 0 LM311
V_V1 N01536 0 6V
R_R1 N01536 N01819 4.7k
V_Vin N01645 0 1V
R_R2 N01645 N01599 4.7k

**** RESUMING window-SCHEMATIC1-window.sim.cir ****
.END

ERROR -- Subcircuit LM311 used by X_U1 is undefined
ERROR -- Subcircuit LM311 used by X_U2 is undefined
 
Last edited by a moderator:
Physics news on Phys.org
Thread moved to Homework Help.

The error says that the LM311 subcircuit is not defined. Sounds like there is some issue with the library. Did you put the LM311 parts into the schematic yourself from your library, or did you get the circuit from someplace else, and you don't have the LM311 in your PC's installation of the simulator?
 
lm311 is in the library. under opamp. i don't know why it says undefined.

i am trying to get the vtl and vth.. in the simulation which is vtl = 5v
and vth = 7v..
 
Last edited:
Try deleting them and re-inserting them into the schematic.
 
i have tried deleting it and reinserting them several times it doesn't work.. same error
 
Can you try using a different comparator instead of the LM311? Do you get the same error? You might try PSPICE's support pages to see if it has some entries for that error. Could be a library file directory placement problem or something.
 
lm111 does give a output but i think it is wrong... since it does not give me a square wave..

and 5 volts vtl and 7 volts vth... i think its wrong