Photo sensors

Need some help finding a product similar in concept to this one — Photo Interrupter - GP1A57HRJ00F.

My project has the requirement of detecting when an object (model train) has reached a certain point.

When it does the power source will be “switched off”.

What I am thinking I need a product that will indicate when the “beam” is blocked/interrupted (by train engine) a certain action will take place.

I need a detector that will work across 5 to 7 inches as this is the space the train engine will pass through.

Does Sparkfun have a product that meets my need? if so, can you supply the name and part number so I can research further?

If Sparkfun does have any products offerings, can you point me in the direction of another place that might?

Thanks:

Ken

Hi Ken.

Sadly we don’t offer a larger version of the [GP1A57HRJ00F sensor we carry but we have some things that you might be able to use to build your own.

What I’d suggest is using a [photo cell and a [LED with the photo cell in a small lightproof tube and on the other side of the tracks a led shining into the end of the tube. That creates a “beam” of light the photocell can see and when a train comes by, the light gets blocked and the photocell will detect that.

The setup would look something like the picture below.

photo sensor.jpg](https://www.sparkfun.com/products/9590)](Mini Photocell - SEN-09088 - SparkFun Electronics)](Photo Interrupter - GP1A57HRJ00F - SEN-09299 - SparkFun Electronics)