Maker Pro

Interfacing IR Obstacle Avoidance Sensor with arduino

October 27, 2021 by rasika Joshi

In this project, we are using E18-D80NK IR Proximity Sensor which we will interface with Arduino.

The E18-D80NK is an IR Proximity Sensor with an obstacle detection range approx 3 cm to 80 cm. The utilization of modulated IR signal prevents the sensor from the interferences caused by the normal light of the sunlight.

E18-D80 IR Sensor is generally utilized in robots to avoid obstacles. The detection range can be adjusted as per the application with the help of the multi-turn screw that is placed at the back of the sensor.

For the connection of Interfacing of E18-D80NK IR Sensor with Arduino, attach the Brown wire of sensor with Arduino 5V pin, attach the Blue wire of sensor with Arduino’s Ground and attach Black pin of a sensor with a digital pin 7 of Arduino Nano.

E18 D80NK proximity sensor.jpg
const int e18_sensor = 7;
const int led = 2;
void setup() {
  pinMode (e18_sensor, INPUT);
  pinMode (led, INPUT);
void loop() {
  int state = digitalRead(e18_sensor);
  Serial.println("Object Detected"); 
  digitalWrite(led, HIGH);
  else {
  Serial.println("All Clear"); 
  digitalWrite(led, LOW);

Learn more about various Industrial IoT Solutions

Related Content


You May Also Like