Introduction
The KY-027 Magic Light Cup module is a commonly used electronic component that is widely used in the field of DIY electronics and hobbyist projects. It is a simple and fun module that can produce colorful light effects based on the level of ambient light or sound. This module is easy to use and can be integrated into a wide range of electronic projects.
This module is compatible with popular electronic platforms like Arduino, ESP32, Raspberry Pi, and other microcontrollers. This module is capable of detecting changes in ambient light or sound levels and generating corresponding colorful light effects.
Hardware Required
You will require the following Hardware Components for interfacing the KY-027 Magic Light Cup Module with Arduino.
Components | # | Buy From Amazon |
---|---|---|
Arduino UNO | 1 | Buy Now |
KY-027 Magic Light Cup Module | 1 | Buy Now |
Jumper Wires | 3 | Buy Now |
Breadboard | 1 | Buy Now |
What is the KY-027 Magic Light Cup Module?
The KY-027 Magic Light Cup module is an electronic component that uses a microphone and a light sensor to produce colorful light effects. The module is composed of a PCB board, an electret microphone, a light sensor, a potentiometer, and a few other electronic components. The module can detect changes in ambient light or sound levels and produce colorful light effects accordingly.
Specifications
These modules are sold in a pair, with each module consisting of a mercury tilt switch, an LED, a 10kΩ resistor, and 4 male pin headers to facilitate connection of the switch, LED, power, and ground.
Operating Voltage | 3.3V ~ 5.5V |
Current Consumption | 15mA |
Light Sensor Detection Range | 500-10000 lux |
Microphone Detection Range | 50-10000 Hz |
Output Signal | Digital (High/Low) |
Board Dimensions | 1.5cm x 3.6cm [0.6in x 1.4in] |
Features
- Colorful light effects based on ambient light or sound levels
- Adjustable sensitivity using a potentiometer
- Low power consumption
- Easy to integrate with other electronic components
- Fun and easy to use
Pinout
Pin Configuration
Pin Name | Pin Type |
---|---|
G | Ground Pin |
+Ve | VCC Pin |
S | Signal Pin |
L | LED Pin |
Circuit Diagram
The following circuit shows you the connection of the KY-027 Magic Light Cup Module with Arduino Please make the connection carefully
Circuit Connections
Arduino | Module | LED |
---|---|---|
+5V | +V Pin | |
GND | GND Pin | -Ve |
Pin 10 | S | |
Pin 13 | +Ve |
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
//For more Projects: www.arduinocircuit.com
int Led = 13 ;// Declaration of the LED output pin
int Sensor = 10 ;// Declaration of the sensor input pin
int val; // Temporary variable
void setup ()
{
pinMode (Led, OUTPUT) ; // Initialize output pin
pinMode (Sensor, INPUT) ; // Initialize sensor pin
digitalWrite(Sensor, HIGH) ; // Activate internal pull-up resistor
}
void loop ()
{
val = digitalRead (Sensor) ; // The current signal at the sensor is read out
if (val == HIGH) // If a signal could be detected, the LED is switched on.
{
digitalWrite (Led, LOW);
}
else
{
digitalWrite (Led, HIGH);
}
}
Applications
- DIY electronic projects
- Music visualizers
- Mood lighting
- Home automation
- Entertainment and gaming
Conclusion
The KY-027 Magic Light Cup module is a fun and easy-to-use electronic component that can produce colorful light effects based on the level of ambient light or sound. With its adjustable sensitivity, low power consumption, and easy integration with other electronic components, it is a popular choice for DIY electronics enthusiasts and hobbyists. Whether you’re building a music visualizer or adding mood lighting to your home, the KY-027 Magic Light Cup module is a versatile and fun component that can bring your electronic projects to life.