The IR Object Sensor (Manufacturer: Cytron Technology, Part ID: Maker Object Sensor) is a compact and efficient infrared sensor designed to detect the presence of objects using infrared light. It works by emitting infrared radiation and measuring the reflection from nearby objects, making it ideal for proximity detection and motion sensing.
The following table outlines the key technical details of the IR Object Sensor:
Parameter | Value |
---|---|
Operating Voltage | 3.3V to 5V |
Operating Current | < 20mA |
Detection Range | 2 cm to 30 cm |
Output Type | Digital (High/Low) |
Sensor Type | Infrared (IR) |
Dimensions | 30mm x 15mm x 10mm |
Operating Temperature | -10°C to 50°C |
The IR Object Sensor has a 3-pin interface. The pinout is as follows:
Pin | Name | Description |
---|---|---|
1 | VCC | Power supply input (3.3V to 5V) |
2 | GND | Ground connection |
3 | OUT | Digital output pin (High when object is detected) |
VCC
pin to a 3.3V or 5V power source and the GND
pin to the ground of your circuit.OUT
pin to a digital input pin of your microcontroller or directly to an external circuit for triggering.Below is an example of how to connect and use the IR Object Sensor with an Arduino UNO:
VCC
pin of the sensor to the 5V pin on the Arduino.GND
pin of the sensor to the GND pin on the Arduino.OUT
pin of the sensor to digital pin 2 on the Arduino.// IR Object Sensor Example Code
// This code reads the digital output of the IR sensor and turns on an LED
// when an object is detected.
const int sensorPin = 2; // Pin connected to the sensor's OUT pin
const int ledPin = 13; // Pin connected to the onboard LED
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 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 Triggers
Inconsistent Detection Range
Output Always High or Low
Q: Can the sensor detect transparent objects?
A: The sensor may have difficulty detecting transparent or highly reflective objects due to insufficient IR reflection.
Q: Is the sensor compatible with 3.3V microcontrollers?
A: Yes, the sensor operates within a voltage range of 3.3V to 5V, making it compatible with most microcontrollers.
Q: Can I use this sensor outdoors?
A: While the sensor can function outdoors, strong sunlight or environmental IR interference may affect its performance. Use it in shaded or controlled environments for best results.