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&redirect=true&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.