Simple LED Fade-In, Fade-Out Circuit – B1P5

We’re now going to use the components we discussed previously, to give us the fade-in/fade-out LED effect.

LED fade in fade out schematic

This is what the circuit diagram looks like and it is very easy to guess what’s happening here. Like before, we use a transistor to control an LED. The base-emitter voltage should be positive for the LED to switch ON. We have a capacitor connected between the base-emitter terminals and we also have two other resistors.

LED fade in fade out capacitor charge path

When we close the switch, the capacitor starts charging from 0 up to the supply voltage. As the capacitor voltage reaches around 0.6-0.7v, it causes the transistor to switch ON, which in turn switches ON the LED. The charging rate is controlled by R2 and we have something called a time constant that is expressed as the following:

T = RC

The time constant gives us the time (in seconds) that it takes the capacitor to charge to 63% of the supply voltage. After 5 time constants, the capacitor will be charged to over 99% of the supply voltage.

LED fade in fade out capacitor discharge path

When the switch is opened, the capacitor stops charging and since we have a transistor and resistor connected to it, the capacitor starts discharging. The rate of the discharge depends on the value of R3 – a lower value will increase the discharge rate. When the capacitor voltage falls below the switch ON or threshold voltage of the transistor, it will switch OFF. The threshold voltage is generally between 0.6-0.7V.

LED fade in fade out simulation charging

Here’s a simulation of when the capacitor charges.

LED fade in fade out simulation discharging

Here’s a simulation of when the capacitor charges.

LED fade in fade out layout

The circuit works as expected, so we will use the breadboard layout to build the circuit.

LED fade in fade out demo

We can also replace R2 with 100K to increase the fade-in time as shown above.

This is how you can start building interesting circuits using very simple components. We will build another interesting LED circuit in the next post.