Channel N MOSFET to LED Strip PIR Sensor project

I am about to start my project with an N Channel MOSFET to switch on and off a 12v LED strip. Can someone please explain to me how to hook up the 12v power supply, the LED strip and the Arduino Nano with the MOSFET? I have all of the solder sorted. I have bought mostly everything, with a few things arriving soon.

I found this, which might help. I'm definitely not an expert in electronics, but I have heard MOSFETs when no input is given, tend to "float" as explained in the post.

1 Like

You are on the correct tract. Using a N-Channel MOSFET as a low side switch is the easiest way to go. You can get them already assembled, simply called a switch, they come with opto isolation as well and under $5.00 US from your favorite china supplier.

To do it yourself be sure all grounds are connected. Logic Level MOSFET is good but be sure it is avalanche rated, that saves an external part called a flyback diode. All voltages related to the MOSFET are in reference to its drain, Vgs is Voltage Gate/Source, in your case needs to be on by 4 volts or less.

The hookup is straightforward, the Source is ground . From the Nano (5V assumed) connect the port pin to ground through a resistor something in the 10K range is good. Many people wrongly suggest you put the resistor on the gate; In doing this you create a voltage divider reducing the voltage to the gate and every tenth helps it turn on better. The reason for this is when the Nano is reset the outputs are floating until you set them so this keeps it off. I usually use a resistor about 50 Ohms to connect the Nano pin to the gate of the MOSFET. This is to prevent oscillation. With 50 Ohm resistor the peak load to the micro is a 100mA decaying pulse, under the 200mA stated in the UNO data sheet. The Nano uses the same processor. The load connects from the VCC (power) to the Drain (typically the tab) of the MOSFET. You may be able to do this without a heat sink but not enough details to be sure.

1 Like

I have a channel N MOSFET that’s not logic level. I want to use a 12v power supply to power an LED strip with a MOSFET as a switch. Do I need a logic level MOSFET for this? The ampage of the power supply is about 2-2.5 amps

You can use it by driving it with a PNP transistor in between the FET and the Arduino. Otherwise, you need a logic level FET. The transistor can pull the gate voltage up to 12V.

1 Like

Thanks. I’ll get that sorted.

@sidman27,

Your two topics on the same or similar subject have been merged.

(I also considered your third topic, which is pretty similar to this one, please, all your questions are about the same project so keep them in one topic so helpers can follow what you are doing)

Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.

Repeated duplicate posting could result in a temporary or permanent ban from the forum.

Could you take a few moments to Learn How To Use The Forum

It will help you get the best out of the forum in the future.

Thank you.

1 Like

See the examples in the schematics below.


1 Like

Thanks I didn’t know that. Noted.

I have a heat sink at the ready just in case because the lights I am using are said to be prone to heat. I don’t have many ways to get logic level MOSFETS around me so I will try to find one online. How do I check if it is avalanche rated? I’ll buy a logic level to replace my normal one.

You do not need a logic level MOSFET if you add a BJT in front.

How would I hook up the BJT to the MOSFET?

See the examples in post #8.

1 Like

Hi all. I have finished the circuitry, however, my light is not powering on. Just came on here for a few suggestions. The negatives of the light and the power supply are connected to the Channel N Logic Level MOSFET along with the arduino. The positives of the power supply and the LED strip are connected together. It is 12v at about 3amps. I’m not sure if it’s a soldering issue or if it’s a code issue but if someone could help that would be greatly appreciated

Try downloading Kicad or EasyEDA for free and then you will have a good way to create schematics for your projects in future. Alternatively get out the pen and paper and take a photo. Also post a photo of the real life wiring.

Creating a mental picture from words is just a recipe for confusion and error

1 Like

Thanks guys, sorry for the delay and not getting back to you. I have an update. The wiring works and the light works. I just soldered it wrong the first time. Now all I need is some code that switches a channel n logic level MOSFET on and off using a PIR motion sensor for arduino nano. Also, do I need to solder the nano to the perfboard. I’m sorry I don’t know much this is my first arduino project ever. Thanks for the help so far though

See posts above

Would you like a circuit diagram?

Yes, and your code and any pictures of your wiring. Basically read the guide to the forum