I have an Arduino Due and i am using a CNY17 optocoupler to sense a 12v brake signal from a car. The 12v signal is going thru a 1K resistor to the opto on pin 1, pin 2 to the ground. 3.3v is going thru a 1K resistor to opto pin 5 and pin 4 to the ground. Pin 5 is connected to a digital input of the Arduino Due.
All is working good when the 12v is connected i get a 0 and when not connected a 1 on my digital port.
Now when i touch the wire going from the opto to the digital input is floating between 0 and 1. The voltage on the pin of the opto stays 3.3v but on the digital input voltage drops around 1.6 volts. the 1.6v would explain why it floats between 0 and 1. What i don't understand is why it would drop when i touch the wire could someout explain that to me?
simulate this circuit – Schematic created using CircuitLab