Electronic – RPR-220 photosensor to logic level

phototransistor

I have RPR-220 reflective photosensor, which transistor's part I connect to 2v via 10 Kohm resistor. Emitter is then connected to the base of a transistor C547B, which for the test setup uses LED + 1kOhm in collector circuit.

When something reflective appear above the sensor, about 2uA current is raising up to almost 60uA.

The problem is, that transistor is always open and LED on (and it seems the transistor is so sensitive, that it opens even if I touch the base along with some open-end wire!). I guess, the transistor is wrong, but probably the whole approach is not right.

I can't find what is the right way to connect phototransistor to have clear logic signal as an output (2 v or 3.3v is enough)?

(the RPR-220's LED part is not shown)

enter image description here

Best Answer

In your original circuit any current flowing through the photo transistor will go into the base of the NPN transistor and turn it ON.

enter image description here

Answer - change the position of the resistor in the photo transistor circuit and increase its value.

To turn the NPN transistor ON we need to raise its base-emitter voltage to 0.6V. With a 22k resistor this require a current of about 27 microamps (about half your measured value). To increase sensitivity increase the value of this resistor but remember there is ambient light which may cause the opto transistor to turn on so there will be a limit on how large you can make this value.

Related Topic