Electronics

Encoder Light Blocking Photo Interrupter Sensor Module KY-010

AED 9.45

1

Description

 

 The KY-010 light barrier module/photo interrupter module This module has a photo interrupter circuit mounted on a breakout board. it has 3-pin module that brings its signal pin HIGH when an object blocks light from traveling between its emitter and sensor. This sensor is great for detecting the swipe of a card through a slot or other applications where detecting something opening or closing is necessary

Specifications:

  • Min/Max Operating Voltage 3.3V to 5V DC
  • Dimensions: 0.728in x 0.591in( 18.5mm x 15mm)
  • Light barrier (L x W)
    • opening
      • 2mm wide
      • 4.7mm long

 

Pinout of the Module:

The KY-010 module has three pins.

Pin Description
(-) GND
middle +5V
S Signal Out

 

Package Includes:

1 x KY-010 light barrier module

 

Example:

Connections:

Construction of a circuit with KY-010 and an LED

 

 

 

Code:

#define LASER 8
#define LED 7

void setup() {
  Serial.begin(9600);
  pinMode(LED,OUTPUT);  
  pinMode(LASER,INPUT);
}

void loop() {
  boolean active = digitalRead(LASER);
  digitalWrite(LED,active?HIGH:LOW);
}