Layman’s RGB LED Module Project

Layman’s RGB LED module is an ultra-simple project realized without any microcontrollers. An RGB LED can be driven with a cmos presettable up/down counter. This is accomplished by connecting the three source outputs (Q1 to Q3) from a CD4029 cmos chip and configuring the device as a presettable counter. The solution presented here is intended to drive red, green, and blue LEDs in a common anode configuration. Color pattern (and intensity balance) is then controlled with the help of an external clock signal generator circuitry.

RGB LED Project

The CD4029 IC

CD4029 IC consists of a four-stage binary or BCD-decade up/ down counter with provisions for lookahead carry in both counting modes. The inputs consist of a single CLOCK, CARRY-IN (CLOCK ENABLE), BINARY/DECADE, UP/DOWN, PRESET ENABLE, and four individual JAM signals. Q1, Q2, Q3, Q4 and a CARRY OUT signal are provided as outputs. Binary counting is accomplished when the BINARY/DECADE input is high; the counter counts in the decade mode when the BINARY/DECADE input is low. The counter counts up when the UP/DOWN input is high, and down when the UP/DOWN input is low.

RGB LED Module Project


With an RGB (Red-Green-Blue) LED, literally you will be able to produce any color. At first glance, a 5mm RGB LED looks just like the regular 5mm LEDs, however, inside the standard package, there are actually three LEDs; one red, one green and yes, one blue. By controlling the brightness of each of the individual LEDs you can mix pretty much any color you want. A common anode RGB LED is the most popular type, and it is nothing more complicated than three one colour LEDs (one red, one green, and one blue) housed in a single package. However, rather than having 6 leads (cathode and anode for each LEDs) it has only 4 leads; one cathode for each colour (RGB), and the common anode (CA). Usually, the common anode of the LED package is the second pin from the flat side of the LED package. It is also the longest of the four leads. This lead will be treated as the “common” pin of the RGB LED.

Layman’s RGB LED Module Project

The RGB LED Module

As said, the circuit is built around CD 4029 IC and a few other external components. The finished module can be powered from any “clean” 5-Volt dc supply source for driving the RGB LED connected at the output of the circuit. In addition, the module calls for a suitable clock pulse at its input which can be supplied from a suitable clock generator wired around discrete components, or from a microcontroller based circuitry. Needless to say, this inputted clock signal determines the color pattern and intensity balance of the RGB LED’s aesthetic visual output. Refer the following application circuit:

RGB LED Module Project

RGB LEDs have differing forward voltages (VF) for the red, green, and blue LEDs. When drived by a 20mA per LED current, the red LED element of the RGB LED used here has a forward voltage of about 2V. The green and blue LEDs have forward voltage levels of about 2.4V and 3.6V respectively. Note that the forward voltage drop for each LED within the RGB LED need to be well-equalized in order to match LED performance over the operating range. These ballast resistors are used in the prototype; RR = 150R , RG = 120R, RB = 68R.

The Clock (CLK) Signal

Since the CARRY-IN (CI/pin 5) and PRE-SET ENABLE (PE/pin1) inputs of IC1 (CD4029BE) are held at low level, the counter is advanced one count at the positive transition of clock signal fed through the clock input (CLK/pin 15). Advancement is inhibited when PRESET ENABLE input (pin1) is pulled to a high-level (here by Q4 output of IC1). Based on this, we can feed a suitable clock signal to the module (through J1) for driving the onboard RGB LED as per our requirement. For testing your finished circuit, just try out an external clock pulse generator centered around the single most useful integrated circuit in history, the 555 timer chip. Refer the following sample application circuit:

Layman’s RGB LED Module Project

Here, when wipers of P1 and P2 are bolted at their mid-travel (ie. 5K value), output from NE555 is about 0.952 Hertz (frequency) @ 67 % (duty cycle). However, adding a 1N4148 diode between pins 7 and 6 of NE555 ( its anode to pin 7 & cathode to pin 6), this will changes to near 1.429 Hertz @ 50 %.

Hooked to CD4029?

Recently we published an “Improved Impulse detector” circuit based on the same chip CD4029. At that time CD4029 was wired as an upward counting decade counter. But now the same CD4029 works as a binary counter whose outputs continuously count in a binary progression between 1 to 7. These outputs drive the 2N3904 transistors (T1, T2 and T3) which, in turn, control each of the three colours of the RGB LED. Now it’s your turn; refer the CD4029 datasheet, and carefully walk through both circuits to find out the typical configuraton tricks used by us!

Author by: T.K. HAREENDRAN

Share this article


Post a Comment

Copyright © 2018 • All Rights Reserved.
back to top