ir / laser sensor for distance

Imgur

Does anyone know a good sensor to do this?

i saw this for example:
http://luckylarry.co.uk/arduino-projects/arduino-using-a-sharp-ir-sensor-for-distance-calculation/
Which looks quite easy, but i don't know if it works for insects.

Or is there something else that gives more like a boolean value when something is in between (cross beam)?

what about a webcam?
then u would know within 20msec, where the object is, if u place the webcam properly... :wink:

edit: or 50msec... :roll_eyes:

This is basically a laser-beam alarm of the type much loved by Hollywood spies -- only smaller.

A laser diode module shining onto a phototransistor will keep it fully on as from the phototransistor's perspective it will be thoroughly dazzled by the laser.

Something like this should do the trick. Collector of the phototransistor to a digital input. Experiment!

The laser alarm http://www.dangerouslymad.com/projects/chapter-7-laser-intruder-alarmis from my book. There may have been a bit of photoshopping going on here :wink:

webcam is too much hazzle since it will need a laptop or pc aswell (and light).
I will look at your laser intruder alarm.

p.s. a boxing glove that get triggered by the alarm would be cool

The next step up is to use an IR receiver and a modulated IR beam which would be insensitive to ambient light. You could still use a laser for your beam but an IR emitter would be cheaper and you'd just need to enclose it in some kind of tube to "focus" the light it emits.

If you're looking for a ready-made product to get ideas from take a look at the Camera Axe