You did not wire up the voltage source correctly. The negative terminal of the voltage source should be connected to ground, not to OUT. Here is the circuit with the +5V node replaced by a voltage source V2, and closer to the layout of your circuits. <!-- Begin schematic: In order to preserve an editable schematic, please don't edit this section directly. Click the "edit" link below the image in the preview instead. --> ![schematic](https://i.sstatic.net/oTFQqViA.png) <!-- End schematic --> With the parameters for SW1 set at V_T = 2.5 and V_H = 1.5, the output looks like this: [![enter image description here][1]][1] In the edited version of the question, there is a circuit similar to this, but with the parameters for the switch set at Vt = 2.5 and Vh = -0.75. Try changing Vh to 1.5 as in the original circuit. [1]: https://i.sstatic.net/fzusQdF6.png