Using a 4N35 Optocoupler - Could use some advice on getting it to work properly

BigD61

Joined Nov 8, 2014
20
This schematic was functionally tested using PS2501 (2N217). This configuration is without de-bounce, should work the same with LED current limiting resistor in on cathode or anode. Loading to 10 volt source is .1 milliamp, output is 3.28 Vdc.
 

Attachments

Thread Starter

Mahonroy

Joined Oct 21, 2014
417
Thanks again for all of the help!

With reference to "debouncing";

You can debounce the switch in software. Let me know if you need suggestions on software switch debouncing.
Its actually already sort of debounced in the software (its reading at a slow enough rate to miss any fluctuations). I prefer to debounce through software and through the circuit for redundancy.
How would you use a capacitor in this arrangement? Since the pin is pulled high, and the switch pulls it low. Would you still connect a capacitor from the input pin to ground? Is it better to put the capacitor on the diode side instead of the transistor side?
 

Geowizard

Joined Nov 30, 2014
8
Redundancy is good where redundancy is needed. Otherwise it can case problems.

The problem caused is slow reaction in a circuit that applies excessive time constant.

Calculation of RC Time constant:

TC (Time Constant) = R * C.

In one time constant, the voltage at the resistor-capacitor node = 2/3 of total charge. So, you can calculate the delay (in seconds) to reach a predetermined threshold.

Note: After the second TC, the voltage will be 2/3 of the remaining voltage. After the third TC, the voltage will be 2/3 of the voltage remaining after the second TC and so on.
 
Top