Can you supply AC voltage to a digital input pin?

jremington:
If you wish to detect whether the lamps are powered, the optocoupler (with input resistor) should be in parallel with the lamps, not in series.

opto.png

I hooked it as you described above parallel to the lights. I have the pins on the H11AA1 hooked up as follows:
1 & 2 - AC input
3 - Nothing
4 (E) - GND on the Arduino
5 (C) - Input pin 12 on the Arduino
6 - Nothing

I'm still getting nothing on the input pin whether there's current going through the lamps or not.

  1. Do I need to add a 10K pull-up resistor to pin 5 and connect it to 5V? I've seen other examples that do this (doesn't seem to make any difference though).
  2. Is there a way to determine if I'm getting any voltage passed through the chip, like maybe trying to measure voltage across pins 4 & 5?

Thanks again for your help I really appreciated your patience.