Wiring to drive an RGB LED Strip

Thanks for the quick reply @peekay123 .

I am driving an LED strip for under my cabinets (white only). They are 12 Volts and take 4 Watts per foot. I have approximately 20 feet I need to drive for a total of approximately 80 Watts of power in a single channel.

I am planning to use this controller to handle the PWM for dimming tied to the Photon. I am planning to take the output from one of these channels to the input of the repeater.

I am planning to use a DIN Rail module to power the device.

@srfnmnk, looks good to me! If the 20ft is broken up, use all three channels of the repeater so as to not tax a single channel. Also make sure to follow all local construction codes and laws when connecting the DIN rail supply. Low voltage code is a lot more relaxed. Keep us updated on this cool project!

Will do. Thanks for reviewing. I’m new to working with high voltage so yes, I am a member on a few electronics forums and they usually sanity check my ideas and help me find relevant codes and ways to implement.

One more quick question. I’d like to run 24VDC into the amplifier so as to cut down on the AMP pull (hopefully reducing heat) but my LEDs are 12VDC. I can’t tell from the data sheet if this will output the same voltage that you input. It says it accepts either 12 OR 24 VDC input but doesn’t tell you what the resulting output voltage would be. Anyone else see where that might be?

I appreciate the help.

@srfnmnk, reading the installation instructions (PDF) it seems that the output voltage matches the input voltage so you will need to stick to 12V in. If you can split the 20ft span into three spans, you could split the current over the three channels.

One thing you need to note is that powering an entire 20ft span from a single point may not be the best idea since the current for the entire span must be carried by those entry wires and the copper on the strand. Splitting up the strands reduces that requirement. In the least, power both ends of the 20ft span.

Right, so I think that’s what I’m going to do is split t up across the 3 channels at 12 volts.

Thank you.

1 Like

Hi, I have a doubt about the resistors I should use. I got this RGB Led Strip and this N-Channel MOSFET. My problem is that when I use resistors like in your diagram, the strip doesn’t show the right colors or the blue color doesn’t turn on. It works fine when I take the resistors off. Like in my diagram. Should I keep it like this? Or I’m missing something?

Hi @utiq

The gate resistor between the Photon outputs and the gate of the MOSFETs are traditionally used to limit the current going into the gate. The Photon has some limits on the output current per pin, so it will likely work OK with the resistors.

I think you could have had too large a value resistor which can cause problems. With a 3.3V output from the Photon and 2V Vgs threshold to turn on the FET, you can’t lose more than 1.3V across the resistor, so I would choose 1kohm or so.

You also do not show any common ground connection between the Photon ground and the +12V supply ground. Without that, the voltage outputs of the Photon have no common reference and the FETs will act weird, including not turning on or off.

1 Like

Thanks @bko!

I did this and I think it works better. I added 1kohm resistors.

Something that I don’t understand is why when I connect Blue to an analog pin (For example A3), it doesn’t work. It only works if I connect it to a digital one (D0 in my case).

This is my code https://dl.dropboxusercontent.com/u/66959362/rgb.zip

1 Like

A3 is a DAC pin (just as A6/DAC) and not PWM.
You should look at the docs for the pins to use for PWM
https://docs.particle.io/reference/firmware/photon/#analogwrite-pwm-

1 Like