Electronics

IR Infrared Obstacle Avoidance Sensor Module

AED 12.00

1

Description

The IR Infrared Obstacle Avoidance Sensor Module is a compact (3.1 x 1.5cm) sensor module designed for detecting objects within a range of 2-20cm and a detection angle of 35º. It can be powered by a 3-5V power supply and features a red indicator light when wired directly. 

Package Includes:

  • 1 x The IR Infrared Obstacle Avoidance Sensor Module

Features:

  • Detection range: The module is capable of detecting objects within a range of 2-20cm, providing a reliable solution for obstacle avoidance.
  • Detection angle: The detection angle of the module is 35º, providing a wide range of coverage for object detection.
  • Compatible with a 3-5V power supply: The module can be powered by a 3-5V power supply, making it compatible with a variety of systems.
  • Red indicator light: When wired directly, the module features a red indicator light that indicates the device is in use.
  • Output port connectivity: The output port of the module can be directly connected to the microcontroller's IO port, providing a simple and convenient solution for data transfer.
  • 5V relay support: The module supports 5V relay connection, making it easy to integrate with other systems.
  • Compact size: Measuring 3.1 x 1.5cm, the module has a compact design, making it easy to integrate into various systems.
  • Three pins: The module features three pins, including VCC for external 3.3-5V power, GND for external ground, and OUT for digital output interface.
  • Adjustable detection distance: The detection distance that the module can detect within the specified range can be adjusted through the use of a potentiometer, providing flexible control.

Description:

The IR Infrared Obstacle Avoidance Sensor Module is a compact (3.1 x 1.5cm) sensor module designed for detecting objects within a range of 2-20cm and a detection angle of 35º. It can be powered by a 3-5V power supply and features a red indicator light when wired directly. The output port can be directly connected to the microcontroller's IO port, and a 5V relay can also be easily connected. The module has three pins, including VCC (for external 3.3-5V power), GND (external ground), and OUT (for digital output interface). The detection distance can be adjusted through a potentiometer.

Principle of Work:

The IR Infrared Obstacle Avoidance Sensor Module works on the principle of infrared reflection. The module consists of two infrared emitting and receiving LEDs. When an object is present in front of the module, the infrared light emitted by one LED is reflected off the object and received by the other LED. Based on the strength of the received signal, the module determines the presence and proximity of an object. The module then outputs a digital signal indicating the detection of an object, which can be used by a microcontroller to trigger a specific action, such as stopping a motor or avoiding an obstacle. The detection distance can be adjusted using the potentiometer, providing control over the sensitivity of the sensor.

Pinout of the Module:

The IR Infrared Obstacle Avoidance Sensor Module has a 3-pin connector that allows it to interface with the outside world. The connections are as follows:

  1. VCC: This pin is used to connect the external voltage source, ranging from 3.3V to 5V. The VCC pin can be directly connected to either a 3.3V or 5V microcontroller unit (MCU) to power the module.

  2. GND: This pin is used to connect the external ground, providing a reference voltage for the module to operate correctly.

  3. OUT: This pin is used to output a digital signal from the module indicating the presence and proximity of an object. The digital output interface is designed for small boards, with a signal range of 0 and 1. This output can be easily connected to the microcontroller's IO port for further processing.

Applications: 

  1. Robotics: The module can be integrated into robots, providing them with the ability to detect and avoid obstacles as they navigate.

  2. Automated Guided Vehicles (AGVs): AGVs can use the module to detect obstacles and adjust their course to avoid collisions.

  3. Automated doors and gates: The module can be used in automated doors and gates, allowing them to open and close only when it is safe to do so.

  4. Line-following robots: Line-following robots can use the module to detect obstacles and avoid them while following a set path.

  5. Smart home automation: The module can be integrated into smart home systems, allowing them to detect and avoid obstacles while performing various tasks such as cleaning or vacuuming.

  6. Other applications: The module can also be used in other applications that require obstacle detection and avoidance, such as car parking systems, toy cars, and industrial automation systems.

