Using the IC LM358 and an easy-to-understand step-by-step procedure, I am going to build an infrared sensor for various electronic projects. This sensor has similarities to the visual senses of humans. This sensor’s function is really simple: it detects the presence of an object and activates the LED or any alert system. We have a transmitter and a receiver, which are two infrared LEDs. When the transmitter is powered on, infrared beams will be released. You can see this by using any kind of camera device.
The receiver is used to capture infrared beams under reverse bias conditions. The source (+) connection of the LED is linked to its cathode (-). The receiver will permit a little current to flow through it in its initial condition due to its reverse bias. A higher current will be able to pass through the receiver when the IR beam falls on it. Here, we’ll use an op-amp that serves as a comparator, the LM358 IC.
What is an Infrared Sensor?
An electrical device that analyses and takes up infrared radiation from its surroundings is called an infrared sensor. The infrared ray from the IR LED (also known as the transmitter) is reflected by an object as it gets closer, and the IR receiver (also known as the photodiode) detects this reflection.
- LM358 IC
- IR Transmitter
- IR Receiver
- 10 KΩ Potentiometer
- Resistor (1 KΩ, 10 KΩ, 220 Ω)
- Piezo Buzzer
- A Switch
- 9V Battery
The infrared transmitter will be connected as follows: in series with a 220 Ω resistor. The LED’s anode (-) has resistance to the ground while the cathode (+) is connected to the positive.
The receiver will then be connected to the transmitter in parallel and in reverse bias mode. The cathode (+) and anode (-) will be linked in series with the resistance to the ground and the 10 KΩ resistance.
The infrared sensor has a very high internal resistance and a low output voltage when it is not able to detect infrared radiation. Additionally, its internal resistance will be exceptionally low and the output voltage will increase as it begins to receive the radiation.
This is working now, and we’re going to add a 1 KΩ resistance in series with the LED. The resistor is linked in series with the grounded LED and wired to pin 1.
Working Principle of Infrared Sensor
Initially, the IC LM358 will be placed on the breadboard. Next, pins 8 and 4 should be connected to the power source and ground, respectively.
After that, we’ll mount the potentiometer on the breadboard and make sure that the three pins are all isolated. In the circuit above, we will connect the potentiometer’s pins in the following manner.
The infrared receiver is the sensing element in this circuit. More current will flow through the receiver if the amount of infrared light increases (the photodiode’s p-n junction absorbs electrons from the IR transmitter, which results in current flowing through it).
A potential difference will occur when the 10 KΩ resistor is filled with current. Since the resistor’s value is constant, the voltage across it and the current flowing through it are directly correlated with the quantity of infrared radiation detected by the receiver. Therefore, the voltage at the resistor increases when an object is near the infrared sensor because more infrared rays from the IR transmitter fall on the IR receiver.
The LM358 integrated circuit is used in this infrared sensor as a comparator to compare its voltage to the reference. The reference voltage is linked to the inverting terminal of the Op-Amp, while the positive terminal of the infrared receiver is connected to the non-inverting terminal.
The Op-Amp operates by turning on the LED and producing a high output whenever the voltage across the non-inverting terminal exceeds the voltage across the inverting terminal.
The LED will turn off and there won’t be any output indicating no detection if there isn’t anything close to the sensor.
The potentiometer can be adjusted to drive the required distance for measurement. In other words, when an object moves far from the infrared sensor, the voltage at the non-inverting input decreases, causing the Op-Amp to switch off the alarm or LED.
Applications of Infrared Sensor
- Just as it can identify movement, it can also measure an object’s heat.
- Unlike an inactive infrared sensor, which emits infrared radiation, this kind of sensor just detects infrared radiation.
- In the robotics sector, it can also be used for object detection.