The E18-D80NK Adjustable Infrared Sensor Switch 3-80cm is a set of transmitter and receiver in one of the photoelectric switch sensor. The detection distance can be adjusted according to the demand. The sensor has a detection range of 3-80cm.
The Adjustable Infrared Sensor Switch is small, easy to use, inexpensive, easy to assemble and can be widely used in a robot to avoid obstacles, interactive media, industrial assembly lines, and many other occasions.
The switching signal output differs in accordance with the obstacles. It remains high when no obstacles and remains low when there are obstacles. There is a bright light behind the probe to detect the scope of 3cm – 80cm.
Connection:
Red wire: +5V
Green wire: GND
Yellow wire: Digital output
OR
Brown wire: +5V
Blue wire: GND
Black wire: Digital output.
Specification:
- Diffuse reflective type
- Light source: Infrared
- Sensing range: 3cm to 80cm (depends on obstacle surface)
- Input voltage: 5VDC
- Current consumption: 100mA
- Dimension: 1.7cm (D) x 4.3cm (L)
- Type :DC 3 Wire NPN-NO (Normal Open)
- Sensory distance regulator and output LED indicator
- Control signal level: High2.3V≤Vin≤5V Low-0.3V≤Vin≤1.5V
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
/* E18-D80NK-Infrared-Switch by Roboticx https://roboticx.ps/learn/ */ onst int Pin=2; void setup() { pinMode(Pin, INPUT); Serial.begin(9600); } void loop() { int sensorValue = digitalRead(Pin); if(sensorValue==HIGH){ Serial.println("detect Object"); delay(1000); } else{ Serial.println("no Object"); delay(1000); } } |
Reviews
There are no reviews yet.