How to control rgb light strip

I just bought cheap rgb light strip and I do want to cotrol it from arduino.

It have +, r, g, b pins on it. I connected positive to 12v and other pins to ground and It producted white light as it should.

Arduino nano can make pwm and range is 0-255, I couldn't connect it direcly to arduino because of current and voltage limits. I used irf9540n mosfet to control one color, there were three of those mosfets to control every color channel, but even when mosfets gate is connected to ground the led strip isn't fully light up and it can't product white light.

this is my simplified schematic:

Hi,
I'm not an expert in MOSFET, but I think that what you are using is not for logic level.
Search here in the forum and you will find dozens of topics about the use of "logical" MOSFETs.

It needs gate-source voltage to turn it on.

Here is a driver circuit with an N-channel MOSFET. When the gate is low (or grounded) it's off.

It is an inverting circuit... When the gate is high the drain goes low but since it's "ground side switching" current flows through the load and a high on the gate turns the lights on.

A P-MOSFET has to be connected on the high-side but a single MOSFET doesn't work if you are controlling/switching 12V because to turn it off you need 12V on the gate (in order to get zero volts between the source and gate).

You can leave-out the diode since you have a non-inductive load.

Is this a classic 5volt-logic Nano, or a newer 3.3volt-logic Nano.

The IRF9540n is not a logic level fet.
Poor choice for a 5volt-logic classic Nano, doesn't work at all with a 3.3volt-logic Nano.

You didn't post a link to the LED strip, how long it is, and what the current capability of the supply is.
Leo..

It's 5V arduino nano and I know that mosfet is poor choice for that application, but I had those lying around.

Led strip uses 15W and power supply is 12V 1,5A DC. It look like I have to find logic level mosfet. any suggestions?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.