Introduction
This digital laser proximity sensor, the advanced version of SEN0381, offers a longer sensing distance and comes with an indicator for showing real-time sensor status. Keep pressing down the on-board button for 3 seconds, then the indicator starts to flash and the detection distance can be adjusted within 1 to 400cm as per your need. The sensor can automatically detect and save the distance between it and the obstacle ahead.
In addition, the sensor features digital signal output, which works well with Arduino IO expansion board. It can be widely used in applications like smart home, house security, intelligent detection and control, robot obstacle, and so on.
The sensor is based on the principle of diffuse reflection of laser on the object. When a person or object enters the sensing range in front of the sensor, the sensor immediately determines that there is induction, so as to control to output signal; after the person or object leaves the sensing range, it will judge that there is no induction, and stop signal output, by which intelligent control can be achieved.
Specification
- Power Supply: DC5-24V
- Load Current: 300mA
- Operating Current: 15mA
- Detection Distance: adjustable within 1-400cm
- Detection Accuracy: ±4%
- Wavelength: 940nm laser emitter
- Output Mode: high and low level
- Detection Angle: 35°(transmit), 25°(receive)
- Short Circuit Protection: disable output when over 1A
- Detection Mode: active mode
- Operating Ambient Temperature: -20-70°C
- Storage Temperature: -20°-85°C
- Waterproof Performance: IP67
- Material: filter: PC optical material, housing: PC-V0 fireproof material
Pinout
Num | Label | Description |
---|---|---|
Yellow | OUT | Signal output |
Brown | VCC | Power positive 5-24V |
Blue | GND | Power negative |
Black | Floating |
Dimension Diagram
Tutorial
Requirements
- Hardware
- DFRduino UNO R3 x 1
- Digital Laser Proximity Sensor (1-400cm)
- Software
Connection Diagram
How to adjust detection distance
Keep the sensor powered on and in the normal operating status, and place a roughly 80x80cm of kraft paperboard (or other objects) in front of the sensor at 70cm. The distance adjustment steps are as shown in the diagram, enter the distance adjustment mode: hold on the adjustment button, when the red LED indicator flashes, enter the automatic distance adjustment mode; don't move the sensor and paperboard when the LED flashes, when the LED indicator stops flashing, the distance adjustment is done.
Sample Code
/*!
* @File Infrared_Approach_Sensor.ino
* @brief Detect the status of IO4 and print it in serial port
* @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
* @licence The MIT License (MIT)
* @version V1.0
* @date 2020-08-20
*/
int OUT = 4;
int i = 0;
void setup()
{
Serial.begin(9600);
pinMode(OUT, INPUT);
}
void loop()
{
i = digitalRead (OUT);
Serial.println(i);
delay(1000);
}
Achieve function: read real-time status of IO4, when the sensor detects an object, serial prints 1; when no object is detected, serial prints 0.
FAQ
For any questions, advice or cool ideas to share, please visit the DFRobot Forum.