IR Sensor module consists of an IR transmitter LED which transmits IR light, this light will then be picked up by an IR receiver LED if it gets reflect by any object in front of it. It is commonly used in Line following robots, proximity sensing, object detection etc.
It has three pins, in which two are used to power the sensor and the 3rd pins gives the output as high/low based on the proximity of the object in-front of it. The line follower sensor module also has a potentiometer to adjust the sensitivity of the sensor.
This IR sensor module consists of an LM358 op-amp, an IR LED, photodiode, a 10K pot, led indicator, 2 resistors of 330 Ohms and 10K Ohms.
The Working of IR Sensor Module:
Case 1: When an object (Not of the black surface) is placed in front of the IR LED
In this situation, the IR waves emitting from the IR LED will strick the object (placed in the path transmitting IR waves) and gets reflected back. The photodiode is placed in such a way that it senses the reflected IR waves. When it senses the IR waves, its resistance decreases and acts as a short circuit. The current starts to flow into the R2 and voltage is appeared on the non-inverting terminal. If the voltage at the non-inverting terminal is greater than the voltage at the inverting terminal, the op-amp will give output high(5V) and the led starts glowing. (Note: the voltage at the inverting terminal can be varied by varying the pot’s resistance. This is done to change the sensitivity of the sensor. If the pot value is zero, even before the photodiode senses the IR waves, the output of the OP-amp will be high. This means that the sensor has high sensitivity.)
Case 2: When no object is placed in front of the IR LED.
In this case, the IR waves emitting from the IR LED will not be reaching the photodiode, as no object is present that can reflect back the IR waves. Due to this, the photodiode will be offering maximum resistance to the Vcc (supply voltage). As the current flowing through the resistor is minimum, the voltage at the non-inverting terminal will be minimum. As the voltage at the non-inverting terminal is less than the voltage at the inverting terminal, the output from the Op-amp will be a low value (0V).
NOTE: Appearance might differ from the image shown.