Step 1: A Simple Version With Bipolar Transistors
the point in the operation is:
1. an oscillator generates a square wave.
2. an infrared led with narrow angle transmits this signal as infrared light/ray.
3. this is reflecting back from obstackles within the viewing angle, basically from a viewing spot on the ground, or in front of the robot.
4. there is a photodiode or phototransistor next to the IR-LED, with also narrow angle pointed to the same spot as the LED was. phototransistor was used on the bipolar version, and photodiode on the IC version.
5. there is a receiver circuit connected to the sensor, detecting if there is reflected signal or not.
6. if there is a signal (within a specified frequency band, like 5khz-150khz), then the output goes to logic high level, otherwise to low level. this signal can be used by a microcontroller, or by an analog control logic. there is signal if there is an obstacle/ground within the sensing range, which is about 5-15 centimeters.
Step 2: More Difficoult Sensor
as a sensor, i have used the BPW24R from Vishay semiconductors, and the SFH481 IR-LED from OSRAM.