Most essential informations haven't yet been revealed, like
- guaranteed logic low and high levels of the "sensor" output
- available supply voltage for the level converter/LED driver
- is there any substantial reason to use a schmitt trigger besides your problems to figure out a simple level converter circuit
ok,
1.
Well, this sensor has not very well defined levels.
The output of SENSOR, consists in a LM258 with a limiting resistor in series of 250ohm
([SENSING ELEMENT] -> [LM258] -> [RES. 250ohm] -> OUTPUT)
Sensor was not made by me. Thus I can't change it
For 12V supply the levels are 10V = HIGH (0~1V) = LOW
2.
Level converter/LED driver has up to 12V available on my circuit.
3.
I need an hysteresis into that input circuitry.
I need to ignore any level up to 1V.
Right now the input is going directly to the base of BJT.
I did one simulation here:
In this example the tolerance is set to 2V.
Green LINE = input (from sensor)
Red LINE = output to LED driver
- - - Updated - - -
First of all, you need to use a comparator, not opamp for this. Then the trigger level needs to be defined, since you say the idle Level is around 1V you need at least to set the trigger Level above that. Last and not least is the power supply requirement for the comparator IC. Comparators are normally open collector and this should work together with the optocoupler LED, but to use this you need to make the Schmitt trigger inverting.
I was going to use a comparator, but then I found on internet some schematics referring to op-amp as a basis for the schmitt trigger. I've simulated on LTSPICE and seems to work.
What comparator IC would you suggest to drive the LED from opto-coupler directly (if possible) ?
It would need to supply at least 10mA for that LED requirement.
Thanks.