Let's Make Robots!

Optosensor


Vendor's Description: 

The Kodenshi SG-2BC reflective sensor combines a GaAs IRED with a high-sensitivity phototransistor ina  super-mini (4mm) ceramic package, reducing installation space.

This is the Kodenshi SG-2BC. The manufacturer says: "The SG-2BC reflective sensor combines a GaAs IRED with a high-sensitivity phototransistor in a super-mini (4mm) ceramic package, reducing installation space."

Inside this 4mm diameter package, you get an IR LED and a phototransistor. The IR LED emits IR light and the phototransistor acts as a switch which opens and closes when it detects the reflected IR light.

Its effective range is only about 5mm at most, so it's finest application is detecting small objects passing very close. Typical applications would be watching how fast the floppy disc (remember them?) is spinning in a drive. I have used it as a rotational speed sensor on a spinning object. It can very easily detect a black spot on a white background.

Hooking it to a PIC couldn't be simpler. The LED connects to the power via a resistor - same as any other LED. With the transistor emitter to ground attach the collector to a PIC input with a high value (maybe 220K) pull-up resistor. (You could make use of the PIC's internal pull-ups.) Ideally, you would hook it to a comparator input so you could fine tune it but it will work reasonably well attached to a digital input.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I love these things! I have been using them for encoders with some white and black stripes on my wheels and gears etc. I dunno 'bout your fancy "european" sensors, but I am sure these are the same -and are only a buck! With a little shrink tube and time, I was able to sneak my resistor in between the leads when I soldered on the servo connector.

encoder_003.jpg