ESP32 KY-010 Photo Interrupter Module

KY-010 Photo Interrupter Module image

KY-010

Protocol: Digital

Overview

The KY-010 is a photo interrupter module that detects objects by sensing interruptions in an infrared beam. It's ideal for applications requiring non-contact object detection, such as counting or speed measurement.

About KY-010 Photo Interrupter Module

The KY-010 Photo Interrupter Module is a digital sensor that detects the presence or absence of an object within its slot. It consists of an infrared emitter and receiver facing each other, forming a light barrier. When an object passes through the slot, it interrupts the infrared beam, causing a change in the output signal. This module operates at a voltage range of 3.3V to 5V, making it compatible with various microcontrollers such as Arduino and ESP32. It’s commonly used in applications like object counting, edge detection, and motor speed measurement.

Where to Buy

KY-010 Photo Interrupter Module

Starting from

1$ per unit

Amazon com
Amazon.com Ships worldwide
View Price
Amazon de
Amazon.de Ships to EU
View Price
Aliexpress
AliExpress Best value
View Price

Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.

Technical Specifications

Operating Voltage 3.3V - 5V
Slot Width 5 mm
Output Type Digital
Dimensions 19 mm x 15 mm

Pinout Configuration

The VCC pin is used to supply power to the sensor, and it typically requires 3.3V or 5V (refer to the datasheet for specific voltage requirements). The GND pin is the ground connection and must be connected to the ground of your ESP32.

  • Pin (-): Ground (GND).
  • Pin (+): Power supply (VCC), typically 3.3V or 5V.
  • Pin (S): Digital output signal.

Wiring with ESP32

  • KY-010 Pin (-): Connect to ESP32 GND.
  • KY-010 Pin (+): Connect to ESP32 3.3V or 5V.
  • KY-010 Pin (S): Connect to a digital GPIO pin on ESP32 (e.g., GPIO15).

Troubleshooting Guide

Common Issues

❌ No Signal Detection

⚠️ False Triggering

Debugging Tips

🔍 Serial Monitor

⚡ Voltage Checks

Code Examples

Arduino Example

C++
🔧

ESP-IDF Example

C++
🏠

ESPHome Example

YAML
🛠️

PlatformIO Example

C++
🐍

MicroPython Example

Python

Conclusion

The ESP32 KY-010 Photo Interrupter Module is a powerful KY-0xx module sensor that offers excellent performance and reliability. With support for multiple development platforms including Arduino, ESP-IDF, ESPHome, PlatformIO, and MicroPython, it's a versatile choice for your IoT projects.

For optimal performance, ensure proper wiring and follow the recommended configuration for your chosen development platform.

Always verify power supply requirements and pin connections before powering up your project to avoid potential damage.