Find any optical sensor in catalogs?

Did anyone find any suitable optical sensors for line-following applications? That is, light sensors that produce analog output based on the amount of reflected light.

I searched both digikey and Future Active’s catalogs and could
not find anything obvious.

Please help.

Thanks in advance.

You can very easily put together a visible light reflective line sensor with the following parts:

1 x visible light phototransitor, part number BPW77
1 x 47k ohm resistor
1 x LED, color of your choice
1 x 470 ohm resistor

The LED is your light source, the phototransistor is the detector. You can use a CDS photocell instead, but the BPW77 has a lens built in and has faster reaction time.

  1. Cut off the Base pin of the phototransitor (PT).
  2. Connect +5V from the RC analog port to the collector pin of PT
  3. Connect the anode (long leg) of the LED to the collector pin
  4. Connect the 47k resistor to the emitter of the PT
  5. Connect the 470 ohm resistor to the cathode of the LED
  6. Connect the other end of both resistors to ground from RC.
  7. Tap the node between the PT emitter and the 47k resitor as the output.

Put the circuit together on a breadboard and play with it to see if it works well. The 47k ohm resistor controls the brightness range, make it smaller for a wider swing and bigger for a smaller swing.

You will need to make sure the circuit sinks less than 50mA, but it should be ok. If the LED is not bright enough, use a smaller resistor.