Site icon Circuit Ideas for You

Arduino Based Control LED Light Circuit with Potentiometer

Want to make an LED glow bright or dim just by turning a knob?

This simple Arduino Based Control LED Light Circuit with Potentiometer does that same thing.

Turn the knob to adjust the LED light from soft to full brightness.

It is a fun and easy way to learn how Arduino reads analog signals.

It also shows how PWM controls the LED light intensity.

Arduino Coding:

int potPin = A0;
int ledPin = 9;
int potValue = 0;
int ledValue = 0;

void setup() {
pinMode(ledPin, OUTPUT);
}

void loop() {
potValue = analogRead(potPin);
ledValue = map(potValue, 0, 1023, 0, 255);
analogWrite(ledPin, ledValue);
delay(10);
}

Coding Explanation:

Circuit Working:

Parts List:

Component NameSpecificationQuantity
Resistors220Ω 1/4 watt1
Potentiometer 10k1
SemiconductorsArduino UNO Board1
LED any color1

When the potentiometer is rotated, its resistance changes.

This changes the voltage on analog pin A0.

Arduino reads this voltage and creates a PWM output.

PWM controls the average current through the LED.

So the LED becomes dim or bright.

How to Build:

To build a Arduino Based Control LED Light Circuit with Potentiometer follow the below collection steps:

Conclusion:

This Arduino Based Control LED Light Circuit with Potentiometer is a simple way to control LED brightness.

It helps to learn about analog input and PWM output in Arduino.

We can use this in small light dimmer projects or sensor control projects.

References:

LED brightness control with a potentiometer [duplicate]

Exit mobile version