OS25B10 Photo interrupter

Hi everbody!

I'm doing a project with a OS25B10 photointerrupter (http://www.seeedstudio.com/depot/images/phoint1.jpg)

I'm trying to connect it to Arduino. I've made the attached layout, but I don't know the value of Rd and Rl. Can anyone help me? Thanks :slight_smile:

I would use 180 to 270 ohms for the diode and 10k for the transistor.

The reasoning is that the diode needs a current limiting R and 180 to 270 ohms will give enough current to light the LED. The 10k is just a R to tie to gnd so that when the transistor is lit, there will be 5v at the output and gnd when blocked.

Weedpharma

Thank you, I'll try and give you feedback

It worked! But it's better to put a 100k resistor instead of a 10k resistor in order to get better resolution. With 10k resistor I obtained 14 bits with sensor not interrupted, and 0 bits with sensor interrupted. With 100k resistor I obtained more than 100 bits with sensor not interrupted. Thank you!

That type of sensor is designed as a digital input. IE, on or off. It is not normally read as an analogue signal.

Weedpharma

If you are feeding a digital input 100k might put you near a floating input condition.
Best use 10k then as mentioned.

Hi markrock90,
I used something like 180-220R for Rd and 10K for R1, this has worked with Vishay TCRT5000L and TCRT1000 sensors, these being modules that combine in a single plastic package an IR emiter and an IR sensor, both pointing in the same direction for dection and line following etc.

Here a pic of the line follower I made, with the TCRT5000L.... A bit wonky but it works..

Hope it helps, Regards.

Mel.