Reading a photoresistor I have a wire with a 0-5v current. I want to detect if the current is there or not (HIGH/LOW.)

I'm using an optocoupler to avoid putting too much current into my micro, as it is only a 3.3V micro. I'm nervous about powering this on as one of my other micros stopped working although it's not clear if it could have been the circuit? 


I could not find my optocoupler in fritzing. This is it:
http://www.amazon.com/gp/product/B00CGXK1RG?psc=1&amp;redirect=true&amp;ref_=oh_aui_detailpage_o07_s00

This is my plan.



The microcontroller is a spark/particle core 3.3v. It the yellow wire connects to the analog pin A6. The screw terminals connect to the wire with the 5v current that I'm trying to detect.

I based my circuit on this:



But I don't know if it will do the same thing.
Wouldn't this be simpler?



Note: amended answer increases R1 to 10 k.

The 10 k resistor limits current to 0.17 mA. The 3.3 V zener diode clamps the input voltage to 3.3 V (I measured 2.3 V on mine so that is well within spec). The other end of the zener diode goes to the Arduino ground pin.

I originally had R1 as 1 k however if you had a high voltage input (like 20 V) it didn't quite clamp the pin to 3.3 V (more like 3.8 V). This is a bit high for an input pin, so I tried 10 k instead. 

This gives:


For an input voltage of 5 V -> 2.3 V on the Arduino input
For an input voltage of 10 V -> 2.6 V on the Arduino input
For an input voltage of 20 V -> 2.9 V on the Arduino input
For an input voltage of 30 V -> 3.1 V on the Arduino input


This is all within spec for the Arduino.

Now the question is, will 2.3 V on the input pin register as HIGH? The answer is "yes" because high is considered to be 0.6 * VCC. 

3.3 * 0.6 = 1.98


Thus any voltage of 1.98 or above is considered HIGH, and it will successfully read 2.3 V as high.