Hi guys,
I could use some advice on how to use this 4N35 optocoupler properly. I will describe what I am trying to do, and will attach an image of the circuit.
I have an external switch that is hooked up to +10v dc. My goal is to detect when the switch closes from the +10v line. I am using a parallax propeller micro-controller that has 3.3 volt I/O pins. The threshold for logic 0 or logic 1 is 1.65 volts. I have the input pin tied down to ground via a pull down resistor. When the switch closes, this activates the transistor in the optocoupler allowing the 3.3 volts to flow through; giving me 3.3 volts (about) to the I/O pin, thus giving me a logic 1.
My problem is that when the switch closes, I am only getting about 1.4 volts to the input pin (this then creeps up slowly to about 1.7 volts). So after about 1 second, I get a logic 1, but barely. I was expecting something more closer to 3.3v. Also, when I take a voltage reading at pin 1 of the 4N35 optocoupler, I get about 1 volt there (which I thought was enough volts to activate the transistor inside the 4N35?). I noticed that if I change the resistance of R3 to a lower ohms value, giving me more voltage at pin 1 of the 4N35, that the 10v line starts to get compromised and starts dropping. I was trying to pull as little voltage off the 10v line as possible.
How do you guys think I should handle this? Any help is appreciated, thanks!
I could use some advice on how to use this 4N35 optocoupler properly. I will describe what I am trying to do, and will attach an image of the circuit.
I have an external switch that is hooked up to +10v dc. My goal is to detect when the switch closes from the +10v line. I am using a parallax propeller micro-controller that has 3.3 volt I/O pins. The threshold for logic 0 or logic 1 is 1.65 volts. I have the input pin tied down to ground via a pull down resistor. When the switch closes, this activates the transistor in the optocoupler allowing the 3.3 volts to flow through; giving me 3.3 volts (about) to the I/O pin, thus giving me a logic 1.
My problem is that when the switch closes, I am only getting about 1.4 volts to the input pin (this then creeps up slowly to about 1.7 volts). So after about 1 second, I get a logic 1, but barely. I was expecting something more closer to 3.3v. Also, when I take a voltage reading at pin 1 of the 4N35 optocoupler, I get about 1 volt there (which I thought was enough volts to activate the transistor inside the 4N35?). I noticed that if I change the resistance of R3 to a lower ohms value, giving me more voltage at pin 1 of the 4N35, that the 10v line starts to get compromised and starts dropping. I was trying to pull as little voltage off the 10v line as possible.
How do you guys think I should handle this? Any help is appreciated, thanks!
Attachments
-
60.8 KB Views: 491