IR proximity sensor interfacing with Arduino in proteus

IR proximity sensor interfacing with Arduino in proteus

In this article we will learn how to interface arduino with IR proximity sensor and LCD in proteus.
In the last post we will learn how to interface arduino with moisture sensor and LCD display in proteus simulation. You can visit our website,
I hope you appreciate my work, let’s discuss about today’s project.

What is IR proximity sensor?

 

 

Components which we use in this project are listed below:

  1. IR proximity sensor
  2. Arduino nano
  3. Capacitor (100uF)
  4. Inductor (27UH)
  5. Resistor variable (1K)
  6. LCD display
  7. Jumper wires

Diagram of this project is below:

IR proximity sensor interfacing with Arduino in proteus
IR proximity sensor interfacing with Arduino in proteus

Construction of IR proximity sensor interfacing with Arduino in proteus:

  • Connect Analog pin of IR proximity sensor with the one side of inductor
  • Connect the other side of inductor to the positive side of capacitor
  • Connect the –ve side of capacitor with the GND point
  • Connect the A0 pin of arduino with the junction of capacitor and inductor
  • Connect the GND point of IR proximity sensor with the GND
  • Connect the +ve point of IR proximity sensor with the +ve point through one side of Resistor
  • Connect the other point of resistor with the GND
  • Connect the test pin of IR proximity sensor with the out pin of Resistor variable
  • Connect the VSS,RW, and D3 pins of LCD with the GND through each other
  • Connect the VDD point of LCD display with the +ve point
  • Connect the D7 point of Arduino with the RS point of LCD display
  • Connect the D6 point of arduino nano with the E point of LCD display
  • Connect the D5 point of arduino with the D4 point of LCD display
  • Connect the D4 point of arduino with the D5 point of LCD display
  • Connect the D3 point of arduino with the D6 point of LCD display
  • Connect the D2 point of arduino with the D7 point of LCD display

Working of IR proximity sensor interfacing with Arduino in proteus:

Interfacing an (IR) proximity sensor with an Arduino is a common project for detecting the presence or absence of objects within a certain range. IR proximity sensors work by emitting infrared light and measuring the reflection of that light off nearby objects. When an object is detected within the sensor’s range, the sensor output changes, which can be read by the Arduino.

Applications of IR proximity sensor interfacing with Arduino in proteus:

  1. Object Detection
  2. Obstacle Avoidance
  3. Proximity Switches
  4. Object Counting

Advantages of IR proximity sensor interfacing with Arduino in proteus:

  1. Non-Contact Sensing
  2. Distance Measurement
  3. Object Detection
  4. High Speed
  5. Low Power Consumption

Program of this project is below:

#include <LiquidCrystal.h>

 

// initialize the library with the numbers of the interface pins

LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

 

int IRpin = A0;

 

void setup() {

// set up the LCD’s number of columns and rows:

lcd.begin(20, 4);

// Print a message to the LCD.

lcd.setCursor(1,0);

lcd.print(“www.projectiot”);

lcd.setCursor(4,1);

lcd.print(“microsolution”);

}

 

void loop() {

 

lcd.clear();

lcd.setCursor(1,0);

lcd.print(“Proximity_Sensor”);

lcd.setCursor(1,1);

lcd.print(“Projectiot123.com”);

float volts = analogRead(IRpin)*0.0048828125;

float distance = 65*pow(volts, -1.10);

lcd.setCursor(3,2);

lcd.print(distance);

lcd.setCursor(8,2);

lcd.print(” cm”);

delay(500);

 

//  sensorValue = analogRead(sensorPin);

//  lcd.setCursor(4,2);

//  lcd.print(sensorValue);

//  delay(1000);

 

}