The IR Range Sensor: Theory

Infrared Radar Theory
           The way that infrared range sensors work is by using infrared light. Two infrared leds are used, one as a transmitter and one as a receiver. The transmitter simply outputs like any normal led, since it is in the infrared spectrum we cannot see it with our eyes. If any infrared light bounces off an object the ingrared receiver outputs a voltage seemingly proportional to the intensity of that light. The follow picture makes sense of that:

           This shows us that there exists a certain range of voltage that we're interested in, namely: about 3v - 0.4v. These voltages tell us how far away an object is. Inorder to get a better understanding of what this really means check out this video:

           The led gets brighter when the piece of paper nears the sensor because the voltage output increases. The opposite happens when the piece of paper is moved backward away from the sensor.