0% found this document useful (0 votes)
7 views

RGB LED Potentiometer Arduino Project

This project illustrates how to control an RGB LED's brightness and color intensity using a potentiometer and an Arduino. It serves as a beginner-friendly introduction to analog inputs and PWM in Arduino, utilizing components like an RGB LED, potentiometer, and resistors. The project includes a circuit diagram and Arduino code to facilitate the implementation.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

RGB LED Potentiometer Arduino Project

This project illustrates how to control an RGB LED's brightness and color intensity using a potentiometer and an Arduino. It serves as a beginner-friendly introduction to analog inputs and PWM in Arduino, utilizing components like an RGB LED, potentiometer, and resistors. The project includes a circuit diagram and Arduino code to facilitate the implementation.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

RGB LED Controlled by Potentiometer using Arduino

Abstract
This project demonstrates how to control an RGB LED using a potentiometer and an Arduino. By adjusting
the potentiometer, the user can change the brightness and color intensity of the RGB LED. The project is
ideal for beginners learning about analog inputs and PWM (Pulse Width Modulation) in Arduino.

Introduction
Arduino microcontrollers provide an easy way to interface sensors and actuators. This project uses an RGB
LED with a potentiometer to dynamically change the LED color. The potentiometer acts as an input device,
and the Arduino reads its values to modify the LED's output.

Components Required
- Arduino Uno/Nano/Mini
- RGB LED (Common Cathode or Anode)
- Potentiometer (10k Ohm)
- 3x 220 Ohm Resistors
- Breadboard & Jumper Wires

Circuit Diagram & Explanation


The potentiometer is connected to an analog input pin of the Arduino, and its output is used to control the
RGB LED through PWM on three digital pins (Red, Green, Blue). The resistors limit the current to each LED
segment.

Arduino Code

int potPin = A0;


int redPin = 9, greenPin = 10, bluePin = 11;
void setup() { pinMode(redPin, OUTPUT); pinMode(greenPin, OUTPUT); pinMode(bluePin, OUTPUT); }
void loop() {
int val = analogRead(potPin) / 4;
analogWrite(redPin, val); analogWrite(greenPin, 255 - val); analogWrite(bluePin, val / 2);
}

Working Principle
As the potentiometer is rotated, it changes the analog value read by the Arduino. This value is mapped to
different PWM signals that control the brightness of each LED color component, resulting in smooth color
transitions.

Applications
- LED color mixing experiments
- Mood lighting control
- Learning Arduino PWM and analog input
- DIY lighting projects

Conclusion
This project is an excellent introduction to Arduino-based analog input control. It demonstrates how to use a
potentiometer to manipulate RGB LED colors dynamically.

You might also like