How can I use half-wave rectified 120VAC to activate a PLC input?
The datasheet gives us a clue:



Figure 1. Note that the input current and impedance change with frequency.

Since both input current and impedance change with frequency it means that there's a reactive component to the input and that must be the first capacitor. It is doing most of the voltage drop and the parallel resistor is there to provide a discharge path.


\$ Z_{50} = \frac {V}{I} = \frac {100}{8.5m} = 11.7 \ \mathrm{k\Omega} \$.
\$ Z_{60} = \frac {V}{I} = \frac {100}{10m} = 10 \ \mathrm{k\Omega} \$.


These numbers are somewhat at odds with the input impedance figures but they're the right order of magnitude and the ratios are correct.

From \$ Z_C = \frac {1}{2 \pi fC} \$ we would expect that if the capacitor formed the bulk of the input impedance then the ratio of impedances to be \$ \frac {Z_{50}}{Z_{60}} = \frac {2 \pi 60C}{2 \pi 50C} = \frac {6}{5} = 1.2 \$. It actually works out at \$ \frac {11.7}{10} = 1.17 \$ which is close enough. We can ignore the other series resistor.

We can estimate the value as \$ C = \frac {1}{2 \pi fZ} = \frac {1}{2 \pi 60 \cdot 10k} = 0.83 \ \mathrm{\mu F} \$.







simulate this circuit &ndash; Schematic created using CircuitLab

Figure 2. Equivalent circuit.

Note that in Figure 2 you now have half of 120 V AC on the left of the capacitor so effectively you only have 60 V AC on the input. This isn't enough to reliably turn on the opto-isolator.







simulate this circuit

Figure 3. Addition of R1 to allow C1 to discharge

As others have noted in the comments, without R1 D3 charges the left side of C1 and it has no discharge path so the next positive going half-cycle can't pump more current in. Adding R1 discharges C1 when the voltage falls and allows it to accept more current on the next half-cycle.





Figure 4. The low-pass filter on the logic input.

Note that on the logic side of the opto-isolator there is a low-pass RC filter. This is what is keeping your input "on". I reckon that this is also just on the edge of working with the reduced input voltage caused by half-wave rectification. You might not see the LED blink but you may find that the program glitches intermittently if the logic-side input falls below the the threshold for one scan or more. 

You could be a long time debugging this if you weren't aware of the internals. It might be worth debouncing the input with a 200 ms off-delay timer in the program.



Possible work-arounds to increase reliability:

I've thought about this overnight and I don't think there is any "right" solution - but I often think that much of engineering is finding "the least worst" solution. 


The first thought when faced with increasing the output of a half-wave rectified signal is to add a smoothing capacitor on the output (as one would on a power-supply). This won't work in this case as we would then be feeding DC into the AC input and the capacitor would block it.








simulate this circuit

Figure 5. Using a 110 V DC relay to buffer the signal.


A second option would be to use a relay. A 110 V DC relay such as Finder 46.52.9.110.5000T presents a nice high resistance load to the sensor. With this example a 24 ms time constant would average out the voltage enough to give 110 V DC. A 470 nF adequately rated capacitor would do this.




Figure 6. Coil voltage with filter capacitor on 60 Hz supply (for your convenience).

I think this is the simplest reliable option. The time delay added by C1 is short and repeatable. There are no heat-generating components other than the relay coil and everything is readily available. Make sure the capacitor peak voltage is > 200 V DC.