How do I detect a voltage over 100 VAC?
This is actually a common problem with irrigation systems.  The very long span cables and 3-phase voltage running down them tends to induce a lot of voltage in the 120VAC signal lines (feedback lines from the irrigation system) because they are relatively high impedance.  The large irrigation system manufacturer I worked with actually has this as part of their product verification and validation test spec.

I had this issue come up when redesigning a circuit for an irrigation system myself.  The old design actually used 120VAC coil relays to do the detection (the coils are lower impedance than most optocoupler input solutions such as your 100k), but those tend to be quite large, and when you need several of them on a board for just simple state detection high/low feedback it's board space and cost overkill.

I basically came up with three possible options at the time.


Leave the ridiculously oversized 120VAC coil relays and add sustained overvoltage protection to the front end (the main reason for redesigning that particular circuit).
Switch to a simple optocoupler based solution like yours and terminate the end of the cable with a lower resistance value.  Simple, but might be problematic for power resistor selection (space constraints/heat) when trying to use lower resistance values on a 120VAC line.
Make it slightly more complicated by adding additional front end components to the optocoupler.  This is what I ultimately did because it was smaller/cheaper and able to be tuned to a specific voltage (I think we picked 70VAC or so if I recall).


Here was the basic idea as I remember it.







simulate this circuit &ndash; Schematic created using CircuitLab

I don't recall the exact values, but setting the division across R3 and the zener voltage of D1 to match controls the actual turn on voltage you want to set.  D2 is just a regular diode so that a unidirectional optocoupler could be used (cheaper), and I do remember using a particularly sensitive one to keep the current draw and therefore heat in the front end resistors down.  All that can be adjusted to fit your situation.

Also, and I only mention this to try to be thorough, but  I vaguely (this was years ago) recall having to add another resistor in parallel with the optocoupler diode D3 to deal with leakage current that could accidentally turn the optocoupler on early (as I said, a particularly sensitive one was used), but that may not be an issue in your particular case so I left it off to avoid confusion.  The front end resistors also had to be physically large (I recall either 2512 or 2010) for creepage/clearance specs.

You can also use capacitors to do the voltage division up front and avoid the resistor losses, but of course then it's frequency dependent, and linear (not pivot) irrigation systems run on what I just call "sloppy" generator power that has a pretty irritatingly wide frequency range around 60Hz (by the same irrigation company's test spec).

I really hope this basic idea helps you out anyway.