
This circuit uses an IR sensor to control a 1 Channel 5V Relay Module, which is powered by a 9V battery. The IR sensor detects an object and sends a signal to the relay module to switch its state, enabling or disabling the connected load.

The IR Sensor Module is a versatile electronic component designed to detect infrared radiation. It is commonly used for proximity sensing, object detection, and line-following applications. The module consists of an infrared emitter (IR LED) and a photodetector (such as a photodiode or phototransistor) that work together to detect the presence of objects based on the reflection of infrared light.

This circuit uses an IR sensor to control a 1 Channel 5V Relay Module, which is powered by a 9V battery. The IR sensor detects an object and sends a signal to the relay module to switch its state, enabling or disabling the connected load.

This circuit uses an IR sensor to control a relay module, which in turn switches a 12V blue LED on and off. The IR sensor output is connected to the signal input of the relay, enabling the sensor to activate the relay. The relay's normally closed (NC) contact is connected to the LED, allowing the LED to be powered by a 9V battery when the relay is not activated by the IR sensor.

This is a sensor-rich IoT circuit designed for environmental monitoring, featuring an ESP8266 NodeMCU for data processing and Wi-Fi connectivity, a GPS for location tracking, a SIM800L module for GSM communication, and various sensors (IR, pH, turbidity) for measuring environmental parameters. An ESP32-CAM module adds image capture capabilities, and the system is powered by an 18650 Li-Ion battery.

This circuit features an ESP32 microcontroller as the central processing unit, interfacing with a variety of sensors and modules. It includes an IR sensor for detecting infrared signals, a GPS NEO 6M module for location tracking, a PH Meter and a Turbidity Module for water quality measurement, and a SIM900A module for cellular communication. The ESP32 is powered by an 18650 Li-Ion battery, and it communicates with the GPS, SIM900A, and ESP32-CAM modules via serial connections. Ground and power connections are distributed among all components to ensure a common reference point and proper power supply.
Below are the key technical details of a typical IR Sensor Module:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V to 5V |
| Operating Current | 20mA (typical) |
| Detection Range | 2cm to 30cm (adjustable) |
| Output Type | Digital (High/Low) or Analog |
| IR Wavelength | 940nm (typical) |
| Dimensions | ~3cm x 1.5cm x 1cm |
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply pin. Connect to 3.3V or 5V. |
| 2 | GND | Ground pin. Connect to the ground of the circuit. |
| 3 | OUT | Output pin. Provides a digital signal (HIGH or LOW) or analog voltage based on the detection. |
VCC pin to a 3.3V or 5V power source and the GND pin to the ground.OUT pin to read the sensor's output. This can be connected to a microcontroller (e.g., Arduino) or directly to an LED or buzzer for simple applications.Below is an example of how to connect and use the IR Sensor Module with an Arduino UNO:
VCC → 5V on ArduinoGND → GND on ArduinoOUT → Digital Pin 2 on Arduino// IR Sensor Module Example with Arduino UNO
// This code reads the digital output of the IR sensor and turns on an LED
// when an object is detected.
const int irSensorPin = 2; // IR sensor output pin connected to digital pin 2
const int ledPin = 13; // Onboard LED pin
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 for debugging
}
void loop() {
int sensorValue = digitalRead(irSensorPin); // Read the IR sensor output
if (sensorValue == LOW) {
// Object detected (LOW signal indicates detection)
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
}
The sensor is not detecting objects:
VCC and GND connections are correct.False detections in bright environments:
Output signal is unstable:
The detection range is too short:
Q: Can the IR Sensor Module detect transparent objects?
A: Transparent objects, such as glass, may not reflect enough infrared light for detection. Use specialized sensors for such applications.
Q: How do I know if the sensor is working?
A: Most IR Sensor Modules have an onboard LED that lights up when an object is detected. You can also verify the output using a multimeter or microcontroller.
Q: Can I use the IR Sensor Module with a 3.3V microcontroller?
A: Yes, the module is compatible with both 3.3V and 5V systems. Ensure the VCC pin is connected to the appropriate voltage.
Q: What is the maximum detection range of the module?
A: The detection range is typically adjustable between 2cm and 30cm, depending on the module and environmental conditions.