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

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

Laser Photoelectric Switch

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

// #
// # Editor     : YouYou from DFRobot
// # Date       : 17.05.2013

// # Product name: Laser Photoelectric Switch
// # Product SKU : FIT0319
// # Version     : 1.0

// # Description:
// # The LED on 13 pin will reflect the state of the output pin of the laser photoelectric switch.

// # Connection:
// #        output pin(black) -- Arduino digital pin 10
// #        VCC pin(brown) -- VCC(+5V)
// #        GND pin(blue) -- GND(0V)

int led = 13;
int laser_out = 10;
void setup()
{
   pinMode(led,OUTPUT);
   pinMode(laser_out,INPUT);
}
void loop()
{
   digitalWrite(led,digitalRead(laser_out));
}

FAQ

Q&A Some general Arduino Problems/FAQ/Tips
A For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents

DFshopping_car1.png Get The Laser Photoelectric Switch GAB100M-AK-5V from DFRobot Store or DFRobot Distributor.

Turn to the Top