• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Contact | Calculators-online
You are here: Home / Lamps and Lights / Simple RGB LED Color Mixer Circuit using LM317 IC

Simple RGB LED Color Mixer Circuit using LM317 IC

Last Updated on January 3, 2024 by Swagatam 22 Comments

In this post I have explained a simple LM317 IC based RGB 3 watt LED color mixer circuit, which can be used for demonstrating the color mixing effects of red, blue, green colors as specified in the standard color charts. The idea was requested by Mr.Praveen.

Table of Contents
  • Technical Specifications
  • Analyzing the RGB LED Specifications
  • How to Configure the LED Pinouts
  • Using LM317 Regulator for the Control Circuit
  • Simple RGB Color Mixer using Transistors
  • 3 Color LED Automatic Color Change

Technical Specifications

My name is Pravin, I work in school as Physics technician.I need to show kids colour mixing of red green and
blue. I would like to be able to vary the brightness of the three
colours LEDs to show the effect it has on screen. I have 3W RGB LEDs. 
Could you please help me to make a circuit . The simple the better.I have tried to make one with LM317 IC. 
Regards, 

Pravin

Analyzing the RGB LED Specifications

The following image shows a typical 3 watt RGB LED.

According to the datasheet of this LED the three leads on each side correspond with the three leads on the other side on a straight line such that the two straight ends left to right form the terminals of the red, green, blue LEDs embedded respectively inside the package.

Therefore, the upper most left, right end to end leads may form the cathode, anode of the red LED, the center left, right leads may correspond to the green LED, and identically the lower most left, right end to end leads may signify the terminals for the blue LED.

High quality 3 watt rgb led with 2

How to Configure the LED Pinouts

Configuring these leads of this RGB LED such that the individual colors can be adjusted separately, is actually quite easy.

The idea is simply to integrate three separate adjustable voltage regulators for these three LEDs, for example by using a LM317 voltage regulator, as shown in the following diagram.

3172BCIRCUIT

Using LM317 Regulator for the Control Circuit

Referring to the above diagram one can visualize that the three LM317 voltage regulators are in fact exactly identical with their part and wiring configuration.

Each of the modules have the facility of voltage adjustment and are all current controlled through a BC547 transistor and a resistor Rc.

The leads of the 3 watt LED are hooked up individually to the outputs of the 3 LM317 circuits, while the input is fed to all the 3 modules through a common DC source which could be a SMPS adapter rated appropriately for handling the RGB illumination.

The anode, cathode orientation of the LED is also indicated in the diagram which must be carefully and correctly set before connecting them to the 317 outputs.

Once everything is completed, and the power is switched ON, the voltage control feature present in the LM317 modules can be used for setting up the illumination levels of the respective LEDs discretely for creating any of the specified color effects, right from the primary RGB to voilet, indigo, orange, maroon etc etc.

The 10K presets of the 317 circuit can be replaced with 10K pots for enabling an external control for the intended color mixing effects on the LED.

The value of  Rc can be calculated by using the following formula:

Rc = 0.6/LED current rating

Simple RGB Color Mixer using Transistors

RGB color mixer, flasher and fader circuit

For color mixing, 3nos of 8050 variable voltage power supply could beuilt and their outputs connected with points A, B and C.

For creating fading effect, fading circuit could be connected to point E

For flashing effect point F could be used for supplying the flashing signal.

3 Color LED Automatic Color Change

Using this circuit, a multicolored LED may gradually mix and shift across 3 colors. The color transition can be from yellow to red to yellow to green before returning to yellow.

This cycle is then continuously repeated. Both the construction and the theory of operation are extremely straightforward.

multicolored LED automatic changing or shifting

The IC 556 dual oscillator/two timer's timers are set up for astable functioning with a 50% duty cycle. One timer is programmed to oscillate a lot more quickly than the other.

Each timing capacitor voltage is supplied to two comparators, which then apply a voltage to the multicolored LED with a polarity that depends on which capacitor voltage is higher.

The red and green LED components alternately light up as a result of the voltage of the capacitors fluctuating quickly, creating the appearance of yellow light.

The duty cycle is altered to favor one hue or the other as the average value of the slowly varying voltage from the slower timing capacitor alters.

As a result, the change in color appears to be mixing seamless. Hopefully the automatic RGB mixer effect can be utilized in a variety of ways.

You'll also like:

  • 1.  Switching OFF Lights in a Periodic Sequence
  • 2.  Remote Controlled Solar Lamp Intensity Controller Circuit
  • 3.  Simple LED Tubelight Circuit
  • 4.  Blinking an LED with Arduino – Complete Tutorial
  • 5.  Simple RGB LED Controller Circuit
  • 6.  How to Make a Simple 12 Volt LED Lantern Circuit

