Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO Based IR Sensor Object Detection System

View and Edit Project In Cirkit DesignerImage of Arduino UNO Based IR Sensor Object Detection System

Circuit Documentation

Summary of the Circuit

This circuit consists of an Arduino UNO microcontroller board interfaced with an infrared (IR) sensor. The IR sensor is used to detect the presence of an object within its range. The Arduino UNO reads the output from the IR sensor and sends a serial message indicating whether an object is detected or not. The IR sensor is powered by the 5V supply from the Arduino and is grounded to the Arduino's ground (GND). The output of the IR sensor is connected to the digital pin D6 of the Arduino UNO.

Component List

Arduino UNO

IR Sensor

Wiring Details

Arduino UNO

IR Sensor

Documented Code

The following code is written for the Arduino UNO microcontroller to interact with the IR sensor:

void setup() 
{
  Serial.begin(9600);
  pinMode(6, INPUT);
  Serial.println("Serial Working");
}

void loop() 
{
  int ss = digitalRead(6);
  if (ss == LOW)
  {
    Serial.println("Object Detected");
  }
  else
  {
    Serial.println("Object Not Detected");
  }
}

Code Explanation

This code allows the Arduino UNO to provide immediate feedback on the status of object detection via the IR sensor.