Distance is about 3m. IR or visible light - does not matter.

It is possible that object/obstacle can be shiny, so for correct detection necessary large amount of reflected light.

Maybe for this task better to use specific retroreflector?


there will be two sensors with distance about 3-4 cm between. Object must cross 1st sensor's reflector but do not cross the 2nd one.

The scheme of this sensor should be this: Scheme of sensor

But the use will be this:

scheme of use

  • If you use a laser and mirror, you probably only need a simple photo-transistor (of approximately the same wavelength as the laser). Shiny object have to be precisely aligned to reflect as much light as a mirror does, so it's hard to not be detected.
    – Gerben
    Commented Aug 31, 2015 at 14:31
  • @Gerben OK, I will update the task. I don't believe that sonar is capable for desired distance and accuracy.
    – XuMuK
    Commented Aug 31, 2015 at 20:09
  • @Gerben There is possibility that the light of the surrounding will affect on result.
    – XuMuK
    Commented Sep 3, 2015 at 16:11
  • Lasers are nice for this, they are bundled quite well. You could use a sonar/ping/ultrasonic sensor for this. But they might interfere with eachother if they're too close. And yes, lasers don't do very well on shiny objects if set up like this.
    – aaa
    Commented Nov 2, 2015 at 21:38

2 Answers 2


I think the question is worded to get a specific answer; I do not know if this is the answer you want. I'll give you that answer first:

I'd say an infrared LED, and an infrared detector.

Strobe the LED, then measure the difference between when it's (known to be) on, and when it's (known to be) off, to compensate for ambient light.

However, if I was doing this, I'd consider an ultrasound sensor - no retroreflector needed; instead you get the distance to the (obstacle or reflector).

  • Reflector does not require any power and can work at quite large distance. I have updated the scheme - it is not possible to use ultrasound sensor
    – XuMuK
    Commented Aug 31, 2015 at 20:55

I think you're better off with a set-up like this.

A shiny object might bounce the laser as if it were a mirror. But we wan't to know if the laser was interrupted.

So. If we place the sensor on the other side, we can accurately say if the light reaches the sensor. Thus if there is an object between (shiny or not).

But what if another light-source shines into my sensor? It'll think that there is no object.

We can encapsulate the sensor, so that only light from the direction of the laser can shine into it. And we can filter out other light "colors". Also the strength of the laser should be bigger as any other ambien light (not too strong also). You could even choose to make the laser pulse a specific pattern and let the sensor check if it's right.

enter image description here

  • What is the length of sensor "vision" and how narrow is the sonar? Distance between two sensors should be about 5-6 cm (maximum -10).
    – XuMuK
    Commented Nov 9, 2015 at 0:49
  • @XuMuK what you man by length of sensor "vision" the sensor can see the light source, as long as the light source is bright/strong enough. It's hard to pre-calculate this, just get one of which you think is strong enough to make a difference (against ambient light).
    – aaa
    Commented Nov 9, 2015 at 14:33
  • @XuMuK regarding the "narrowness" of a sonar, it'll be different for each part, you should check the datasheet of the specific part. Or choose one which fits your needs.
    – aaa
    Commented Nov 9, 2015 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.