I am trying to use a Photocoupler 4N-25 with an arduino uno r3.
I connected the collector to +5volts and the emitter to ditital pin 0.
Now, since there is no voltage applied to the gate and I haven't even connected the other side of the photocoupler (diode) with anything. Shouldn't it have an indication of LOW in the serial monitor? Instead it fluctuates between 0's and 1's.
I also gave it a try with the gate grounded, nothing...
I tried with a resistor to limit the current to the arduino, nothing...
Any suggestions?
EDIT
By trying out the circuit of @Passerby the input pin was high. when i turned the gate High the pin went low. All is good so far.
what i want now is this depicted below.
when i replace the opto-isolator with a simple led (D1) it works. i tried it out.
The problem now is that the led in the opto-isolator is not bringing the gate high. why is this happening.
keep in mind that i only want to use this opto-isolator for this circuit.
and correction the capacitor is 150nF