The Keystudio Obstacle Avoidance IR sensor module is a compact and efficient device designed to detect obstacles using infrared (IR) light. It emits IR light and measures the reflected signal to determine the presence of nearby objects. This module is widely used in robotics, automation, and other applications requiring object detection and navigation.
The following table outlines the key technical details of the Keystudio Obstacle Avoidance IR sensor module:
Parameter | Value |
---|---|
Operating Voltage | 3.3V to 5V |
Operating Current | ≤ 20mA |
Detection Range | 2cm to 30cm (adjustable) |
Detection Angle | ≤ 35° |
Output Type | Digital (High/Low) |
Dimensions | 3.1cm x 1.5cm x 0.7cm |
Weight | ~3g |
The Keystudio Obstacle Avoidance IR sensor module has a 3-pin interface. The pin configuration is as follows:
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 | Digital output pin. Outputs HIGH (1) when no obstacle is detected, and LOW (0) when an obstacle 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 (e.g., Arduino UNO).Below is an example code snippet to use the Keystudio Obstacle Avoidance IR sensor with an Arduino UNO:
// Define the pin connected to the sensor's OUT pin
const int sensorPin = 2; // Digital pin 2
const int ledPin = 13; // Built-in LED on Arduino UNO
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 == LOW) {
// Obstacle detected
digitalWrite(ledPin, HIGH); // Turn on the LED
Serial.println("Obstacle detected!");
} else {
// No obstacle
digitalWrite(ledPin, LOW); // Turn off the LED
Serial.println("No obstacle.");
}
delay(100); // Small delay for stability
}
The sensor is not detecting obstacles:
VCC
and GND
pins are connected properly.False detections or erratic behavior:
The onboard LED does not light up:
Q: Can this sensor detect transparent objects?
A: No, the sensor may not reliably detect transparent or highly reflective objects due to the way IR light is reflected.
Q: Can I use this sensor with a 3.3V microcontroller?
A: Yes, the sensor operates within a voltage range of 3.3V to 5V, making it compatible with 3.3V microcontrollers.
Q: How do I increase the detection range?
A: Use the onboard potentiometer to adjust the detection range. Turn it clockwise to increase the range.
Q: Can I use multiple sensors in the same project?
A: Yes, you can use multiple sensors, but ensure they are positioned to avoid interference between their IR signals.
This concludes the documentation for the Keystudio Obstacle Avoidance IR sensor module.