Main Content

Have an awesome project in mind using some LEDs. In that project I will be using some LED Fading Effect and few LED Chaser Circuits. But before jumping onto that, I thought I should create a short tutorial and show you guys how to fade a LED with or without an Arduino automatically or manually using a potentiometer.

Components Required

For the Non-Arduino bit we need:

1 x LM358 IC
1 x BC547 Transistor
1 x 0.47µF Capacitor
2 x 4.7KΩ Resistors
1 x 22KΩ Resistor
1 x 10KΩ Resistor
1 x 4.7MΩ Resistor
1 x 220Ω Resistor
1 x LED and
a 9V Battery

To get the fading effect we need to generate a series of triangular waves.

Because of the triangular waves, the LED starts glowing slowly and then slowly dims off and the cycle continues.

This setup is done using the LM358 IC. LM358 is a dual operational amplifier (Op-Amp) IC, integrated with two op-amps powered by a common power supply. Pins 1, 2, and 3 are one op-amp channel, and pins 5, 6, and 7 are the 2nd op-amp channel. As the capacitor charges and discharges the state of the PIN 3 switches from high to low and based on that the PIN 2 of the op-amp obtains the desire output. If you want to know more about this IC, please check out my “Tutorial No 21 : DIY - IR Module” :

So, basically the op-amp here is used for voltage level detection. In this circuit, we are applying a voltage on positive pin (PIN-3) and the voltage to be detected is applied at negative pin (PIN-2).

The transistor acts as a signal amplifier. You will need this if you are attaching a cluster of LEDs however for just 1 LED you can simply remove it.”

Link to article