ESP32 KY-032 Infrared Obstacle Avoidance Sensor Module

KY-032 Infrared Obstacle Avoidance Sensor Module image

KY-032

Protocol: Digital

Overview

The KY-032 is an infrared obstacle avoidance sensor module that detects objects by emitting and receiving infrared light. It provides a digital output signal upon detecting an obstacle, making it suitable for applications like robotic navigation and object detection.

About KY-032 Infrared Obstacle Avoidance Sensor Module

The KY-032 Infrared Obstacle Avoidance Sensor Module is designed to detect obstacles using infrared light. It emits infrared light, which, when reflected by an obstacle, is detected by a photodiode. The module outputs a digital signal indicating the presence or absence of an obstacle. This sensor is commonly used in robotics for obstacle detection and avoidance.

Where to Buy

KY-032 Infrared Obstacle Avoidance Sensor Module

Starting from

$2 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 to 5V
Detection Distance 2 cm to 20 cm
Detection Angle 35°
Current Consumption 6 mA at 5V; 10 mA at 3V
Operating Temperature -10°C to 50°C
Dimensions 41 x 17 x 11 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.

  • GND: Connects to the ground of the circuit.
  • VCC: Supplies power to the module, typically 3.3V or 5V.
  • S (Signal): Outputs a digital signal indicating obstacle detection.
  • EN (Enable): Can be used to enable or disable the sensor; by default, the sensor is always enabled.

Wiring with ESP32

  • GND: Connect to ESP32 GND.
  • VCC: Connect to ESP32 3.3V or 5V.
  • S (Signal): Connect to a digital input pin on the ESP32 (e.g., GPIO16).
  • EN (Enable): If control over enabling is desired, connect to a GPIO pin; otherwise, leave it connected to VCC or use the default jumper setting.

Troubleshooting Guide

Common Issues

❌ No Obstacle Detection

⚠️ False Positives

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-032 Infrared Obstacle Avoidance Sensor 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.