I would like to be able to use IR emitter/receivers to measure the ANGLE to an object. As far as I am aware this is how the Sharp IR distance sensors work, by using triangulation to measure the angle of a reflected IR light source to work out the distance to the object.

I just need to work out the angle an object is from the emitter/receiver pair and by using more than one pair I could then work out (using triangulation) the distance to the object as well its position in 2D space.

However, researching this has proved fruitless so far. I believe the receiving end of a Sharp distance sensor is a pin photodiode (correct me if I am wrong?). If it is not a pin photodiode then what is it? What measures the angle of the IR beam?

If anyone could help with this it would be appreciated.



  • 1
    \$\begingroup\$ can you brief with a diagram if possible? what is the size of the object, distance between object and measurement module, angle precision etc \$\endgroup\$
    – User323693
    Commented Aug 3, 2017 at 9:25
  • \$\begingroup\$ Don't have any diagrams yet, but it will be for a robot so I can detect objects and the angle the object is from the robot and thus work out a path to get past it. Distance detection needs to be no more than about 30-40cm. \$\endgroup\$ Commented Aug 4, 2017 at 11:02
  • \$\begingroup\$ The Sharp sensor data sheets explain very clearly how it works. Why don't you RTFM ? I doubt you will be able to replicate it with a simplistic IR pair. You can try using a rotating LiDar like VL53L0X which are quite cheap. \$\endgroup\$ Commented Sep 7, 2019 at 15:54

1 Answer 1


Distance sensors actually measure the angle, then calculate the distance using triangulation, which provides a relationship between angle and distance: enter image description here

Obviously, you can progressively rotate this assembly to known angles and stop when you measure the expected distance. Then you know you're facing your object.

An alternative approach would be to install the light source on the object in question. Then you would measure the angle to it directly without the need to rotate anything, and you don't need to know the distance to your object beforehand.

  • \$\begingroup\$ This is for a robot so I can detect objects and the position of the object. I'd like to use the angle detection of the distance sensor to figure out where the object is. Obviously i'd need a few IR sources and a few IR receivers working together to get a precise position of the object. \$\endgroup\$ Commented Aug 4, 2017 at 11:01
  • \$\begingroup\$ Note that Dmitry's sensor sends out a focused spot and that the reflected light falls on a one-dimensional linear camera sensor. Distance is determined by which pixels get lit up and interpolation is used to get a higher accuracy than the number of pixels themselves would permit. \$\endgroup\$
    – Transistor
    Commented Oct 7, 2017 at 16:24

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.