Light Blocking Module KY-010

SKU: FA3047
Module Model

KY-010

Sensor Type

Slotted optical interrupter (IR LED + phototransistor)

Output Type

Digital (HIGH/LOW)

Operating Voltage

3.3V – 5V DC

Slot Width

Approximately 5mm

Indication

LED indicator

Pin Count

3 pins (VCC, GND, OUT)

Module Dimensions

Compact PCB with mounting holes

The KY-010 Light Blocking Module is a compact, low-cost optical sensor board designed for Arduino, ESP32, Raspberry Pi, STM32, and other microcontroller projects. It uses an infrared emitter and phototransistor pair arranged in a slotted optical interrupter configuration. When an object passes through the slot and blocks the infrared beam, the module detects the interruption and provides a digital output — making it an ideal solution for object detection, counting, edge sensing, position feedback, and speed measurement in automation, robotics, and interactive electronics.

At the heart of the module is a slotted optical switch consisting of an infrared LED on one side of the slot and a phototransistor on the other. In normal operation, the IR beam passes through the slot and strikes the phototransistor, keeping the output in one state. When an object (such as a gear tooth, paper edge, or rotating disc with slots) passes through the slot and blocks the beam, the phototransistor stops conducting, and the output switches state. This broken-beam detection is highly reliable and repeatable, making it suitable for precise counting and position sensing.

The module includes signal conditioning circuitry that converts the phototransistor’s state into a clean digital output compatible with microcontroller logic levels. The output is typically LOW when the beam is blocked and HIGH when the beam is uninterrupted (depending on the module variant). An LED indicator provides visual feedback when the beam is blocked, making it easy to verify operation during setup and troubleshooting.

The module features a 3-pin interface (VCC, GND, OUT) for easy connection to microcontrollers. The OUT pin can be connected directly to a digital input or interrupt pin, allowing you to count objects, detect edges, or measure speed. The compact form factor with mounting holes allows easy integration into 3D printers, CNC machines, conveyor systems, and custom projects.

The KY-010 operates from a 3.3V to 5V DC supply, making it compatible with both modern low-power microcontrollers and traditional 5V systems. The low power consumption makes it suitable for battery-powered sensing projects.

The KY-010 is widely used in object counting, edge detection, position sensing, speed measurement, 3D printer endstops, CNC limit switches, conveyor belt monitoring, paper detection, anti-theft devices, and educational STEM projects. It is also popular in DIY electronics and maker projects where non-contact object detection is required.

Important Note: The KY-010 is a slotted optical interrupter — the object must physically pass through the slot to block the beam. It is not a reflective sensor and cannot detect objects that do not pass through the slot. The slot width is typically 5mm, limiting detection to objects that fit within this gap. The module is not waterproof and should be kept dry. For best results, ensure the object is opaque and completely blocks the beam when passing through.

Whether you are building a 3D printer endstop, an object counter, or a speed measurement system, the KY-010 Light Blocking Module provides a reliable, affordable solution for broken-beam detection. It is suitable for individual makers, students, and businesses purchasing in bulk for product development or educational programs.

Features

  • Slotted optical interrupter — Infrared emitter and phototransistor for broken-beam detection

  • Digital output — Clean HIGH/LOW signal for easy MCU integration

  • Interrupt-friendly output — Suitable for counting, position sensing, and speed measurement

  • LED indicator — Visual feedback when beam is blocked

  • Wide voltage range — 3.3V to 5V DC, compatible with Arduino, ESP32, Raspberry Pi

  • Low power consumption — Suitable for battery-powered applications

  • Compact form factor — With mounting holes for easy integration

  • Simple interface — 3-pin connection (VCC, GND, OUT)

  • Wide application range — Object counting, edge detection, endstops, speed measurement

  • Cost-effective — Affordable solution for optical detection in volume production

Technical Specifications 

# Parameter Specification
1 Module Model KY-010
2 Sensor Type Slotted optical interrupter (IR LED + phototransistor)
3 Output Type Digital (HIGH/LOW)
4 Operating Voltage 3.3V – 5V DC
5 Slot Width Approximately 5mm
6 Indication LED indicator
7 Pin Count 3 pins (VCC, GND, OUT)
8 Module Dimensions Compact PCB with mounting holes

