mosfets not turning off

complete noob to electronics and I'm having difficulties with using a mosfet board. I'm using a 12v battery to power lighting one a timing loop. I've verified the loop is working correctly through the serial monitor. below is a picture of the setup, as I don't know circuitry schematics yet.

mosfet.jpg

Post your (complete!) code! Please use code tags (the </> button in the editor)!

What type of Arduino are you using?
Post a link to the shield you're using.

Are you using a pull down resistor on the gate pin of the mosfet?

Arduino board is Uno R3 plus with a sensor shield

the breakout board can be found here
http://yourduino.com/sunshop//index.php?l=product_detail&p=60

int led1 = 1;

void setup ()
{
pinMode(led1, OUTPUT);
}

void loop ()
{
digitalWrite(led1, HIGH);
delay(500);
digitalWrite(led1, LOW);
delay(500);
}
</>

to my knowledge, there are already resistors to pull down the gate voltage

int led1 = 1;

So you're using the TX pin of the Uno?

Pin 0 and pin 1 are already used by the USB<>Serial chip.
Don't use those, and also avoid pin13 if possible.
Leo..

What's wrong with 13? The LED driven by it (buffered by a voltage comparator) won't affect anything.

You do know you can't put them all on the same heat sink like you have them you have the drains all together

you have to insulate them.

be80be:
You do know you can't put them all on the same heat sink like you have them

That's one of the dumbest comments I've ever seen: clearly, since OP already has them on one heat sink as you acknowledge, s/he obviously does not know that.

CrossRoads:
What's wrong with 13? The LED driven by it (buffered by a voltage comparator) won't affect anything.

Flasing during bootup.
Don't know if every Uno has this "feature".

be80be:
You do know you can't put them all on the same heat sink like you have them you have the drains all together

you have to insulate them.

Well spotted. It seems OP has lifted the mosfets from the board, and put a heatsink on them.
Not ok if you don't isolate the drains from the aluminium with mica/silpads and plastic TO-220 washers.
Leo..

juggerHorn there all tied together the poster needs to use Heat Sinks MOUNTING KIT TO-220

Thank you for the help!! and for the notice of the heat sync. these LED strips don't use that many amps, and the mosfets are rated to handle 30amp. at what point is a heat sync actually necessary. I'm also going to be running a pump that has a draw of 9amps. I don't want to roast any boards.. well.. any more..

Thanks again for all the help!

You want the heat sink you just want to isolate them with Heat Sinks MOUNTING KIT TO-220

Just like Wawa posted also.

The way you have it they all have there tabs which is the drain tied together.

That can cause problems.

The mounting kit insulates them but still lets the heatsink do it's job.

Four independent (not touching each other) L-shaped or U-shaped pieces of aluminium profile, with the mosfets flat on the board, could be easier.
Leo..

be80be:
juggerHorn there all tied together the poster needs to use Heat Sinks MOUNTING KIT TO-220

I'm not disputing that, and kudos for the spot.

The dumb part of your comment was to say "you do know you can't...." when obviously s/he did not know that.

But back OT: I'm wondering if the fact that an IRF540 is not a logic level mosfet is part of the problem.

juggerHorn:
But back OT: I'm wondering if the fact that an IRF540 is not a logic level mosfet is part of the problem.

Mentioned that in my post, but had to correct it.
OP seems to have the opto coupler version, where the mosfets gates are driven by the supply on the secondary side.
Not sure about the exact drive voltage, but it's likely more than 5volt.
I think I've seen a diagram somewhere on the net.
Leo..

Hi,
I think you will find the OP has one of these;


Although the opto will be different part, Quad-Opto.
Tom... :slight_smile:

midiean:
Thank you for the help!! and for the notice of the heat sync. these LED strips don't use that many amps, and the mosfets are rated to handle 30amp. at what point is a heat sync actually necessary.

The RDS(ON) is 77 mΩ for the IRF540. You should be able to dissipate at least 1W without heat sink, so up to 3.6A you should be OK.