Logic high/low

I'd wire it as in the train detector, but put a second inverter after the first. That would give you the high.

If you can move the load resistor to the collector of the photo-transistor, then you can do it with only one Schmitt inverter.
 
Probably not, because the transition from on/off off/on will be not be a clean logic transition, will be too slow, and because of the low-gain optointerupter, will float around near the trip-point being modulated by 120Hz incident light.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…