

The Infrared Proximity Sensor is a device that detects the presence of nearby objects by emitting infrared (IR) light and measuring the reflected signal. It is widely used in applications such as obstacle detection, object tracking, and automation systems. This sensor is a key component in robotics, touchless interfaces, and smart devices, offering a reliable and cost-effective solution for proximity sensing.








Below are the key technical details of a typical Infrared Proximity Sensor:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V to 5V |
| Operating Current | 20mA (typical) |
| Detection Range | 2 cm to 30 cm (varies by model) |
| Output Type | Digital (High/Low) or Analog |
| Wavelength of IR Light | 850 nm to 950 nm |
| Response Time | < 2 ms |
| Operating Temperature | -10°C to 50°C |
The Infrared Proximity Sensor typically has three or more pins. Below is a common pinout for a 3-pin sensor:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply pin (3.3V or 5V) |
| 2 | GND | Ground connection |
| 3 | OUT | Output pin (Digital or Analog signal based on model) |
For sensors with additional pins (e.g., sensitivity adjustment or mode selection), refer to the specific datasheet.
Below is an example of how to connect and use the Infrared Proximity Sensor with an Arduino UNO:
// Infrared Proximity Sensor Example with Arduino UNO
// This code reads the sensor's digital output and turns on an LED when an object
// is detected within the sensor's range.
const int sensorPin = 2; // Sensor output connected to digital pin 2
const int ledPin = 13; // Onboard LED pin
void setup() {
pinMode(sensorPin, INPUT); // Set sensor pin as input
pinMode(ledPin, OUTPUT); // Set LED pin as output
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int sensorValue = digitalRead(sensorPin); // Read the sensor's output
if (sensorValue == HIGH) {
// Object detected
digitalWrite(ledPin, HIGH); // Turn on the LED
Serial.println("Object detected!");
} else {
// No object detected
digitalWrite(ledPin, LOW); // Turn off the LED
Serial.println("No object detected.");
}
delay(100); // Small delay for stability
}
Sensor Not Detecting Objects
False Detections
Short Detection Range
Output Signal Fluctuates
Q: Can the sensor detect transparent objects?
A: Most Infrared Proximity Sensors struggle to detect transparent objects like glass due to low IR reflection. Use specialized sensors for such applications.
Q: What is the maximum detection range?
A: The detection range varies by model, typically between 2 cm and 30 cm. Check the datasheet for your specific sensor.
Q: Can I use this sensor outdoors?
A: While the sensor can work outdoors, strong sunlight may interfere with its performance. Consider using an IR filter or housing for better results.
Q: How do I know if my sensor is working?
A: Test the sensor by placing an object within its range and observing the output signal (e.g., LED or serial monitor).
This concludes the documentation for the Infrared Proximity Sensor.