Distance measurements between a contact sensor like device :)

Hi All,

I interested if any of you have come across such a device, which in principle is like a contact sensor, but it reports distance of the opening. Btw.: I know there ar ultrasonic, laser, lidar sensors, I am just interested if you have seen anything like that.

Thank

D.

Can you give a little more info on the use case?

Like would it be similar to a cover: ?

Are we talking 2cm or 2m distances etc?

I can’t think of anything. The ones I can think of bounce waves or step motors.

Depending on the distance you could use a linear hall effect sensor.

Our car uses ultrasonic for indicating the distance to obstacles when parking. Advantage of ultrasonic over ToF/laser is that it is working acoustically - so light sources (like the sun) doesn’t,'t interfere with the measurements

So the use case would be, that I have a dumb standing desk where I rewired a the controller to a esp32 and with some switches I am using cover esphome integration. But the problem is:
Due to the cover integration works by time, after a couple of opening closing cycle the cover status misaligned in HA. (Eg : It says closed where it is not closed). So the distance is approx a meter.

1 Like

Because it’s indoor a cheap and small ToF sensor should be enough.

And make use of a (not time based) cover in esphome

1 Like

Could you fit an endstop switch at one or both ends? (Or at your preset heights somehow?)

I actually tested both tof and ultrasonic sensors for a similar application and was surprised the ultrasonic had less noise.

There’s also rotary encoders.

Some carefully positioned door sensors / reed switches can be very effective for this kind of thing too.

thanks for all of your input, I went with the Time of Flight sensor. I ll update if it worked

1 Like