Connect with us

Powering and Controlling RGB LEDs, using 12vDC and multiple toggle switches

Discussion in 'LEDs and Optoelectronics' started by new11, May 6, 2021.

Scroll to continue with content
  1. new11

    new11

    17
    0
    May 5, 2021
    Hello all,
    I hope everyone is having a wonderful May!

    Just a quick question/project I was hoping someone wouldn’t mind lending some of their thoughts on, please.

    So I’ve a couple of; 12v 4 pin RGB 120mm PC fans that I would like to install in my networking cabinet. One of the cables on the fans is a 12vDC lead with a molex connector on the end. The second cable is a 4pin RGB connector. This has the following wires: 12v, Red wire, Green wire, Blue wire.
    To power the fans I will simply cut the end and wire it to a 12vDC power adaptor. (This is not represented in the attached diagram)

    Ordinarily to power/control the RGB lights on the fans, you would use a controller. However, I would love to be able to do away with the controller and wire the fans to simply use a few toggle switches. Also, it makes for a very simple fun little project.

    Now to the question;
    If I cut the end of the RGB wire that has the connector and then wire everything in the below configuration, would this work, or should I be wiring or using a different method? What I’m hoping to achieve is the ability to switch on or off the following colours using a toggle switch: red, green, blue, magenta & cyan.

    Switch materials:
    • 2x SPST On – Off
    • 2x SPDT (On – Off – On)
    • 2x DPDT (On – Off – On)
    12vDC power for LEDs
    12v wire from the 4pin RGB connector > SPST (On – Off) > 12VDC wire from power adaptor.
    Red Colour:
    Red wire from 4pin RGB connector > SPDT (On – Off – On) > Ground wire from 12vDC power adaptor
    Blue Colour:
    Blue wire from the 4pin RGB connector > SPDT (On – Off – On) > Ground wire from 12vDC power adaptor
    Green Colour:
    Green wire from the 4pin RGB connector > SPST (On – Off) > Ground wire from 12vDC power adaptor
    Magenta Colour:
    Red & Green wire from the 4pin RGB connector > DPDT (On – Off – On) > Ground wire from 12vDC power adaptor
    Cyan Colour:
    Blue & Green wire from the 4pin RGB connector > DPDT (On – Off – On) > Ground wire from 12vDC power adaptor

    Not too sure if the above circuit would even work, but I’d love to hear everyone’s opinion or ideas. I’ve made a very simple diagram using Word. This might help to explain my idea better.

    The idea was inspired by “ZedsTech101” from Youtube.

    Many thanks in advance for any feedback or assistance! :)

    P.S. First time if attempted wiring that is this involved? I have only made a couple of simple on/off switches for 12vDC, so I do apologise in advance for any incorrect terms.
    P.P.S. Apologies also if the question is posted in an incorrect place.
     

    Attached Files:

  2. Harald Kapp

    Harald Kapp Moderator Moderator

    11,642
    2,690
    Nov 17, 2011
    Your scheme will work fine for R, G and B.
    R+G is not magenta. For magenta use R+B.
    If you connect R+G for magenta and G*B for cyan, however, you will always have e.g. magenta whenever you turn on R or G.
    You will either have to use double pole switches or decoupling diodes. I'll show you both methods:
    upload_2021-5-6_6-42-5.png
    The disadvantage of the first solution is that you need two different kinds of switches.
    The disadvantage of the diodes is the voltage drop across the diodes which will make magenta a tad darker than pure red or blue. But on the other hand you'll have two LEDs on instead of only one, that will more than compensate. Then again you may want to add resistors in series with the diodes anyway to match the brightness of magenta to that of pure red ore blue.

    For cayn it's the same, only you use other color connections.
     
    new11 likes this.
  3. new11

    new11

    17
    0
    May 5, 2021

    Hi Harald,
    Thank you for the post.

    Ah yes, too right you are. I had missed that typo. I think I may pass on the diodes. But thank you for the feedback!

    Ok, so the general wire layout is about correct. I have refined some of the wiring for the switches. Would you mind having a quick look, please? Just double-checking, to see if I have made any mistakes.
    I do realise that this layout would use a few more switches and that I could do without the DPDT switch simply by turning the red and blue switches on. However, switches are cool.
    switch pinout 1.jpg
     
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    11,642
    2,690
    Nov 17, 2011
    The lower part of your diagram for magenta and cyan makes no sense.
    Show DPST switches as you did for R, G and B, not a blue blob. See my post #2 for reference how to do this.
    Also there is no cyan or magenta LED connection. You'll have to use R+B or G+B for that. And then you'll have to use 2 DPST switches, one for magenta, one for Cyan. Wired as shown in the top figure in my post #2.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-