An infrared sensor is a module, used for either detecting or emitting IR radiation of certain physical appearance of its surroundings, and also it detects motion & decides the amount of heat generated through an object. There are many IR sensors available in the market, from them, E18-D80NK is an adjustable IR sensor that requires a modulated infrared signal to detect the objects. This article provides brief information on E18-D80NK Adjustable Infrared Sensor, pin configuration, circuit, and working with applications.
What is E18-D80NK Adjustable Infrared Sensor?
The E18-D80NK is an adjustable IR sensor switch with a set of transmitters & receivers within a single module. The detection range of this infrared sensor is 3 to 80cm. The detection distance can be adjusted based on the requirement. This sensor is small, economical, and simple to assemble & use. This IR sensor is extensively used in robots for obstacle avoidance, interactive media, industrial assembly lines, etc.
This sensor includes a bright light to detect the distance. The output of this sensor changes in accordance with the obstacles. This sensor output is high when there are no obstacles & the output is low when there are obstacles.
This adjustable IR sensor was mainly designed to automate the object counting of those moving along a production line, however, it works well when it is used where object detection or obstacles in its range is required like for a security system, on a robotic vehicle, or pet door monitoring.
This sensor has a multi-turn screw on the back side that is used to adjust the detection range by turning them. This module operates at 5V and current draw is normally 5mA and the maximum current drawn is 25mA.
This sensor cannot be placed in sun-rays because the sun also produces infrared waves. To overcome this, the IR signal needs to modulate so that this IR sensor detects an IR difference instead of a fixed infrared level. This used to protect the sensor from obstructions caused by sunlight or a typical light bulb. This is the reason why a input signal should be modulated before being fed to the IR sensor.
Working
E18-D80NK adjustable infrared sensor includes a transmitter & receiver within a single module arrangement. The transmitter in this module emits a modulated infrared signal that is reflected through the object in its field. After that, the reflected signal is collected through the receiver to provide a digital output to any microcontroller. This module uses modulation from the IR light & the receiver part of this module detects only the IR light once it receives the exact signal.
Pin Configuration:
The pin configuration of the E18-D80NK adjustable infrared sensor is shown below. This sensor includes three output wires which are available in different colors. So each wire and its function are discussed below.
- Pin1 (Red Color Wire): It is a VCC which means +5V voltage input.
- Pin2 (Green Color Wire): It is a GND pin or Ground terminal.
- Pin3 (Yellow Color Wire): It is a digital pin or signal output.
In the E18-D80NK adjustable infrared sensor, the three wires’ general color coding may differ based on the manufacturer or distributor. So, some other sensor wires’ common color code is: brown color wire is VCC, black color wire indicates output & blue color wire indicates ground.
Features & Specifications:
The features and specifications of the E18-D80NK adjustable infrared sensor include the following.
- The type of sensor is diffusely reflective.
- This adjustable infrared sensor is very simple to set up & use.
- Its detection range is from 3 to 80cm.
- Its detection range is completely adjustable.
- Response time is below 2ms.
- Once the object is detected, it indicates with simple logic & LED output.
- It operates with 5V.
- An optional mounting bracket is available.
- Its size is small.
- It has a low influence on the reflected objects’ color & reflectivity.
- Its quality is Industrial grade.
- It detects color variation from a certain range.
- It doesn’t need external control circuit.
- It is economical.
- Infrared light source.
- Current consumption is 300mA.
- The length of the cable is 1 meter.
- The shipment weight is 0.04 kg.
- Shipment dimensions are 8 × 7 × 4 cm.
- Alternative E18-D80NK adjustable infrared sensors are; GY 906, ISB TS45D, GP2Y0A21YK0F,TCRT5000 and QRE1113.
E18-D80NK Adjustable Infrared Sensor Interfacing with Arduino Nano
The E18-D80NK adjustable infrared sensor interfacing with Arduino Nano is shown below. This is used to detect obstacles in the range of 3 cm to 80 cm. The required components for E18-D80NK interfacing include a breadboard, Arduino nano, e18-d80nk IR sensor, LED, and jumper wires.
The connections of this interfacing follow as;
- Connect the brown color wire of this IR sensor is connected to the 5V pin of the Arduino nano board.
- Connect the blue color wire of this IR sensor is connected to the GND pin of Arduino.
- Connect the black color wire of this IR sensor is connected to Arduino Nano’s digital pin 7.
- The Red LED is connected to data pins D2 and GND. Connect the circuit as per the diagram shown above.
Arduino Code for E18-D80NK IR Sensor
The code for E18-D80NK IR Sensor interfacing with Arduino Nano is shown below.
const int e18_sensor = 7;
const int led = 2;
void setup() {
Serial.begin(9600);
pinMode (e18_sensor, INPUT);
pinMode (led, INPUT);
}
void loop() {
int state = digitalRead(e18_sensor);
Serial.println(state);
if(state==LOW){
Serial.println(“Object Detected”);
digitalWrite(led, HIGH);
}
else {
Serial.println(“All Clear”);
digitalWrite(led, LOW);
}
delay(1000);
}
The above code explanation follows:
- Start the above code by simply defining all the required pins to read the IR sensor data & also control the Red LED.
- After that in the setup() function, begin the serial monitor at a 9600 baud rate for debugging purposes. In addition, set the IR sensor pin as input & the LED pin as output.
- In the loop() function, read the sensor pin with digitalRead(). If the pin condition is LOW then turn ON the Red LED else turn off the Red LED.
Once the code & hardware are set, Arduino must connect to the laptop & upload the above code. Once the code is uploaded, need to open the serial monitor at a 9600 baud rate. After that, make some motion ahead of the IR sensor and notice the LED & serial monitor.
Applications
The uses or applications of the E18-D80NK adjustable infrared sensor are discussed below.
- The E18-D80NK adjustable infrared sensor is used extensively in a robot for avoiding obstacles, industrial assembly lines, interactive media, etc.
- It is used in robots for collision avoidance.
- It is used for object detection and machine automation.
- It is used in reverse car parking.
- These are normally used in intruder alarms, light switches, industrial automation & home automation applications.
Please refer to this link for E18-D80NK adjustable infrared sensor datasheet.
Thus, this is an overview of the E18-D80NK adjustable infrared sensor. This is a non-contact detection type sensor that provides a digital output once any object comes into a particular range of it. It is economical and very easy to assemble with very small interference with the nearby lights and surroundings. This sensor module can be easily adjusted to detect objects above the 3 to 80cm range. Here is a question for you, what is a proximity sensor?