Circuit:

Connect the module to Arduino Uno the Gnd to Gnd the Vcc to 5v and the output to A0 o the Arduino

Library:

No library is needed to work with the module.

Code:  

This code will continuously read the analog value from the IR Infrared Obstacle Avoidance Sensor and write it to the serial monitor. You can use the serial monitor in the Arduino IDE to view the numerical value that represents the closeness of an object.

const int sensorPin = A0; // IR Infrared Obstacle Avoidance Sensor connected to A0 pin
void setup() {
 Serial.begin(9600); // initialize serial communication at 9600 baud rate
}
void loop() {
 int sensorValue = analogRead(sensorPin); // read the analog value from the sensor
 Serial.println(sensorValue); // write the sensor value to the serial monitor
 delay(100); // wait for 100 milliseconds
}

After uploading the code to the Arduino, you can follow the next steps to view the numerical value that represents the closeness of an object:

  1. Open the Serial Monitor in the Arduino IDE by clicking on the magnifying glass icon in the top right corner.

  2. Set the baud rate to 9600, which is the same baud rate specified in the code's Serial.begin function.

  3. Move an object closer or further away from the IR Infrared Obstacle Avoidance Sensor, and observe the values displayed on the serial monitor.

  4. The numerical value displayed on the serial monitor is proportional to the distance of the object from the sensor. The closer the object, the higher the numerical value, and vice versa.

  5. You can use these values to control other parts of your project, such as a motor, a LED, or any other output device, depending on the closeness of an object.

Note: The actual numerical value range may depend on the sensitivity of the sensor, the type of object, and the lighting conditions. You may need to adjust the code to calibrate the values to your specific needs.

Technical Details:

  • Detection range of 2 - 20cm
  • Detection angle of 35º
  • It can be used for 3-5V power supply modules. When wired directly, the red indicator light will be on.
  • The output port can be directly linked to the IO port of the project's microcontroller. A 5V relay can easily be connected
  • to pins (VCC, VCC, GND, GND, OUT, and IO)
  • Board size - 3.1 x 1.5cm
  • Pins on the module board - VCC (external 3.3 - 5V, which can be easily wired to either 3.3V or 5V MCU); GND external; and out for small board digital output interfaces (0 and 1)
  • The distance that the module can detect within the specified range can be adjusted through the use of a potentiometer

Resources:

Comparisons:

The IR Infrared Obstacle Avoidance Sensor Module and the modules with TCRT5000 component are both infrared (IR) sensors that are used to detect obstacles and measure distances. However, there are some differences between the two types of sensors.

  1. Detection Method: The IR Infrared Obstrance Avoidance Sensor Module uses two IR LEDs (Transmitter and Receiver), while the TCRT5000 module uses a phototransistor.

  2. Detection Range: The detection range of the IR Infrared Obstacle Avoidance Sensor Module is typically 2-20cm, while the TCRT5000 module has a detection range of up to 2cm.

  3. Detection Angle: The IR Infrared Obstacle Avoidance Sensor Module has a detection angle of 35º, while the TCRT5000 module has a detection angle of about 15º.

  4. Power Supply: Both modules can be used with a 3-5V power supply, but the IR Infrared Obstacle Avoidance Sensor Module can be powered directly from the microcontroller, while the TCRT5000 module typically requires an external voltage regulator to supply the required voltage.

  5. Output Signal: The IR Infrared Obstacle Avoidance Sensor Module has a digital output signal, which can be directly connected to the microcontroller, while the TCRT5000 module has an analog output signal, which requires an ADC (Analog to Digital Converter) for digital processing.

In conclusion, both types of sensors have their own advantages and disadvantages, and the choice between the two will depend on the specific requirements of the application. The IR Infrared Obstacle Avoidance Sensor Module is a good choice for applications that require a digital output signal and a longer detection range, while the TCRT5000 module is a good choice for applications that require a smaller detection range and a more precise analog output signal.