Introduction
The laser photoelectric switch is a photoelectric switch that is composed of emitter and receptor.The emitter consists of a laser diode,and the laser has the characteristics of high precision, good orientation etc.The receptor consists of a photoelectric element.When receiving the laser pulse, the built-in light conducting.The emitter and receptor can assemble a detector. It can be directly compatible with Arduino to develop related products .Of course,it is also very suitable for photoelectric counting, security, ultra-high vehicle overrun detection etc.
Specifications
- Model: GAB100M-AK
- Output:NPN NO
- Lasers safety class: 3R
- Voltage: 5V DC
- Power(Emitter): 30mW
- Frequency: 300Hz
- Pointing Angle: 3°
- Corresponding Time: < 5ms
- Detection Range: 65m
- Working temperature: -20- 80℃
- Working relative humility: 35~95%, RH
- Protection grade: IP66
- Size: 65*M18 (mm)
- Length of cable: about 120cm
NOTE: Class 3R are usually up to 5 mW and involve a small risk of eye damage within the time of the blink reflex. Staring into such a beam for several seconds is likely to cause damage to a spot on the retina.
Tutorial
Connection Diagram
The output pin of the laser photoelectric switch is connected to pin 10 of the Arduino board.The LED on 13 pin will reflect the state of the output pin.Try to block the laser and watch the effect. The Receptor will output high level when it detects laser signal.
Sample Code
/*!
* @file FIT0319.ino
* @brief The LED on 13 pin will reflect the state of the output pin of the laser photoelectric switch.
* @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
* @license The MIT License (MIT)
* @author YouYou from DFRobot
* @version V1.0
* @date 2013-05-17
*/
/*
Connection:
output pin(black) -- Arduino digital pin 10
VCC pin(brown) -- VCC(+5V)
GND pin(blue) -- GND(0V)
*/
int led = 13;
int laserOut = 10;
void setup()
{
pinMode(led,OUTPUT);
pinMode(laserOut,INPUT);
}
void loop()
{
digitalWrite(led,digitalRead(laserOut));
}
FAQ
Q&A | Some general Arduino Problems/FAQ/Tips |
---|---|
A | For any questions, advice or cool ideas to share, please visit the DFRobot Forum. |