I have very little experience with phototransistors. I'm trying to create a circuit that will effectively function as collision detection. I'm using OPB608A which utilizes an NPN transistor. My goal is to use said transistor to output logical signal to my PIC18F4520. The I/O pin I'm using for this has Schmitt Trigger Buffer - according to the datasheet any input above 0.8VDD (~4V) will be treated as logical high (and 0.2VDD - 1V - will bring it back down).
Having very little experience I am tempted to use the following circuit:
and adjust value of R1
to adjust the sensitivity. My question is: is this a good idea? Won't this cause any problems (such as pretty much shorting the circuit if R1
is low value)? Any better way to handle it?