Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›Photointerrupters and Slot Sensors

Component guide · Beginner · 3 min read

Photointerrupters and Slot Sensors

Wiring, Resistors and Counting Projects

By Geekobot Learning Team · Updated 29 Oct 2026

On this page
Short answerHow it worksWiring a bare sensorReady modulesTypical usesTipsTry itCommon mistakesFAQsParts and next steps
Short answer

A photointerrupter has an infrared LED and a phototransistor facing each other across a slot. When something passes through the slot, the beam is blocked and the output changes. Use it for end-stops, speed counting with a slotted disc and object counting. Power the LED through a resistor and use a pull-up on the phototransistor, or buy a ready module with an LM393.

Key specs at a glance

Types
Transmissive (slot) and reflective
Slot width
About 3 to 6 mm on common parts
LED current
10 to 20 mA with a series resistor
Output
Open-collector phototransistor or digital module
Response
Fast enough for kHz-level counting
Parts
Omron EE-SX series, Sharp GP1A, HS-S59, DFRobot modules
01

How it works

The LED lights the phototransistor across the gap. With the beam clear, the transistor conducts and the output is pulled low (or high, depending on the circuit); when an object blocks it, the output flips. See photodiodes and phototransistors for the basic physics.

02

Wiring a bare sensor

  1. 1
    Connect the LED anode through a resistor to 5 V; for 20 mA from 5 V and a 1.2 V LED, use about 180 to 220 Ω (use the LED resistor tool).
  2. 2
    Connect the LED cathode to ground.
  3. 3
    Connect the phototransistor collector to the input pin with a 10 kΩ pull-up to the logic voltage.
  4. 4
    Connect the emitter to ground.
  5. 5
    Use a Schmitt trigger or a comparator if the edges are slow; see comparators.
03

Ready modules

Modules add an LM393 comparator and a potentiometer so you get a clean digital output with an LED indicator, and often a 3-pin header. Connect VCC, GND and OUT, then read the pin or use an interrupt. For PNP or NPN open-collector sensors with a 5 mm slot (such as the Omron EE-SX672P or the Panasonic PM-L44), check the datasheet for voltage and output type.

04

Typical uses

- End-stops for 3D printers and CNC axes. - RPM: put a slotted disc in the slot and count pulses; see encoder resolution and rotary encoders. - Object and coin counting on conveyors. - Paper or tape detection in printers. For wider gaps use a photoelectric sensor, and for presence at a distance see IR sensor modules.

05

Tips

  • ✓Mount the sensor rigidly so the slot lines up with the disc.
  • ✓Shield it from strong ambient light and sunlight.
  • ✓Debounce in software for slow-moving objects.
  • ✓Use a slot narrower than the disc slits to get sharp edges.
06

Try it: Led resistor calculator

Change the values and the diagram and results update as you type.

07

Common mistakes to avoid

  • !Connecting the LED without a resistor.
  • !Using a reflective sensor where a slot sensor is needed.
  • !Leaving the output floating with no pull-up.
  • !Mounting loosely so the disc rubs the sensor.
  • !Using it in sunlight without a shield.
08

Frequently asked questions

What is a photointerrupter?

A slot-shaped optical switch with an IR LED and phototransistor.

Which resistor for the LED?

About 180 to 220 Ω from 5 V for 15 to 20 mA.

Can I use it to measure RPM?

Yes, with a slotted disc and a pulse counter.

Active low or high?

It depends on the module. Check the datasheet or test.

Does it work in sunlight?

It can, but strong IR light may disturb it. Use a shield.

Parts for this guide

  • DFRobot Gravity Infrared Photo Interrupter 940nm Module – Digital Sensor Cable
    ₹309View
  • 5mm Infrared Slot Photoelectric Count Sensor Module – LM393 Output
    ₹77View
  • Broken Light Module – Photo Interrupter Sensor, 5V Digital Output
    ₹33View
  • HS-S59-L Slot-Type Photoelectric Sensor – 5.9mm Slot, TTL Output, PH2.0 Connector
    ₹188View
  • Omron EE-SX672P Optical Slot Sensor, Photomicrosensor, PNP Open-Collector Output, 940nm, 3kHz, 5~24 VDC, Sensing Distance 5 mm
    ₹349View
  • Panasonic SUNX PM-L44 U-Slot Type Small Photoelectric Sensor – 5mm Range, 5-24VDC, NPN Output
    ₹579View
Shop Photoelectric, Photodiode & Optocoupler Modules

Calculators

Led resistor calculatorEncoder resolution calculator

Terms in this guide

PhotointerrupterAn infrared LED and a phototransistor facing each other across a slot. An object in the slot blocks the light and changes the output.PhotodiodeA diode that produces a small current in proportion to light. Faster and more linear than an LDR, used in IR receivers and light meters.Open-collectorAn output that can only pull LOW; it needs a pull-up resistor to go HIGH. Many sensor modules and the LM393 comparator work this way.Pull-up resistorA resistor from a signal line to the supply that keeps the line high when nothing pulls it low.

Projects that use it

Put this into practice: 1 step-by-step build in our project library uses parts from this guide.

Beginner · 1 to 2 hoursGarage parking assistant with a TF-Luna LiDAR and traffic-light LEDsView project
Browse all 1 project

Keep learning

Component guideIntermediatePhotodiodes, Phototransistors and PhotointerruptersA photodiode turns light into a small current and is the fastest light sensor.3 min read · SensorsComparisonIntermediatePhotoelectric SensorsIndustrial photoelectric sensors: through-beam, retro-reflective, diffuse and background suppression types, NPN vs PNP, light-on vs dark-on, Arduino wiring.3 min read · SensorsComponent guideBeginnerIR Obstacle Sensor ModuleAn IR obstacle sensor module shines infrared light from an LED and watches for its reflection with a photodiode; when something is within about 2 to 30 cm, its OUT pin goes LOW.3 min read · SensorsComponent guideBeginnerLimit Switches and Micro SwitchesA micro switch (snap-action switch) changes state with a small, precise movement of its lever.3 min read · Switches, Relays & InputHow-toBeginnerRotary EncodersA rotary encoder is a knob that turns endlessly and outputs two square-wave signals, A and B, a quarter step apart.3 min read · Switches, Relays & InputComponent guideIntermediateOptocouplersAn optocoupler contains an LED and a light-sensitive transistor in one package with no electrical connection between them.3 min read · Semiconductors & ICs

Sources

  • Omron, Sharp and Panasonic datasheets

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerHow it worksWiring a bare sensorReady modulesTypical usesTipsTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide6 items · ₹1,535

DFRobot Gravity Infrared Photo Interrupter 940nm Module – Digital Sensor Cable · 5mm Infrared Slot Photoelectric Count Sensor Module – LM393 Output · Broken Light Module – Photo Interrupter Sensor, 5V Digital Output · HS-S59-L Slot-Type Photoelectric Sensor – 5.9mm Slot, TTL Output, PH2.0 Connector · Omron EE-SX672P Optical Slot Sensor, Photomicrosensor, PNP Open-Collector Output, 940nm, 3kHz, 5~24 VDC, Sensing Distance 5 mm · Panasonic SUNX PM-L44 U-Slot Type Small Photoelectric Sensor – 5mm Range, 5-24VDC, NPN Output

Ask the Community

Ask a question