# Low cost height sensor Lidar or ToF for detecting box heights on a conveyor

#### azmathmoosa

Joined Feb 8, 2022
1
Hi,
I need some help in looking for a Lidar/ToF or any other height sensor for a barcode reading application. We have a machine vision camera with liquid lens whose focus can be adjusted to predefined focus planes. Now, if the height of the box is known, we can adjust the camera to the right focal plane and take a sharp snap. The conveyor is moving fast about 0.5 m/s and boxes can vary from LxWxH as 1mx1mx0.7m to .5mx0.5mx0.05m. The conveyor width is 0.8m and the box can be anywhere on the conveyor - not just center. Hence a single-point laser sensor won't work.

We need a sensor that can look at a slice of the conveyor fully covering the horizontal and output the value closest to the sensor. That way the box can be anywhere on the conveyor and we will focus correctly at the box height. The sensor should be cost effective.

#### LowQCab

Joined Nov 6, 2012
2,054
What's wrong with using 2 LEDs, and 2 Photo-Diodes, aimed horizontally across the conveyor ???
1-Photo-Diode blocked = short package,
2-Photo-Diodes blocked = tall package.
You could have ~10 different levels if You want,
all very "bullet-proof".
.
.
.

#### bassbindevil

Joined Jan 23, 2014
422
Arrays of LEDs and sensors were used to measure log profiles as they passed along a conveyor in a sawmill automation system I worked on. The company made them in-house (back in the '80s) but I assume they are an off-the-shelf item by now.
Ultrasonic distance modules? For $3 plus an Arduino it's worth trying. https://www.banggood.com/HC-SR04-Ul...k-with-official-Arduino-boards-p-1548338.html LIDAR? I found this, for under$30:
https://www.banggood.com/5g-Benewak...Mode-FPV-Racing-Drone-RC-Robot-p-1678516.html