About Swagatam

I am an electronics engineer with over 15 years of hands-on experience. I am passionate about inventing, designing electronic circuits and PCBs, and helping hobbyists bring their projects to life. That is why I founded homemade-circuits.com, a website where I share innovative circuit ideas and tutorials. Have a circuit related question? Leave a comment.... I guarantee a reply!

Previous Post: « What’s PWM, How to Measure it
Next Post: Music Triggered Amplifier Speaker Circuit »

Reader Interactions

Comments

  1. Andrea says

    August 27, 2024 at 12:28 am

    hello Mr Swagatam for the: Simple RGB LED Color Mixer Circuit using LM317 IC (Pravin), what would be the voltage of the power suply and the Amp? Thank you

    Reply
    • Swagatam says

      August 27, 2024 at 12:11 pm

      Hi Andrea,
      For a single LED, the DC voltage must not exceed 9V, amp rating must be higher than the minimum rating of the LED.

      Reply
  2. Aly Lutgen says

    October 15, 2023 at 7:16 pm

    Hi. I have a question concerning the transistor circuit. If, instead of the common cathode RGB LED I used a common anode one, how would I have to change the power supply circuit? I also wonder if there mustn’t be any resistors “in front of” the LED input pins and if the 3 diodes are mandatory. And finally, what will become the color of the LED if Red and Green are 0 and Blue goes from 255 to 0; it cnnot be as in color mixing where the color becomes darker and darker blue and finally black. Thanks for any suggestions and help.

    Reply
    • Swagatam says

      October 16, 2023 at 12:21 pm

      Hi, For a common anode LED you will have to use use a PNP transistor based circuits.
      Yes you can remove those diodes, they are not required. Limiting resistors might not be required if you clamp the base/ground of the transistors with s 3.3 V zener diodes.
      Since black light from an LED is impracticable so it might not be feasible. The end result might a very dark blue dim light. I am just assuming this, I am not entirely sure about it.

      Reply
      • Aly Lutgen says

        October 17, 2023 at 7:27 pm

        Thanks for a really fast answer.
        Just to be sure: In the case of a common anode LED, the only thing to do is to use PNP transistors instead of NPN, everything else (including the connections within the power supply circuit) remaining the same? Have you an idea if there is a “standard PNP equivalent” for the NPN 8050?
        Have a nice day!

        Reply
        • Swagatam says

          October 18, 2023 at 11:48 am

          For PNP circuit everything the configuration exactly same as the NPN, except the supply polarity.
          For PNP the collector and the 1K junction will go the 0V or the ground supply, while the 10K pot lower end will go the +5V supply input.
          The common anodes of the LED will go to the +5V supply and the individual cathodes will to the emitters of the transistors.
          The PNP complementary transistor of 8050 is 8550, however you can use any other variant also such as 2N2907 or BD140 etc.

          Reply
          • Aly Lutgen says

            October 18, 2023 at 3:33 pm

            Thanks a lot for your help! You are really kind.

            Reply
            • Swagatam says

              October 18, 2023 at 4:57 pm

              You are most welcome Aly!

              Reply
  3. Neville Cawood says

    May 5, 2021 at 2:53 pm

    RGB in mid to high end computer systems is unavoidable nowadays and many people hate it.
    There is seldom a way to set the RGB to a single colour.
    (eg: Red for AMD or blue for Intel, white for seeing what you’re doing when working in the system)
    If there is; it’s through a bloated, buggy, resource hogging piece of software.

    Suggestion/request.
    A simple, 3 dial, hardware option that easily plugs into the 5 volt standby power of a computer PSU and to all RGB lighting, fans, etc.
    Allowing one can dail in any single colour you desire even when the system is off.

    I believe there’s a substantial market for such.

    Reply
    • Swagatam says

      May 5, 2021 at 4:54 pm

      Sorry I could not understand the objective of the design, Why do we need the 5 V from the computer, it can be acquired from any ordinary mobile charger unit. However, a 5 V supply cannot be sufficient for powering RGB LEDs and the fans together…

      Reply
  4. GeoffN says

    July 19, 2018 at 7:04 pm

    Hi Swagatam, I have some 3 watt RGB LEDs on a star base that have a common cathode, could you suggest a circuit setup to drive these. I have been toying with a PNP and NPN circuit with an Arduino but wasn’t very successful.
    Regards
    Geoff

    Reply
    • Swagatam says

      July 19, 2018 at 8:05 pm

      Hi Geoff, could you please specify on what manner or mode would you want to illuminate them?

      Reply
      • GeoffN says

        July 20, 2018 at 7:40 am

        Hi Swagatam, thank you for your reply. At the moment I only have two of them to play with, so I was thinking of just getting them illuminated as single RGB and then mixing the colours and fading and flashing. These are the specs for them Red: 2.5V ~ 3.0V, 350mA, Green: 3.2V ~ 3.8V, 350mA
        Blue: 3.2V ~ 3.8V, 350mA.
        Regards
        Geoff

        Reply
        • Swagatam says

          July 20, 2018 at 9:31 am

          Hi Geoff, and how do you want to implement the steps, through automatic sequencing or manually through a switch and potentiometer?

          Reply
          • GeoffN says

            July 20, 2018 at 10:13 am

            Hi Swagatam, I will be using the switch and potentiometer.

            Reply
            • Swagatam says

              July 20, 2018 at 4:36 pm

              Hi Geoff, I have updated a design idea which you could try. If you succeed in building it, please send the video clip to my email, if possible….

              Reply
            • GeoffN says

              July 21, 2018 at 5:15 am

              Thanks Swagatam, I will give it a go. The diodes, will 1N4818 suffice?
              Regards
              Geoff

              Reply
              • Swagatam says

                July 21, 2018 at 6:32 am

                You are welcome Geoff, since the LEDs are high watt, the diode must be 1N4007 or higher.

                Reply
  5. Linas says

    April 22, 2017 at 8:50 am

    hello, would this circuit work for RGB led strip?

    Reply
    • Swagatam says

      April 23, 2017 at 4:12 am

      yes it can be used with any RGB LED….you just need to set the voltage accordingly

      Reply
  6. Claudiu Dinca says

    January 12, 2017 at 2:44 pm

    which is the functional range of voltage

    Reply
    • Swagatam says

      January 13, 2017 at 5:19 am

      set it as per the specs of the LED…input can be minimum 3V higher than the LED voltage spec

      Reply

Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic! Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Subscribe to New Circuit Ideas

