E18-D80NK Infrared Photoelectric Switch Sensor

From Wiki
Revision as of 10:03, 12 September 2019 by Root (Talk | contribs) (Experimental Procedures for Arduino)

Jump to: navigation, search

Introduction

E18-D80NK.jpg
This product, photoelectric sensor integrates emitting and receiving and its detection distance is adjustable. The sensor can detect very long distance free from the interruption of visible light. Owing to the advantages on price, assembly and operation, it is widely applied in so much automatic work, like obstacle avoidance of robot and piecework on assembly line.

Main Features

  1. Photosensitive Sensor (photoelectric switch) NPN always on;
  2. Type: E18-D80NK;
  3. Input Voltage: 5VDC;
  4. Load Current: 100mA;
  5. Sensing Distance: Around 80CM;
  6. Diameter: 18MM;
  7. Sensor Length: 45MM;
  8. Lead Length: 45CM.

Introduction of Pins

Pin Introduction
Blue GND
Brown VCC
Black OUT

Working Principle

Emitter constantly emits Infra-red Lights to the detected objects. The receiver turns the reflected rays from the detected objects (light energy) into current and transmit it to the back integrated circuit. Then the current is output via the amplifier after being processed by IC. At the rear of the sensor, there is a potentiometer to help adjust the detection distance. When the head of Sensor moves and passes the specified distance detection, LED of Sensor is lit up, and at the same time, the sensor outputs low level signal.
E18-D80NK parts.png
File:Schematic diagram.png

Experimental Procedures for Arduino

Step 1: Connect the circuit:

E18-D80NK Uno Board
Black D2
Brown VCC
Blue GND

<pro> const int e18Pin = 2; int statusVal = 0; void setup() {

 // put your setup code here, to run once:
 pinMode(e18Pin,INPUT);
 Serial.begin(9600);

}

void loop() {

 // put your main code here, to run repeatedly:
 statusVal = digitalRead(e18Pin);
 if(statusVal == LOW){
   Serial.println("Collision Detected.");
 }else{
   Serial.println("No Collision Detected.");
 }

}

<pro>