How to get distance with IR sensor

Hi,

I want to use IR sensor to detect some obstacles and get distance and I'm using KY-032 IR sensor.

Above link includes specifications of KY-032.

When I used this IR sensor, it could detect the obstacles, but I couldn't get the distance of the obstacles.
What I know is the voltage that IR sensor's output voltage differs according to the distance of the obstacles.
But when I checked out the value of voltage on the serial monitor, it was strange, like even though the distance has changed but the value didn't change...
So I couldn't get the correct distance.

I wonder if someone experienced the problem like me, and how can I solve this problem.
And if you have any ideas about this problem, please let me know.

Thank you.

Hi
This sensor is not designed to measure distances, but only to sense the presence of objects.

"The module has a pair of infrared LEDs, an emitter, and a receiver. The emitting LED sends infrared light pulses at a certain frequency. When the light hits an obstacle is reflected the receiver LED."

An aid in using light to measure distance is by using LIDAR or TOF module.

I like the TFMini's myself.

Hi, @bin1982
Welcome to the forum.

Can you please tell us what your project involves?
That way we may be able to offer some better solutions.

Thanks.. Tom... :grinning: :+1: :coffee: :australia: