

The Sensor Infrarrojo is a device designed to detect infrared (IR) radiation, which is invisible to the human eye but emitted by objects based on their temperature. This sensor is widely used in applications such as motion detection, temperature measurement, and proximity sensing. Its ability to detect IR radiation makes it an essential component in security systems, remote controls, and automation projects.
Common applications include:








The Sensor Infrarrojo comes in various models, but the following are general specifications for a typical IR sensor module:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V to 5V |
| Operating Current | 20mA (typical) |
| Detection Range | 2 cm to 30 cm (depending on model) |
| Output Signal | Digital (High/Low) or Analog |
| Wavelength Sensitivity | 760 nm to 1100 nm (IR spectrum) |
| Response Time | < 2 ms |
| Operating Temperature | -25°C to 85°C |
Below is the typical pin configuration for a 3-pin IR sensor module:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply pin (3.3V to 5V) |
| 2 | GND | Ground connection |
| 3 | OUT | Output pin (Digital or Analog signal, depending on model) |
Below is an example of how to use the Sensor Infrarrojo with an Arduino UNO to detect motion and turn on an LED:
// Define the pin connections
const int irSensorPin = 2; // IR sensor output connected to digital pin 2
const int ledPin = 13; // Built-in LED on Arduino UNO
void setup() {
pinMode(irSensorPin, INPUT); // Set IR sensor pin as input
pinMode(ledPin, OUTPUT); // Set LED pin as output
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int sensorValue = digitalRead(irSensorPin); // Read the IR sensor output
if (sensorValue == HIGH) { // If an object is detected
digitalWrite(ledPin, HIGH); // Turn on the LED
Serial.println("Object detected!"); // Print message to serial monitor
} else {
digitalWrite(ledPin, LOW); // Turn off the LED
Serial.println("No object detected."); // Print message to serial monitor
}
delay(100); // Small delay for stability
}
Sensor Not Detecting Objects
False Positives
Output Signal Not Changing
Multiple Sensors Interfering
Q: Can the Sensor Infrarrojo detect transparent objects?
A: Transparent objects, such as glass, may not reflect enough IR radiation for detection. Use a specialized sensor for such applications.
Q: How do I increase the detection range?
A: Adjust the potentiometer (if available) or use a lens to focus the IR beam. Note that increasing the range may reduce accuracy.
Q: Can I use the sensor outdoors?
A: While possible, outdoor use may result in reduced performance due to sunlight and environmental factors. Consider using an IR sensor with ambient light filtering.
Q: Is the sensor compatible with 3.3V microcontrollers?
A: Yes, most IR sensors operate within a 3.3V to 5V range, making them compatible with 3.3V microcontrollers like the ESP32. Always verify the specific model's datasheet.