Control LED Brightness with Potentiometer

Requires ,

This project allows you to smoothly adjust an LED’s brightness by turning a potentiometer knob.

The potentiometer outputs different voltage levels as you turn it (using variable resistance). The Arduino reads this voltage through its analogue input pin A0, converts it to a digital value between 0-1023, and uses this value to control the LED’s brightness through PWM (Pulse Width Modulation) on pin 11.

Parts List

  • 1x Arduino Uno
  • 1x LED (any color)
  • 1x 220Ω resistor
  • 1x 10kΩ potentiometer
  • Breadboard
  • Jumper wires

Assembly Instructions

  1. Place the LED on the breadboard, noting the longer leg (anode) and shorter leg (cathode)
  2. Connect the LED’s anode through the 220Ω resistor to Arduino pin 11
  3. Connect the LED’s cathode to Arduino GND
  4. Connect the potentiometer’s centre pin to Arduino A0
  5. Connect one of the potentiometer’s outer pins to Arduino 5V
  6. Connect the potentiometer’s other outer pin to Arduino GND