You're reading ...
Hardware, Project Progress

RGB LED strip control via DCC

The 2x RGB LED strip DCC control hardware is finished.

arduino_FETThe image shows the schematics to control one channel. The Arduino pwm output switches the gate of an NMOSFET. The FET switches the power, in our case the 12V of the LED strip. The resistor is there to keep the gate low, and the led’s OFF, when the Arduino is not powered. Six of these circuits are soldered on an Arduino experiment shield. They can be had for €1,25 over here.

LED_Control_TopThis way two RGB LED strips can be controlled. In the software they are connected like this:
pin 3 = R1
pin 5 = G1
pin 6 = B1
pin 9 = R2
pin 10 = G2
pin 11 = B2

LED_Control_BottomBesides the FET’s and the resistors a few push buttons are included, which have the following functions:
A4 = push button for selection of RGB1 or RGB2 adjustment
A3 = push button for selection increase or decrease light output
A2 = push button for R adjustment
A1 = push button for G adjustment
A0 = push button for B adjustment

2×4 screw terminals are used to conveniently connect the LED strips and 2×2 screw terminals to connect the 2 power supplies. (LED strips often come with a power supply and to use only one of them will not deliver enough Amps, hence we simply connect one for each strip).

The software was shown in the previous post and it can be downloaded from the Software page. It is included in the ‘all in one’ package as RB_RGB_LED_Fade_5.

LED_Control_Unit

About RudyB

Hobbyist

Discussion

8 thoughts on “RGB LED strip control via DCC

  1. Hi Rudy,

    Its been around 6 years ago since you made this nice sketch. I have build the setup for a 24V rgb led strip with some IRF510’s. It works very nice.

    The DCC part is more of a problem. It’doent always respond to signals i give. Not from my Z21 Wifi, nor from Koploper. I have a DR5000 Center.

    First i thought it was an other iffy Opto coupler, seem to have some around. But after installing the DCC Sniffer on the arduino. It worked fine.

    Any clue’s on what i am doing wrong? I used the schematics on your website. N-FET and DCC Input. And the only things i changed in the sketch are the DCC adresses of preset 1 to 6, and the color settings.

    Like

    Posted by Wijnand Laros | March 31, 2022, 18:01
    • If the sniffer sketch works, that tells the opto coupler seems OK, the DCC data reaches the Arduino. But then, if you load the LED sketch it doesn’t interpret the DCC data correct anymore? Hard to diagnose from a distance. As a test you could load the MARDEC software from http://www.arcomora.com in the Arduino and perform some more tests to see if it’s hardware or software related. DCC wires to the Arduino not too long? Sometimes adding an extra capacitor on the power line can help, or even a very small (a couple of pF) on the optocoupler output signal can help eliminate electrical interference.

      Like

      Posted by RudyB | April 1, 2022, 09:21
      • Het was IDD een EMF gerelateerd probleem. 100nf en 22pF hebben het probleem opgelost. ThanX.

        Like

        Posted by Wijnand Laros | April 1, 2022, 12:34
  2. Hi Rudy

    Just found a couple of IRF504A in my secondhand box (100v, 28A and Vg20v)so thought I would try them temporary using a breadboard. I have not used Arduinos before only PICs for DCC. Do I need pullup /down resistors on the push buttons?

    Like

    Posted by Gareth McNaughton | April 5, 2016, 20:17
  3. Hi Rudy

    I have just found your model railway site using Aquino’s. I don’t seem to be able to find the hardware list for the RGB mosfets types.

    Regards and keep them coming, great site

    Gareth

    Like

    Posted by Gareth McNaughton | April 5, 2016, 14:28
    • Hi Gareth. Indeed no specific type was mentioned, any NMOSFET you can get that can handle 20V and 2A and that will switch on with a Gate voltage of 5V will do. Just look what you can get at your local electronics store, or order some at Aliexpress.

      Like

      Posted by RudyB | April 5, 2016, 14:38
      • Hi Rudy

        Didn’t expect a reply so quick, many thanks. Will check locally (Durban, SA) or Aliexpress etc

        Regards

        Gareth

        Like

        Posted by Gareth McNaughton | April 5, 2016, 14:49

Leave a comment

Archive of all posts