The IR Infrared Sensor is a circuit composed of an IR emitter and an IR receiver, plus the LM393 comparator IC, which facilitates its connection with Arduino, PIC or Raspberry Pi, since its voltage is 3.3-5V.
Its operation is simple: when a reflective obstacle (white color) is placed in front of the IR Infrared Sensor, the infrared signal is reflected to the receiver. When this happens, the OUT output pin is set to low level (0), and the module’s green LED is lit, indicating that some obstacle has been detected.
If the surface of the obstacle is black in color, infrared radiation is not reflected. This allows the sensor to recognize black lines on a white background (and vice versa), allowing your robot to follow that line.
The range of the sensor is from 2 to 80 cm, which can be adjusted by a potentiometer on the plate. The IR Infrared or Obstacle Sensor is a great component for use in robots, counters, alarms, and other projects with the Arduino.
Specifications:
• IR obstacle sensor;
• Operating voltage: 3.3 to 5V DC;
• IR emitter and receiver;
• Detection distance: 2 to 80 cm;
• Potentiometer for distance adjustment;
• Dimensions: 37 x 14 x 6 mm.
Schema Example:
*In the gallery*
In practice:
// IR Obstacle Collision Detection Module int LED = 13; // Use the onboard Uno LED int isObstaclePin = 7; // This is our input pin int isObstacle = HIGH; // HIGH MEANS NO OBSTACLE void setup() { pinMode(LED, OUTPUT); pinMode(isObstaclePin, INPUT); Serial.begin(9600); } void loop() { isObstacle = digitalRead(isObstaclePin); if (isObstacle == LOW) { Serial.println("OBSTACLE!!, OBSTACLE!!"); digitalWrite(LED, HIGH); } else { Serial.println("clear"); digitalWrite(LED, LOW); } delay(200); }
Reviews
Clear filtersThere are no reviews yet.