0% found this document useful (0 votes)
6 views3 pages

Optical Broken Module

The Photo-Interrupter Module is an optical device consisting of an infrared LED and a photo transistor that detects interruptions in light. It operates at 5V, has a 3-pin configuration, and is compact in size. An example code is provided to demonstrate its functionality by lighting an LED when an object interrupts the light path.

Uploaded by

pacho_1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Optical Broken Module

The Photo-Interrupter Module is an optical device consisting of an infrared LED and a photo transistor that detects interruptions in light. It operates at 5V, has a 3-pin configuration, and is compact in size. An example code is provided to demonstrate its functionality by lighting an LED when an object interrupts the light path.

Uploaded by

pacho_1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Photo-Interrupter Module

DESCRIPTION:
Photo-interrupter, also called optical broken module, is a device that is made up of an
infrared led and a photo transistor with a gap between the two of them. When
something is placed between the gap, the light is cut and the current flow through the
photo transistor is reduced or stopped.

Specification:
● Operation voltage: 5V
● 3Pin
● Size:23.5*14.5mm
● Weight: 1.265g

PIN CONFIGURATION:
1/3
1、 “-”: GND
2、 “+” : +5V
3、 “S” : Signal pin

Example:

In this example, connect the circuit as below, upload the sketch, then put
something between this module, the LED13 will light on.

Code:
int Led=13;
int sensor=3;
int val;
void setup()
{
pinMode(Led,OUTPUT);
pinMode(sensor,INPUT);
}
void loop()

2/3
{
val=digitalRead(sensor);
if(val==HIGH)
{
digitalWrite(Led,HIGH);
}
else
{
digitalWrite(Led,LOW);
}

3/3

You might also like