Get help on your project, we are training digital electronics and Arduino (free)

Click here to register
NovaTech Engineerics
Light Blocking sensor module
Availability: In Stock
Condition: New
10 in stock
Will be calculated after you select all properties
Buy Now

The KY-010 Photo Interrupter module consists of an optical emitter/detector in the front and two resistors (1 kΩ and 33 Ω) in the back. The sensor uses a beam of light between de emitter an detector to check if the path between both is being blocked by an opaque object.

Operating Voltage3.3 ~ 5V
Dimensions 18.5mm x 15mm [0.728in x 0.591in]

KY-010 Connection Diagram

Connect the power line (middle) and ground (left) to +5V and GND respectively. Connect signal (S) to pin 3 on the Arduino.

- (left)GND
S (right)Pin 3
Arduino KY-010 connection diagramclick to enlarge

KY-010 Example Code

The following sketch will light up the LED (pin 13) on the Arduino when there's an object blocking the beam of light between the sensor's gap.

int Led = 13; // define LED pin
int buttonpin = 3; // define photo interrupter signal pin
int val; //define a numeric variable

void setup()
	pinMode(Led, OUTPUT); // LED pin as output
	pinMode(buttonpin, INPUT); //photo interrupter pin as input

void loop()
	val=digitalRead(buttonpin); //read the value of the sensor 
	if(val == HIGH) // turn on LED when sensor is blocked 

Technical Details:

Seller SKU: 69
Minimum order quantity: 1
Date first listed on Novatech: Aug 28, 2020

No reviews