Skip to product information
1 of 2

Blue PCB Electronics

6D1 E18-D80NK Adjustable Infrared Sensor Switch 3-80cm Adjustable Proximity

6D1 E18-D80NK Adjustable Infrared Sensor Switch 3-80cm Adjustable Proximity

Regular price Dhs. 40.00
Regular price Sale price Dhs. 40.00
Sale Sold out
View full details


18-D80NK Infrared Obstacle Avoidance Sensor is a low-cost IR Proximity Sensor with an adjustable range of 3 cm to 80 cm. The E18-D80 sensor comes with IR Transmitter and IR receiver in one module. The IR transmitter transmits modulated IR signal, which is then reflected by the object in its path and then detected by the receiver. This sensor has less interference by sunlight because of the modulated IR light.

E18-D80NK IR Obstacle Avoidance Proximity Sensor

E18-D80 IR Sensor is widely used in robots to avoid obstacles, industrial assembly lines, Reverse Car Parking, and many other automation applications. The detection range can be adjusted according to the application using the multi-turn screw that is located at the back of the sensor. The switching signal output changes according to the obstacle detection. It remains high when no obstacles and changes to low when there are obstacles. A red LED is placed behind the probe that turns high whenever an obstacle is detected. The E18 sensor operates on 5V and consumes around 5mA to 30mA current without any load.


E18-D80NK Pinout

E18-D80NK IR Proximity Sensor Specifications & Features:

  • Input voltage: 5V DC
  • Current consumption: > 25mA (min) ~ 100mA (max)
  • Dimension: 1.7cm (diameter) x 4.5cm (length)
  • Cable length: 45cm
  • Detection of objects: Transparent or Opaque
  • Diffuse reflective type
  • Sensing range: 3cm to 80cm (depends on obstacle surface)
  • NPN output (normally high)
  • Environment temperature: -25 °C ~ 55 °C


The following circuit shows how you should connect Arduino to E18-D80NK module. Connect wires accordingly.

Step 2: Code

Upload the following code to your Arduino.

const int Pin=2;

void setup() {
    pinMode(Pin, INPUT);
void loop() {
    int sensorValue = digitalRead(Pin);
        Serial.println("detect Object");
        Serial.println("no Object");

First, we read the sensor output every second. If it is HIGH, the obstacle is detected and if it is LOW, there is no obstacle.

The Serial Monitor output is as follows. We put an obstacle in front of the sensor three times to measure its performance.