Searching specific distance sensor

Hello!

I am trying to find a distance sensor for mapping rooms in a robotics competition. As I searched the internet I ran into the problem where to find the kind of sensor I needed, since they would either be too weak or massively overpowered and expensive.
The main goal is to spot walls accurately in a distance from 2 - 130 cm (around +- 2 cm accuracy).

(small distance sensors are already installed, so if the sensor isn't accurate below 40cm or so it's perfectly fine)

The second important piece of information is that the sensor needs to be very small to fit into the robot. 3x3x3 is the absolute maximum, but a 2x2x5 solution would also be tolerable (in cm). Smaller is always better of course.

And the last crucial point is that the beam of the sensor shouldn't be too big. The sensor would be used to align the robot with the detected walls. As the robot is small, two of these would be placed around 16cm apart.
Here I will add that the robots overall driving capabilities are limited, so to guarentee a useable alignment it constantly reads the sensors and as such the time between to sensor readings should be only a fraction of a second.

I am planning to use 2 of these in every direction (at least back and front) so the price shouldn't be through the roof as well.

I probably expect much too much, so if you can help me with something that only partially fullfills my enormous requirements :slight_smile: I would be very happy as well.

If you have ideas for a overall different approach or different sites I can go to I am also very happy to hear those.

This inexpensive LIDAR scanner seems like a remarkable value, if you have room for it: Slamtec RPLIDAR A1 - 360 Laser Range Scanner : ID 4010 : $99.95 : Adafruit Industries, Unique & fun DIY electronics and kits.

Currently I am still trying to solve the problem by individual sensors since the robot would need to be quite literally "reinvented" to make a LIDAR work in it. But still, I might have to consider this and it seems like a reasonable choice.

I was aiming to pay around 60 Euros each or less if that helps.

The HC-SR04 ultrasound sensor fits the bill. Range 2-300 cm, accuracy about 2 cm. 21x45x16 mm in size, excl, connection pins. Cheap - you can buy a couple dozen of them at that budget :slight_smile:

For added fun, mount one on top of a servo and create a "radar".