# Looking for basic circuits on RGB LEDs

Discussion in 'LEDs and Optoelectronics' started by Trent3, Oct 11, 2014.

1. ### Trent3

2
0
Oct 11, 2014
I'm working with a hobbyist group and I want to create some simple circuits using different components and techniques to demonstrate using RGB LEDs. I'm using standard surface-mount rgb led strips like the 5050s that are operating at 12vdc (non-digital/individually-addressable) and I want to create some simple, cheap circuits that can make the LEDs cycle through red-green-blue fade up/down. Can anybody help me with some different circuit designs for something like this? I'd like to start off with something simple that is done "old school style" and also a demo of using some higher-level stuff like ICs. Any help would be most appreciated!

2. ### Colin Mitchell

1,416
314
Aug 31, 2014
Use 3 pots and 3 transistors then go to PWM:

3. ### KrisBlueNZSadly passed away in 2015

8,393
1,271
Nov 28, 2011
Hi Trent and welcome to Electronics Point

Here's a circuit using the "old school" methods that will give a colour cycling display on a single RGB LED. It requires a regulated 12V DC supply, and a common anode LED, and it uses three 555 timer ICs, four transistors, and various small components.

U1, U2 and U3 are three independent oscillators, one for each colour. They operate at different frequencies, as set by RT1, RT2 and RT3. (CT1, CT2 and CT3 also determine the frequencies, but they are all nominally the same value.) The frequency of each oscillator is roughly proportional to the reciprocal of the timing resistor. I haven't actually calculated the frequencies for those values! You may want to change them.

Each oscillator produces an output voltage on pin 6 that slowly rises from 4V to 8V then slowly falls back to 4V, producing a waveform that looks kind of like a triangle wave. Google 555 oscillator waveforms for details.

These three outputs feed transistors Q1~3, which are variable current limiters that drive the three colours in the RGB LED, operating in conjunction with Q4, which provides a fixed voltage of about 2.7V on its emitter.

Each LED driver transistor draws current though its collector circuit (which passes through the LED element) in order to pull its emitter up to a voltage about 1.3V (the base-emitter forward voltage of a small Darlington transistor) less than its base. Since the base voltage varies between 4V and 8V, the emitter voltage ranges from about 2.7V to 6.7V.

When the base voltage is at its lowest point, the emitter voltage is about 2.7V, the same as Q4's emitter voltage, so no current flows through the emitter resistor (RE1/2/3). As the base voltage increases, the emitter voltage increases, and so does the voltage across the emitter resistor, and therefore the emitter current and the collector current.

At maximum base voltage, 8V, and maximum emitter voltage, 6.7V, there is about 4V across the emitter resistor, which corresponds to an LED current of about 27 mA, with an emitter resistance of 150Ω. If you want a different maximum current per LED element, recalculate the emitter resistors using Ohm's Law, R = V / I, with V=4V. For example, for 20 mA maximum LED element current, R = V / I = 4 / 0.02 = 200. So use a 200Ω resistor, or two 100Ω resistors in series. Or use a 220Ω resistor. These numbers aren't exact!

If you seriously want to get into interesting displays on RGB LEDs, then driving them from a microcontroller, using PWM (pulse width modulation), as suggested by Colin in post #2, is the way to do it. But this requires you to learn about programming microcontrollers. This is a fascinating subject but there is a learning curve. You could skip the learning part, and buy a pre-programmed microcontroller from Colin, but I'm not sure what features it would have. He didn't link to the circuit description page.

4. ### BobK

7,682
1,688
Jan 5, 2010
The strips with "individually addressable" LEDs are actually shift registers. You shift in 24 bits (8-8-8- RGB) for each LED in the strip. There is no simple way to do this without a microcontroller.

Bob

5. ### Trent3

2
0
Oct 11, 2014
Wow.. thanks guys for such great information...

Let me ask you... Do you also have any simple circuits for the following?

1. using a motion sensor as a switch to turn the strip on/off
2. adding the ability to set how long the light stays on in #1
3. tieing #1 into a light sensor that only switches on at night

I'm working on coming up with a bunch of simple circuits I can use to introduce other people to basic electronics using a simple light fixture-type example.