• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Circuit Ideas for You

Get free circuit ideas online.

  • Home
  • Privacy Policy
  • About
Home » Fading LED Circuit using Arduino and Potentiometer

Fading LED Circuit using Arduino and Potentiometer

Last updated on 4 July 2026 by Admin-Lavi Leave a Comment

This project shows how to control Fading LED Circuit using Arduino and Potentiometer and this potentiometer gives analog voltage; therefore, by rotating the potentiometer knob varies the voltage output and Arduino reads this variation.

Then Arduino reads it and changes LED brightness and this LED brightness changes smoothly; furthermore, the circuit is easy to make a simple project for beginners and Arduino lovers.

Arduino Code:

int pot=A0;
int led=9;
int val=0;

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

void loop()
{
val=analogRead(pot);
val=map(val,0,1023,0,255);
analogWrite(led,val);
}

Code Explanation:

  • analogRead reads value from potentiometer.
  • Value is between 0 and 1023.
  • map function converts it to 0 to 255.
  • analogWrite sends PWM to LED on pin 9.
  • Low value makes dim LED.
  • High value makes bright LED.
  • Loop repeats always.

Circuit Working:

Fading LED Circuit Diagram using Arduino and Potentiometer

Parts List:

ComponentsQuantity
Resistor 1.5k 1/4 watt1
Potentiometer 10k1
Arduino Uno1
LED any 5mm1

To begin with, in this above circuit potentiometer changes its internal resistance and this changes voltage at center pin of potentiometer VR1.

Arduino reads voltage level and converts voltage into PWM brightness and then LED brightness slowly increases or decreases when knob rotates.

After that, R1 resistor limits LED current to prevent burning out the LED and this works like manual dimmer.

Formula with Calculation:

The formula for the current through the LED given by ohms law:

I = Vsource​ − VLED​​ /R

where,

  • Vsource​ is 5 V Arduino output
  • VLED is 2V for a typical red LED
  • R is the resistor value 1.5 k

Voltage across resistor = 5V – 2V = 3V

Current needed = 2mA approx since using 1.5k resistor

R = V ÷ I = 3v ÷ 0.002A = 1500 ohm

So, we used a 1.5k resistor in this circuit because it is the correct value.

How to Build:

To build a Fading LED Circuit using Arduino and Potentiometer follow the below connection steps:

  • First, take all the parts as shown in circuit diagram.
  • Next, potentiometer pin left connect to Arduino 5V
  • Then potentiometer pin right connect to Arduino GND
  • After that, potentiometer center pin connect to Arduino A0
  • Now Arduino pin 9 connect to resistor 1.5k and LED positive and LED negative connect to Arduino GND

Conclusion:

To conclude, this Fading LED Circuit using Arduino and Potentiometer helps understand analog input and PWM output in Arduino.

Potentiometer controls LED brightness in smooth way and circuit uses only one LED, one resistor and one potentiometer, which is good for basic Arduino learning.

Filed Under: Arduino Projects, LED and Lamps, Mini Projects

About Admin-Lavi

Lavi is a B.Tech electronics engineer with a passion for designing new electronic circuits. Do you have questions regarding the circuit diagrams presented on this blog? Feel free to comment and solve your queries with quick replies

Previous Post: « Simple Up Down Fading LED Circuit
Next Post: Audio Sound Generator Circuit using IC 555 »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar




Categories

  • 555 Timer Projects (137)
  • Alarm Circuits (81)
  • Amplifier Circuits (94)
  • Arduino Projects (103)
  • Audio Circuits (189)
  • Automation Circuits (150)
  • Automobile Circuits (40)
  • Battery Charger Circuits (88)
  • DIY Projects (435)
  • Free Energy (12)
  • Heater and Temperature Controllers (32)
  • High Voltage (24)
  • Hobby Circuits (241)
  • Indicator Circuits (63)
  • Inverter Circuits (17)
  • IoT projects (12)
  • LDR Circuits (47)
  • LED and Lamps (201)
  • Meters and Testers (44)
  • Mini Projects (390)
  • Motor Controllers (26)
  • Oscillator Circuits (70)
  • Power Supply Circuits (244)
  • Radio Frequency (8)
  • Remote Control Circuits (12)
  • Renewable energy (20)
  • Security and Protection (128)
  • Sensors and Detectors (236)
  • Solar Circuits (31)
  • Timer Circuits (63)
  • Transistor Circuits (178)
  • Transmitter Circuit (19)
  • Tutorials (33)
  • Voltage Regulator (55)
  • Water Level Controller (10)

Recent Posts

  • Low Current Controlled Battery Charger Circuit using LM723 IC
  • 741 Op-Amp Treble Booster Circuit
  • Simple Diode and Transistor Based Audio Limiter Circuit
  • Simple 500mW Speaker Driver Circuit
  • Easy DIY LM386 Audio Amplifier Circuit

Recent Comments

  1. Admin-Lavi on High Voltage Fence Charger Circuit
  2. etere on High Voltage Fence Charger Circuit
  3. Admin-Lavi on High Voltage Fence Charger Circuit
  4. egidio grzinic on High Voltage Fence Charger Circuit
  5. Logic OR Gate Circuit using Transistors - Circuit Ideas for You on Automatic Street Light Circuit using LDR

Copyright © 2026 | New Circuit Ideas