This is my Schmitt Trigger design, which trips at \$2.3V\$ and \$1.7V\$-
Here, $$+V_{cc} = 9V$$ $$R1 = 51k \Omega$$ $$R2 = 22k \Omega$$ $$R3 = 330k \Omega$$ \$V_{in}\$ is a square-wave with 0-7V peak to peak voltage. I'm expected to use a phototransistor along with a LED in order to provide variable voltage, with its base unconnected. This is to demonstrate the real life noise filtering of a Schmitt Trigger circuit using the phototransistor sensor. I don't know how to setup this circuit but I've tried in this way - I've built this circuit on my breadboard. But, \$V_{in}\$ doesn't seem to turn D1 (LED) on. The series resistor R4 is of \$2k \Omega \$. Considering the forward voltage of a LED to be around \$2.2-3V\$, and \$V_{in}\$ as a square wave with \$1k Hz\$ frequency and \$0-7\$ pk-pk voltage, the LED should've turned on. What am I possibly doing wrong here? I've tried to scour for online articles regarding Schmitt trigger with noise sensor inputs, but haven't found anything. Can someone help me with this sensor circuit?
NOTE: The LED is required to shine light on the phototransistor's surface in order to activate it, so that the variable voltage obtained at its emitter is proportional to the intensity of light incident on it.