Lightsaber Lighting (mosfet problems)

I'm using a 9W rgb led, 3W per channel, to be used on a lightsaber project. My issue right now that I'm having is that the mosfet I'm using doesn't work in a predictable manor. Using the 5V output on my arduino pro micro to the gate of the mosfet the LED will dim sometimes and when I remove power from the gate the led will either turn on to full brightness like I expect or turn off randomly. The LED should turn off when I send power to the gate and turn on when the gate is off.

Here is the mosfet I'm using

The led I'm using

Also when I first tried using the blink program, the led would go bright then dim, then bright again while losing voltage.

Can we see the schematic you're using?

her is the layout.

Gate - Arduino VCC

Source - Buck converter output 2.8V

Drain - LED

Source - Buck converter output 2.8V

I think you assume a LED needs a constant voltage to run, which is not correct.
Maybe you DO need to post a full circuit diagram (pencil/paper, not Fritzing toddler art).

I don't know how to post a photo on the forum. I have a layout made I just don't know how to attach the photo.

Okay I figured it out. I was just being thick. Here is a diagram of the circuit.

That's only part of a diagram.
So where does that 2.8volt come from. A buck converter?

A LED should not be driven by a constant voltage, especially not a power LED.
A LED must be driven by a constant current. Then LED voltage will fall into place automagically.

Okay. So yes the led was being driven by a buck converter. So I can just remove it and put a resistor in their to limit it to about 1 amp. Sorry that it's only part, I'm newish to electronics and don't know the diagram for a buck converter, so I just gave what voltage I was providing to the led's. Would this however cause the random fluctuations that I was getting when I was driving it through the mosfet?

If that's the case, the finished product will running off of 2 18650 3.6V in series to power the LED and the arduino pro micro

Edit: Had the battery voltage wrong the first time and went back to correct it.

Can’t answer any of your questions before seeing a full circuit diagram with voltages and parts values.
Getting a (silly) constant 1Amp (*3) current through a star base LED, and powered from a single LiPo cell with a resistor is impossible.
Must choose your compromises.

Okay so rather than telling me what's impossible tell me what I should do!? The only thing that I'm changing about this diagram is literally that power is going to be from 2 LiPo batteries in series which should give me a voltage of 7.2 volts (3.6V per battery). I literally gave you every thing you need to know. For now I'm just testing out.

If this isn't enough tell me what exactly are you looking for! This is exactly the layout you need to know.

Also my first comment has all the parts that I’m using with datasheets if thats what you’re looking for.

Also attached is a .txt document that can be laoded into Circuit Simulator Applet. Just remove the resistor and viola you pretty much have what I was expecting to use if this is that much better!

Lightsaber Cicuit Simulation.txt (741 Bytes)

High time you read the "How to post" thread that you can find on top of every main page.
Not going to install a program to see your text file.

Just go to the website. No downloads at all. The website is just an online circuit simulation tool that my robotics/comp. sci teacher uses to teach electronics.

Plus you said you wanted a more complete diagram. This is pretty much what I plan, or planned, on doing essentially in diagram form.

Still an incomplete diagram.

So what kind of battery/voltage are you using, and why the buck converter.
Wouldn't it have been easier to use N-channel fets, and switch the cathodes of the LEDs.

Can't of use a single resistor for three LEDs with different Vf (red ~2.4volt, blue ~3.3volt).
If you do, then the red LED, with a lower Vf, will use most of the current.

Okay, for the experimental setup I'm using a 12V supply and dropping it down to 2.8V to power the red led (as this is the max voltage of the red channel if you go to the site where I got the LED's.) The P channel mosfet is just from me not understanding the difference between how n channel works from p channel, and, you probably already know this, the Arduino can't provide enough current to power the led at all. (Each channel of the led is about 3W so for red it will draw around an amp to power it) I did some digging and found maybe using an N channel would get it to work, and after figuring out how the N channel worked I tried it out. The issue was it was always on and also very, very dim. Also it isn't all that much harder to use an N channel over a P channel. I'm basically using it as a switch to allow higher current to flow through the LED. End goal will be to use a pwm signal to the gate of the fet and control brightness through that but I just want to make sure it turns on and off reliably.

Also what about the diagram I gave was incomplete. Please tell me because I can't make corrections if you don't tell me what to change. Kinda like telling me to change a tire without telling me what size lugs they are. I can guess but it'll take way longer to do the job. Especially since I've only got a high School level understanding of electronics.

Okay, for the experimental setup I'm using a 12V supply and dropping it down to 2.8V to power the red led (as this is the max voltage of the red channel if you go to the site where I got the LED's.)...

Not ok, and you understood that part wrong.

Vf is the estimated volt drop of a LED at absolute max operating current, at a certain temp, at a certain age of the LED.
If you supply a constant 2.8volt to a red power LED bluntly, then 200mA could flow, or 2000mA.
The only thing you must do is to keep LED current constant.
Then volt drop across the LED will be about 2.4-2.8volt for a red LED, and about 3.0-3.6volt for blue/green.

You should adjust the buck to 5volt, and use a different/calculated current limited resistor for each LED,
so that current is about the current you want. This circuit is the closest correct one I can find.
Then you can also power the Arduino from that 5volt supply (on the 5volt pin).

3*1000mA for an RGB LED on a star base is asking for trouble if you drive them all at the same time.
If you do, make sure you have spares.

You could have used something like a PicoBuck breakout board for your three LED channels.
Can be powered directly from 12volt,
and has solder bridges to change from ~330mA (~1watt) to ~660mA (~2watt) constant current.

Yeah I could've but I'm trying to make a lightsaber and would like to try and get as small a footprint can be because the size of the hilt is 10 inches long by 2 inches diameter with plans to eventually have a collapsing blade once I get this over glorified flashlight finished. So really I should make my own buck converter that way I can lay it out tighter for my needs.

Although, I'm a little confused. The documentation for the led states that it's operating 2.2-2.6V for the red. Is that the same as voltage drop?

With a single 5volt buck, and regulating LED current with resistors, you're dealing with a lot of heat.
Especially if you insist on driving the LED to 3*3watt.
That could be up to 15watt dissipated in the LED and resistors.
The power of a small soldering iron.

Never made a light sabre, but I've seen designs use high density addressable LED strips (two back to back).
That would eliminate the need for mosfets, and will spread the heat along the whole strip.

Where are you hiding that 12volt supply...

Although, I'm a little confused. The documentation for the led states that it's operating 2.2-2.6V for the red. Is that the same as voltage drop?

Yes, the LED drops about that voltage if you have it in a circuit. Must know that to be able to design the circuit.
Some LEDs drop 1.2volt, some drop almost 5volt. Largely depending on wavelength (colour).