# RGB LED Constant Current Fade Effect With Transistors

4,715

53

6

## Introduction: RGB LED Constant Current Fade Effect With Transistors

I was bored so I started to fiddle around with transistors. The reason this became a LED fade and constant current circuit is just because the parts were at hand and lights in different colors is always cool. Please see attached video of the device working. The colors are overexposured but you get the idea.

The circuit consists of three parts:

1. PCB with LEDs and fade in/out circuit

2. PCB with constant current circuits

3. PCB with 555 as clock generator and 4017 as sequencer

## Step 1: Circuit for Fading LEDs

There are three RGB LEDs on the board connected in parallel. Each LED has four legs: common positive, R, G, B.

The fadeing circuit is very simple and unfortunately not so good. More details of the circuit here: Simple transistor fade in/put circuit. As resistors I used R1 = 47k, R2 = 47k, C1 = 680 uF. The problem is, that the leds fade in/out too fast and the startup delay, which is caused by that the capacitor has to be charged to the LED:s forward voltage makes unlit times in the sequence. If I would do the circuit again the fading circuit would be better made.

There is a fading circuit for each LED. In this way LED:s can be controlled individually.

## Step 2: Constant Current Circuit

Instead of using resistors to control the LED current, I made these super easy, but very good working transistor circuits. Each LED has it´s own current control. The current can pass the circuit as much as it wants until the setpoint is met. Then the current through the LED is limited to the setpoint. In this circuit the setpoint is about 60 mA, because there is always 3 LED:s in parallel (20+20+20mA).

Each circuit consists of two resistors, two diodes and a transistor. Circuit can be found here: Constant current source 3

Thanks to this circuit, the whole projects voltage range is anything between 4-15V (the max/min voltage for driving the sequencing circuit). With resistors controlling LED current, the supply voltage would be a specific voltage with small variation margin.

## Step 3: Sequencing Circuit

To be able to automate the LED:s, this circuit needed a sequencing circuit. I choosed the legendary 555 timer to make a clock signal and 4017 IC to make the sequence.

The components for astable 555 was chosen so that the duty cycle is about 50% and period 23s. This means that the LED:s does something every 23s. The clock signal is driving a 4017 counter. To every count is connected one, two or all colors through diodes. The diodes must be in the circuit. Otherwise all LED:s would eventually be tied together and they would be lit all the time.

A good 555 astable caluculator: 555 astable calculator

4017 has 10 counts or outputs. This circuit uses only 7, so the 8:th output is tied to the chip reset signal. So when the eight count is HIGH, the reset pin will become HIGH and the chip resets itself to count 1 (or 0 as in the schematic).

The sequence is as follows:

R,G,B

R

G,B

B

RG

G

RB

For some reason, when turning on the circuit it sometimes starts with count 2 (R).

## Step 4: Final Words

This project was really fun and a good learning experience.

Each circuit is very simple and they are easy to make on proto boards. Transistors are great!

129 13K
122 6.3K
1 297 21K
92 10K

## 6 Discussions

great project

can i place your project on my website.

i'm working on a website which is related to electrical projects.

i also mention your name.

plz reply

Hi, sure go ahead if you do not intend to do something illegal with the site.

My limiter uses 5 components. Transistor, 2 diodes and 2 resistors. The one you are referring to uses 4 components: transistor, FET and 2 resistors. Too complicated?

The same ammount of different components, mine has just one more + is less expensive.

This is not because you've got 3 LEDs that the current is 60mA. It is 60mA because the maximum voltage at the 10ohm resistor is 0.6V (diodes give 1.2V and 0.6 is lost in the transistor's junction).

You've pointed the main problem which is the too short fade time, but to increase it you'll have to redesign the circuit. I made such a circuit years ago (30!). The clock was a simple opamp with a pot to adjust speed and the ramp was generated via an integrator and a comparator but this was not as simple as your system. Speed and fade were separately adjustable.

Yes of course. The whole point with the current limiting circuit is to allow a maximum of 60mA to pass through the LED:s. Otherwise the leds will eventually burn.

Your circuit sounds nice! I hope you still have it left somewhere in your closet.