Fading LEDs via PWM

Project Info
Author: Chris
Difficulty: Easy
Time Invested: 2 Hours

Take a look at the above
articles before continuing
to read this article.
          The LED is probably the most popular component used in hobby electronics. LEDs offer a way to light things uniquely like in POV clocks and they are great for quick debugging when you want to double check that something is working. Another cool feature of LEDs is that their light intensity can be varied by sending it specific digital pulses.
           This article will focus on how to use digital PWM (Pulse width Modulation) to vary the light intensity of an LED in order to create an awesome fading effect. A small microcontroller will be used to send out the custom PWM signal for fading the led light intensity in and out.

Fading LEDs via PWM - Demonstration

Fading LEDs via PWM - Setup

Purpose & Overview of this project
          The goal of this project is to create an LED controller that can fade the brightness level of an LED (light-emitting-diode) with a smooth transition. Since light intensity increases in a logrithmic fashion, we'll need to pay extra attention to the theory section of this article to make sure the brightness transitions move smoothly.
          To build this LED controller we will use only the most basic of parts to ensure that anyone can duplicate this controller with minimal investment of time and money. The PIC 18F1330 microcontroller will be used for all the intelligent digital work and some standard LEDs will be used for testing out how well the LED fader works. Continue to the next section to see the complete parts list.