KY-011 Two Color LED module with Arduino

Introduction

The KY-011 Two Color LED module emits light in red and green colors. You also can modify the intensity of each color by using PWM.

This module is compatible to interfacing with popular electronic platforms like Arduino, ESP32, Raspberry Pi, and other microcontrollers. This module is equivalent to the KY-029 module.

Hardware Required

You will require the following Hardware Components for the Interfacing of the KY-011 Two Color LED module with arduino.

Components#Buy From Amazon
Arduino UNO1Buy Now
KY-011 Two Color LED module1Buy Now
Resistor 330Ω2Buy Now
Jumper WiresBuy Now
Breadboard1Buy Now

What is a KY-011 Two Color LED module?

A KY-011 Two Color LED module is a compact module that consists of two light-emitting diodes (LEDs), one red and one green, mounted on a single PCB (printed circuit board). It is a simple, low-cost, and ready-to-use solution for adding multi-color lighting to electronic projects.

KY-011-Two-Color-Led-Module-with-arduino

Specifications

This module contains a 0Ω resistor, a common cathode 3mm red and green LED, and 3 male header pins. Before the operating voltage is between 2.0v and 2.5v, you will have to use limiting resistors to preclude burnout when attaching 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

Pinout

KY-011-Two-Color-Led-Module-Pinout

Pin Configuration

Pin NamePin Type
R PinRed Pin
G PinGreen Pin
– (GND)Ground Pin

Circuit Diagram

The following circuit shows you the connection of the KY-011 Two Color LED module with Arduino Please make the connection carefully

KY-011-Two-Color-Led-Module-Interfacing-with-Arduino-circuit

Circuit Connections

Place the module on BreadBoard and attach the green pin (G) of the module to Pin 10 of the Arduino, and connect the red pin (R) of the module to pin 11 of the arduino. Finally, connect the ground pin (Y) of the module to the GND of arduino.

We will use a pair of resistors between the module and the Arduino to preclude the burn of the LED.

ArduinoBreadBoardModule
Pin 10Resistor 330ΩG (Green)
Pin 11Resistor 330ΩR (Red)
GNDG (GND)

Installing Arduino IDE Software

First, you will require to Download the updated version of Arduino IDE Software and Install it on your PC or laptop. if you Learn How to install the Arduino step-by-step guide then click on how to install Arduino Button given Blow

Code

The following Arduino code will slowly alternate between red and green colors.

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);
	}
}

Applications

  1. Status Indication: It can be used to indicate the status of a device or system by lighting up either the red or green LED. For example, the green LED can indicate that a device is powered on, while the red LED can indicate an error or fault condition.
  2. Visual Effects: The module can be used to create simple visual effects, such as a breathing effect, by gradually changing the brightness of the LED.
  3. Circuit Design: It can be used in circuit designs that require multiple color LEDs, but have limited space.

Downloads Files

  • KY-011 Two-Color LED module Fritzing Part:
  • Common cathode 3mm red and green LED Datasheet:

Leave a Comment


error: