ESP32 KY-011 Two-Color LED Module

KY-011 Two-Color LED Module image

KY-011

Protocol: Digital

Overview

The KY-011 is a two-color LED module featuring a common cathode 3mm LED capable of emitting red and green light. By adjusting the intensity of each color using PWM, various colors can be achieved. It's ideal for visual feedback in electronic projects.

About KY-011 Two-Color LED Module

The KY-011 Two-Color LED Module features a 3mm common cathode LED capable of emitting red and green light. By adjusting the intensity of each color using PWM, various colors can be achieved. The module operates at a forward voltage between 2.0V and 2.5V with a typical forward current of 20mA. It’s compatible with microcontrollers like Arduino and ESP32, making it suitable for visual feedback in projects.

Where to Buy

KY-011 Two-Color LED 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

Forward Voltage 2.0V - 2.5V
Forward Current 20mA
LED Diameter 3mm
Colors Red and Green
Beam Angle 150°
Wavelength Red: 644nm, Green: 571nm
Luminous Intensity Red: 40-80 mcd, Green: 20-40 mcd

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 (G): Ground (GND).
  • Pin (R): Red LED anode.
  • Pin (Y): Green LED anode.

Wiring with ESP32

  • KY-011 Pin (G): Connect to ESP32 GND.
  • KY-011 Pin (R): Connect to ESP32 GPIO (e.g., GPIO18) through a current-limiting resistor.
  • KY-011 Pin (Y): Connect to ESP32 GPIO (e.g., GPIO19) through a current-limiting resistor.

Troubleshooting Guide

Common Issues

❌ LED Not Lighting Up

🎨 Incorrect Color Displayed

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-011 Two-Color LED 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.