Usage

Getting Started

  1. Connect power — Supply 3.3V or 5V DC to the VCC pin and GND to ground.

  2. Connect the output — Connect the OUT pin to a digital input or interrupt pin on your microcontroller (e.g., D2 on Arduino).

  3. Mount the module — Position the module so the object to be detected passes through the slot. Ensure the object completely blocks the beam when passing through.

  4. Upload a test sketch — Read the digital output and observe the state change when an object passes through the slot.

  5. Implement control logic — Use the output to count objects, detect edges, or measure speed.

Pin Connections

Module Pin Function
VCC Power (3.3V–5V)
GND Ground
OUT Digital output (switches when beam is blocked)

Output Logic (Typical)

Condition Output State
Beam blocked LOW (or HIGH, depending on variant)
Beam uninterrupted HIGH (or LOW, depending on variant)

Example Arduino Code (Object Counting)

cpp
#define SLOT_PIN 2

volatile int objectCount = 0;

void setup() {
  Serial.begin(9600);
  pinMode(SLOT_PIN, INPUT_PULLUP);
  attachInterrupt(digitalPinToInterrupt(SLOT_PIN), countObject, FALLING);
}

void countObject() {
  objectCount++;
}

void loop() {
  if (objectCount > 0) {
    Serial.print("Objects counted: ");
    Serial.println(objectCount);
    objectCount = 0;
  }
  delay(100);
}

Typical Applications

  • Object counting — Count items on a conveyor belt or production line

  • Edge detection — Detect the edge of paper, film, or other materials

  • Position sensing — Detect the position of a moving carriage or arm

  • Speed measurement — Measure RPM or linear speed using a slotted disc

  • 3D printer endstops — Detect the end of travel for printer axes

  • CNC limit switches — Detect axis limits for CNC machines

  • Paper detection — Detect paper presence in printers and copiers

  • Anti-theft devices — Detect the interruption of a light beam

  • Educational STEM projects — Teaching optical sensing and interrupt handling

Notes for Business Buyers

  • Slotted design — Object must pass through the slot to block the beam.

  • Simple interface — Single digital output connects directly to any microcontroller.

  • Low power — Suitable for battery-powered object detection.

  • Suitable for bulk purchasing — Ideal for 3D printer manufacturers, automation integrators, and educational institutions.

Q: What is the KY-010 Light Blocking Module used for?

It is a slotted optical interrupter for detecting objects that pass through the slot, used in object counting, edge detection, endstops, and speed measurement.

Q: How does the sensor work?

The module uses an infrared LED and phototransistor arranged across a slot. When an object passes through the slot and blocks the beam, the phototransistor stops conducting, and the output switches state.

Q: What voltage does the module require?

It operates from 3.3V to 5V DC, making it compatible with Arduino, ESP32, Raspberry Pi, and other microcontrollers.

Q: What is the slot width?

The slot width is approximately 5mm, limiting detection to objects that fit within this gap.

Q: Can the sensor detect reflective objects?

No. The KY-010 is a slotted interrupter — the object must physically pass through the slot to block the beam. It is not a reflective sensor.

Q: What is the output logic?

The OUT pin switches state when the beam is blocked. The resting state is typically HIGH (or LOW, depending on variant).

Q: Can I use this module with an Arduino?

Yes. Connect VCC to 5V, GND to GND, and OUT to a digital pin (e.g., D2). Use digitalRead() or an interrupt to detect objects.

Q: Can I use this module for speed measurement?

Yes. Attach a slotted disc to a rotating shaft and count the pulses as the slots pass through the beam. Use the formula: RPM = (Pulses per second / Slots per revolution) × 60.

Q: Is the module waterproof?

No. The module is not waterproof and should be kept dry.

Q: Can I purchase in bulk for a product development project?

Yes. This module is suitable for both individual users and business purchasing, including 3D printer manufacturers, automation integrators, and educational institutions.