Categories

  • Arduino Projects (87)
  • Audio and Amplifier Projects (132)
  • Automation Projects (17)
  • Automobile Electronics (101)
  • Battery Charger Circuits (83)
  • Datasheets and Components (104)
  • Electronics Theory (143)
  • Free Energy (37)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (19)
  • Health related Projects (25)
  • Home Electrical Circuits (12)
  • Indicator Circuits (14)
  • Inverter Circuits (87)
  • Lamps and Lights (142)
  • Meters and Testers (69)
  • Mini Projects (46)
  • Motor Controller (64)
  • Oscillator Circuits (27)
  • Pets and Pests (15)
  • Power Supply Circuits (108)
  • Remote Control Circuits (50)
  • Security and Alarm (64)
  • Sensors and Detectors (101)
  • Solar Controller Circuits (59)
  • Temperature Controllers (42)
  • Timer and Delay Relay (49)
  • Transmitter Circuits (29)
  • Voltage Control and Protection (37)
  • Water Controller (36)

Calculators

  • Battery Back up Time Calculator
  • Capacitance Reactance Calculator
  • IC 555 Astable Calculator
  • IC 555 Monostable Calculator
  • Inductance Calculator
  • LC Resonance Calculator
  • LM317, LM338, LM396 Calculator
  • Ohm’s Law Calculator
  • Phase Angle Phase Shift Calculator
  • Power Factor (PF) Calculator
  • Reactance Calculator
  • Transistor Astable Calculator
  • Transistor base Resistor Calculator
  • Voltage Divider Calculator
  • Wire Current Calculator
  • Zener Diode Calculator
  • Filter Capacitor Calculator
  • Buck Converter Calculator
  • Boost Converter Calculator
  • Solar Panel, Inverter, Battery Calculator
  • Wire Current Calculator
  • SMPS Transformer Calculator
  • IC SG3525, SG3524 Calculator
  • Inverter LC Filter Calculator

People Also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |

Recent Comments

  • Swagatam on EGS002 Datasheet, Circuit Diagram Explained
  • Swagatam on How to Make IC LM339 Circuits
  • Swagatam on How to Make Dog Barking Preventer Circuit using High Frequency Deterrence
  • Swagatam on How to Buy and Use RF Remote Control Modules – Control Any Electrical Gadget Remotely
  • Swagatam on How to Generate PWM Using IC 555 (2 Methods Explored)

Company

  • Privacy Policy
  • Cookie Policy
  • About Me
  • Contact
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Quora
  • Stack Exchange
  • Linkedin
  • © 2025 · Swagatam Innovations