LED Fading With a 555 Timer

48,192

135

27

Posted

Introduction: LED Fading With a 555 Timer

The 555 timer is one of the most widely known and simple integrated circuits (IC) on the market. It can be used in many ways using different modes (monostable, astable, and bistable) with each mode used to produce a specific effect. For this project, we're going to focus on using the 555 timer in astable mode for pulse-width modulation to produce a fading LED effect. The 555 timer's astable mode outputs an oscillating pulse signal that switches between on and off states at a frequency and wavelength dependent on the circuit's resistors and capacitors. The Highs and Lows of the pulse signal will create the fade in and fade out effects of the LED.

Step 1: Components

Here's what we need to get started:

-555 timer

-20k ohm resistor

-2K ohm resistor (Depending on your LED and how bright you want it, you might need a lower value.)

-220µF capacitor

-NPN transistor (I used a 2N2222)

-LED

-9V battery

-jumper wires and breadboard

Step 2: 555 Timer

The 555 timer has 8 pins, each having a specific function. The pins are oriented according to the indicator dot on the chip. In the image, the dot is located on the bottom left corner of the chip, representing the location of Pin 1. The rest of the pins follow in order from left to right on the bottom, and right to left on the top with Pin 8 being directly above Pin 1.

Step 3: Wiring

Follow the circuit diagram making sure that the 555 timer is positioned correctly and all polarized components are oriented in the right position. Pin 1 is connected to ground(-). Pin 2 is bridged with Pin 6 and connected to the + end of the 220 µF capacitor. Pin 3 is connected to the 20K Ω resistor and linked between the NPN transistor's Base and the capacitor. Pin 4 is bridged with Pin 8 and connected to positive(+). The NPN transistor's Collector is connected to positive(+), while the Emitter is connected to the 2K Ω resistor. The LED is connected to the other end of the 2K Ω resistor and to ground(-). Pins 5 and 7 are not used. Check your circuit for any errors and connect the 9V battery. The LED should begin to fade in and fade out slowly.

Step 4: Changing the Circuit

The rate of the LED fading in and out can easily be modified by playing around with different resistor or capacitor values. You can even add a linear potentiometer or photo resistor in place of the 20K Ω resistor and see how it affects the LED. Removing the transistor will produce a blinking LED affect instead of the fading affect. You can also connect the circuit to an oscilloscope and visually see the pulse signal being produced by the 555 timer. Tinker around and have fun with your new pulsing LED!

Share

Recommendations

  • Science of Cooking

    Science of Cooking
  • Pocket-Sized Contest

    Pocket-Sized Contest
  • Spotless Contest

    Spotless Contest
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

I would like to duplicate this project, I am not unfamiliar with ohms law but I am not sure on this one. I want to make a single LED rated 3.2 - 3.8v @ 20mA fade/pulse with a power supply of 3.3 V. Following your diagram, what values do I need the resistors, transistor and capacitor to be?

22 Comments

Im interested in making this for a project that im doing. I havnt done electronics for 15yr and am very rusty on it, but im a little concerned..

A led is usually rated at 2.5v, but this is a 9v circuit.. exactly what led's did you use?

LEDs function on current flow, not voltage. The resistor used is what controls how bright it is. Without it the LED will just burn up all the current it can and melt down.

The 2N2222 transistor has a 1.4v voltage drop, and your LED spec of 2.5V is another voltage drop; for a total of 3.9 volts dropped from the original 9V, leaving you with 5.1VDC.

By using Ohm's law, we calculate the current based on the 5.1VDC and the 2k resistor, resulting in 2.5mA which is pretty low; tThe T1-3/4 LED can generally handle current levels 10x that.



I'm planning to use your instructable to build a night lamp for my son. I would like to avoid using batteries.

Could you recommend a way to plug a wall transformer or something equivalent?

You can find 9volt dc power supplys with barrel jacks and then use a female barrel jack wired to the circuit. Thats what i did ,made a fading nightlight for my daughter

Nice, easy to follow project, but my led just blinks. What am I doing wrong?

That's probably due to the transistor being faulty or incorrectly used.

Good day. The components for this project are for single LED only. I would like to ask if uses LED strip, what components to be replaced/substituted, even the supply voltage to be elevated to 12 volts. Thank you very much.

Great tutorial! How would I go about making a few LEDs pulse in sequential order? For example, LED #1 slowly lights up to full brightness, then decreases in brightness at the same rate LED #2 increases to full brightness, etc...

Can this be done without programming an attiny chip?

Thanks!

There is a very useful chip called a Decade counter 4017B. this fader could be paired up with one of these so that it is directed to the next LED with every 'count'.