Let's Make Robots! | RobotShop

IR Distance Sensor Placement

Well folks,

I have now upgraded to a total of 4 Sharp IR distance sensors on a single robot (in addiition to a sonar sensor in the middle on a servo). I want this bot to drive entirely off the IR sensors leaving the sonar to simply find "interesting" things to drive toward.  In the past, using only 2, I have tried many different placements... I have tried:

One on each corner, shooting straight forward

From the middle shooting out to the corners

On each corner shooting to the opposite corner (crossfire)

I have tried all of these positions moving the sensors forward and back from the front edge.

Now that I have 4 sensors to play with, it adds many more possibilities and with more or less success with the positions described above, I am a little stuck on what would be the best placement. In addition, I am a little anti-double-stick-tape on this robot... I am sorta "hard-mounting" the sensors on brackets and really want to get the placement close to right on the first try.


Does anyone have any solid ideas or experience to help me brainstorm this one?

Thanks and Word to ya Motha!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I would have a pattern like this (except not on the servo:



Acroname has a good article on some placement ideas.You can see it here :


I personally prefer sitting a Sharp on a front  corner, aiming across the face of the robot, with another on the other front corner aiming opposite in a crossfire. I aim these more forward than some, in a 45 degree angle rather than towards the sides. This leaves the "dead zone" directly in front of the robot, where a short range forward IR can pick up, if needed.  For a specific contest, I had one facing the side at an angle, with the other facnig forward. The side face was to maintain distance while following a wall, and the front was to watch for a perpendicular wall coming up ahead, to trigger a turn. A minisumo had both facing forward slightly seperated, to quickly target the opponent robot.

One additional note is that Sharps should generally be oriented vertically, rather than the horizontal way they are sometimes placed. There was an early Sharp application note that stated the sensor should be parallel to the discontinuities in sensing area, ie: vertical corners would cause incorrect or inconsistent measurements with a horizontally placed sensor. Same was mentioned even in color variations. Found the app note again here, page 4 :


One additional resource, has a good tech overview of the Sharp, timing and a little linearization/compensation. It helped me find out why a robot was getting inconsistent hits on targets. It was turning too fast. This info here:


Chris, ask yourself more questions and maybe the answer will roll out all of a sudden. Myself, I don't have any experience with these things at all, but I do a lot of reading and thinking.

  • what is the "beam angle" of your sensors?
  • is this a binary sensor (answers "are we there yet") or an analogue one (answers "how far to go")?
  • what is the purpose of your sensing?
  • what is the basic configuration of this robot (long, narrow, flat)?
  • what is the shortest range the sensor can reliably detect?
  • does you bot ever go in reverse?
  • what is the most extreme situation in your target environment (e.g. 40 inch wide robot crawling through a 44 inch doorway)?

And about ma motha: she too wonders why we cannot create a quick simple sketch directly in an LMR post.


Wow, thank you so much you guys nailed it. Such good info with those spec sheet links. Well, I have them mounted and I think they look about right. I actually put them on brackets to allow me to adjust them a little bit if need be. Now on to new code!!

 Thanks again folks -And if anyone else wants to throw down on the subject, please don't hesitate.