What is the best way to get
220V AC present/absent to TTL logic representation ?
(open collector, 10-15 mA)
I experimented with cny17-3 and I conclude it takes too much
input current (more then 6 mA) to saturate it's output transistor.
Too much input current means more power for resistors and
bigger cap.
I think I will use something like this.
SFH628A would have been better choice.
If a signal passes slow enough trough the middle
TTL logic will oscillate because it will amplifie the noise;
so schmitt trigger might have to be used.