KY-011 Two color LED module

The KY-011 Two Color LED module emits red and green light. You can adjust the intensity of each color using PWM.

Compatible with popular electronics platforms like Arduino, Raspberry Pi, ESP32 and more. This module is similar to the KY-029.

KY-011 Fritzing custom part image
KEYES KY-011 Two color LED module

KY-011 Specifications

This module consist of a common cathode 3mm red/green LED, a 0Ω resistor, and 3 male header pins. Since the operating voltage is between 2.0v and 2.5v, you’ll have to use limiting resistors to prevent burnout when connecting to the Arduino.

Operating Voltage2.0v ~ 2.5v
Working Current10mA
Diameter3mm
Package TypeDiffusion
ColorRed + Green
Beam Angle150
Wavelength571nm + 644nm
Luminosity Intensity (MCD)20-40; 40-80

Connection Diagram

Connect the green pin (G) on the board to Pin 10 on the Arduino, connect the red pin (R) to pin 11. Lastly, connect the ground pin (Y) to GND.

We’ll use a couple of resistors between the board and the Arduino to prevent burning the LED.

KY-011BreadboardArduino
G330Ω resistorPin 10
R330Ω resistorPin 11
YGND
Arduino KY-011 Two color LED module connection diagram

KY-011 Arduino Code

The following Arduino sketch will gradually alternate between red and green color.

int redpin = 11; // pin for red signal
int greenpin = 10; // pin for green signal
int val;

void setup() {
	pinMode(redpin, OUTPUT);
	pinMode(greenpin, OUTPUT);
}

void loop() {
	for(val = 255; val > 0; val--) { 
		analogWrite(redpin, val); //dim red
		analogWrite(greenpin, 255 - val); // brighten green
		delay(15);
	}
	for(val = 0; val < 255; val++) { 
		analogWrite(redpin, val); //brighten red
		analogWrite(greenpin, 255 - val); //dim green
		delay(15);
	}
}

Downloads

Leave a Comment


2 thoughts on “KY-011 Two color LED module”

  1. Hi, I tried the wiring you suggested but only the red led lights up. I discovered that with my module, the Y is not going to the ground, but is used for the Green led (and G is for ground). I don’t know if my module has a default, but when I check this guide:
    https://startingelectronics.org/tutorials/arduino/modules/common-cathode-LED/
    (the person used the same module but without the GRY letters on it), from left to right it is: Ground—Red—Green.

    Reply
    • Please check that you are using the 3mm module. The 5mm module KY-029 is wired differently.

      Reply