How to adjust the brightness of an LED

Do you want to adjust the brightness of your Light-Emitting Diode (LED)? If we break it down to the most basic, there are two ways to change the brightness of an LED:

  • Changing the resistance value.
  • Turning it on and off fast (Using PWM).

Below I’ll explain the two options and show you circuits you can build.

Arduino Shield Project LED matrix

Option 1: Change the resistor value

The brightness of an LED depends on the current through it. A resistor in series with the LED sets the current. In the circuit below, you can see the basic setup for controlling an LED:

Circuit with LED and resistor

A potentiometer is a variable resistor that you can use to change the brightness of the LED. Just add the potentiometer in series with the LED. When you adjust the knob of the potentiometer, the brightness of the LED will change.

Adjusting LED brightness using a potentiometer

Option 2: Turn it on and off fast (PWM)

Another method is to turn the LED on and off fast. Maybe a few hundred times per second. Usually, you want to use a microcontroller for this. By adjusting the percentage the LED is on versus off, it will appear to the eye that the brightness changes.

This method is called Pulse-Width Modulation (PWM).

It’s also possible to create a PWM signal with a 555 timer. Here’s a sample circuit:

555 Timer PWM circuit with fixed frequency

SW1 is an optional button that you can use to have two different duty cycles. I used it to control a servo motor in two different positions.

Note that the duty cycle cannot be lower than the duty cycle of the first 555 Timer (that sets the frequency). So make sure you use components that have low enough OFF time for the duty cycle you want to use

More Light-Emitting Diodes (LED) Tutorials