Interfacing KY-016 RGB Full Color LED Module with Arduino

Introduction

In this tutorial, we are Interfacing KY-016 RGB Full Color LED Module with Arduino, The KY-016 Full Color RGB LED module emits a wide range of various colors by combining red, green, and blue light. Each color is adjusted by using Pulse Width Modulation (PWM). Overall, the KY-016 RGB Full Color LED Module provides a versatile and cost-effective solution for a wide range of lighting and decoration applications.

This module is compatible to interface with popular electronic platforms like Arduino, ESP32, Raspberry Pi, and other microcontrollers.

Hardware Required

You will require the following Hardware Components for the Interfacing KY-016 RGB Full Color LED Module with Arduino.

Components#Buy From Amazon
Arduino UNO1Buy Now
KY-016 RGB Full Color LED Module1Buy Now
Jumper Wires4Buy Now
Breadboard1Buy Now

What is a KY-016 RGB Full Color LED Module?

KY-016 RGB Full Color LED Module is an electronic module that consists of a full-color LED light emitting diode (RGB LED). It can produce various colors by mixing red, green, and blue light, making it ideal for creating a wide range of colors and shades.

The module typically has four pins: two for power (VCC and GND), one for the red light, one for the green light, and one for the blue light. The color and brightness of the LED can be controlled by varying the intensity of the individual red, green, and blue light-emitting diodes.

KY-016-RGB-Full-Color-LED-Module-Datasheet

Specifications

This module contains three 150Ω limiting resistors to prevent burnout, a 5mm RGB LED, and 4 male header pins. Changing the PWM signal on each color pin will result in various colors.

Operating Voltage5V
LED Drive ModeCommon cathode drive
LED Diameter5mm
Board Size15mm x 19mm [0.59in x 0.75in]

Pinout

KY-016-RGB-Full-Color-LED-Module-Pinout

Pin Configuration

Pin NamePin Type
BBlue Pin
GGreen Pin
RRed Pin
( – ) GNDGround Pin

Circuit Diagram

The following circuit shows you the connection of the Interfacing KY-016 RGB Full Color LED Module with Arduino, Please make the connection carefully

KY-016-RGB-Full-Color-LED-Module-Interfacing-with-Arduino-Circuit

Circuit Connections

Place the module on the BreadBoard and connect the red pin (R) of the module to pin 11 of the Arduino. connect the Blue (B) of the module to pin 10 of the arduino, connect the green (G) pin of the module to pin 9 of the arduino, and finally ground (-) of the module to the GND of the arduino respectively.

ArduinoModule
9 PinGreen Pin
10 PinBlue Pin
11 PinRed Pin
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 increase/decrease the PWM values on the red, green, and blue pins resulting in the LED cycling through different colors.

int redpin = 11; // select the pin for the red LED
int bluepin =10; // select the pin for the  blue LED
int greenpin =9; // select the pin for the green LED
int val;
void setup() {
  pinMode(redpin, OUTPUT);
  pinMode(bluepin, OUTPUT);
  pinMode(greenpin, OUTPUT);
  Serial.begin(9600);
}
void loop() {
  for(val = 255; val > 0; val--)
  {
    analogWrite(11, val);
    analogWrite(10, 255 - val);
    analogWrite(9, 128 - val);
    Serial.println(val, DEC);
    delay(5); 
  }
  for(val = 0; val < 255; val++)
  {
    analogWrite(11, val);
    analogWrite(10, 255 - val);
    analogWrite(9, 128 - val);
    
    Serial.println(val, DEC);
    delay(5); 
  }
}

Applications

Applications of KY-016 RGB Full Color LED Module:

  1. Lighting and Decoration: It can be used for indoor and outdoor lighting and decoration purposes, such as in homes, offices, and gardens.
  2. Displays and Signage: The LED module can be used in displays and signage for advertising, marketing, and product branding.
  3. Automotive Lighting: The LED module can be used in automotive lighting for vehicles, such as in the interior or exterior of cars and trucks.
  4. Hobby Projects: The LED module is commonly used in hobby projects, such as robots, DIY electronics projects, and Arduino projects.
  5. Stage lighting: RGB LED modules can be used in stage lighting to create different color effects and enhance the overall performance.

Leave a Comment


error: