The GG-Circuits blog looks into proximity sensing using infrared (IR) light:
There are many ways to detect the presence of an object by using, capacitive proximity sensing, inductive, ultrasonic, magnetic, time-of-flight and optical. In this post we will go over using an infrared LED with a detector and how we can use them to detect the presence of an object. At the time, the perfect IR emitter detector sensor did not exist due to the mechanical constraints in the design. So a separate IR LED and detector were needed.
The detector being used is the Vishay TSSP77038. Placing an object in front of the sensor the pulse duration changes in relation to the distance, where the closer the object the longer the pulse duration.
See how the system is designed and tested in the post here. The code example can be found on GitHub.
Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!
Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: A New Arduino MicroPython Package Manager, How-Tos and Much More! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi
EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey