Distance sensor + self leveling device

Hi there,

I’m new on here, but I thought I’d ask if anyone knows of what devices I could combine to create a distance sensor (infra, lidar whatever) that can level itself (like a laser level on construction sites) to always take the horizontal distance if the gadget is tilted slightly or such.

Thanks in advance :slight_smile:

1 Like

Hi Norbert
Welcome

Do they actually do that? The ones I have seen have a bubble level as part of the device which is used to level it manually. Some might be automatic, I don’t know and you could say my exposure to this sort of thing is pretty limited.
Cheers Bob

1 Like

This project uses a triple-axis accelerometer to automatically level a plate.
Auto Leveling Laser Cross : 11 Steps (with Pictures) - Instructables

There are probably other similar projects you could find using search terms from that page.

The current equivalent would be a MPU6050.

For distance sensing your choice would depend on the distance over which it needs to operate, the type of surface it is measuring against (and other ambient conditions) and the precision required. Lidar, infrared and ultrasonic are the typical options.

2 Likes

Hi Norbet,

Thanks for posting on the forum. As Bob and Jeff have mentioned, with an appropriate accelerometer and gyro setup, you should be able to get your orientation in space (relative to the downward acceleration of ~9.8 from gravity that is detected by your accelerometer, you can use the vector components in XYZ to get your orientation, which is essentially all your gyro is doing against some zero point)

From there, it is just a little trig to get the horizontal distance based off of that angle and the measured distance as the hypotenuse of a right angled triangle. The problem is, you also need to know how high you are compared to the point you’re measuring against, but there may be some other techniques you can apply to get around this I can’t think of off the top of my head:

1 Like

Thanks for that its very helpful

1 Like

Thank you for the info :slight_smile:

1 Like