I need to know how to turn on a opto coupler at 0V input.(the input is from some sensor)
so i need put PNP transistor to drive input for the opto coupler.
how to design this circuit?
my input in the range of 5V.
my optocoupler transistor side is used to drive a MCU pin.
i designed two circuit with small change wich is correct and WHY?
The first circuit uses the capacitor to turn on and turn off the transistor slowly.
The second circuit has the capacitor turning the transistor off slowly but it turns on quickly.
The first circuit uses the capacitor to turn on and turn off the transistor slowly.
The second circuit has the capacitor turning the transistor off slowly but it turns on quickly.
Since the transistor has no series emitter resistor its gain is very high and is very sensitive to interference. Try moving the 100 ohm resistor to be in series with the emitter which reduces the gain and the resistor still limits the current to the LEDs.
A long single wire is a perfect antenna to pick up interference. It should be shielded audio cable.
Multi core wire has interference between the wires.