I get really wide sensing with an AC opto-coupler and a 4.7k resistor. It triggers on less than 1.5 volts, and of course is good up into probably at least 20 volts. The actual limit is simply the power dissipation of the SMT resistor, the opto would be good for way more power than it's handling at 20 volts. The AC opto also eliminates any need for a protection diode.
Consolidated Leo posted:It's only a matter of time before this forum recognizes that Arduino is not a spelling error.
I don't get a spelling error with Arduino, I added it to my Firefox dictionary. It's not the forum that thinks it's a misspelled word.