# Basic mosfet switch question.



## Greg G (Dec 12, 2008)

In this schematic, provided by Jimmy M, would this circuit drain the batteries when the light is not in use? 

I'm considering building a mosfet circuit like this to use in a compact [email protected] where I discard the original bulky switch and use a microswitch to operate the mosfet. 

Thanks.


----------



## JWP_EE (Dec 12, 2008)

The type of FET used in that circuit has an off leakage of about 1uA (.000001A). If they were 1Ah batteries it would take over 100 years to drain them.


----------



## JimmyM (Dec 12, 2008)

What battery pack and bulb are you using? What are your size constraints?


----------



## Greg G (Dec 12, 2008)

The light will consist of 4 Cree Q5's in series driven at 1 amp, a Shark driver, and a Modamag 8aa battery pack. The tube is actually a NASCAR Fade "drop" that came from Mac, so the switch portion of the body is gone. I'm making a custom head for it.

Which mosfet would work for this application? Are the IRF510's from Radio Shack up to this?

Thanks,

Greg


----------



## JohnMuchow (Dec 12, 2008)

The IRF510 will work in that setup but will get pretty hot. The on-resistance is about 0.54 ohms when cool and about 0.75 ohms as it gets hot. This means there will be about 0.75W of heat (at 1A) for that little MOSFET to dissipate. You might need a small heat sink.

Does Radio Shack carry the IRF540N? It's a very common MOSFET and will only need to dissipate about 40mW when passing 1 amp. No heat sink needed.

John


----------



## Greg G (Dec 12, 2008)

I was planning to use Arctic Alumina epoxy to glue the mosfet to a Led Zep magsink. 

I am very open to using a different mosfet than an IRF510. I've read in other threads where Jimmy was looking at all the various ones to find one that required very low current on the gate.

Thanks.


----------



## JohnMuchow (Dec 12, 2008)

One great feature of MOSFETs is that they need only the tiniest amount of current through the gate to turn on....they're voltage controlled.

International Rectifier divides their MOSFETs (broadly, very broadly) into two groups, IRF and IRL. The IRF MOSFETs like to see about 10V at the gate to turn on hard. The IRL MOSFETs like to see about 5V at the gate to turn on hard. You can often use either one for higher/lower voltage applications, but those are rough guidelines. Dozens of other things to deal with for higher current, higher speed application though.

With 9.6V (nominal) available and only 1A of current flowing, you can use just about any MOSFET in a TO-220 case (like the IRF510) for your application.

I checked the RS web site and it looks like they only carry the IRF510. That will work, but if you want, PM me your address and I'll send you an IRF540N. It will run at room temp and will work great. I use different MOSFETs now for various stuff and don't need it. 

John


----------



## Greg G (Dec 12, 2008)

John, what do you think about his mosfet? It has a 1.7 mOhm Rds.

https://ec.irf.com/v6/en/US/adirect/ir?cmd=catProductDetailFrame&productID=IRFP4004PBF


----------



## JohnMuchow (Dec 12, 2008)

It will do everything you need but it's in a big TO-247 case and costs a lot more than the IRF540. It's overkill IMHO, but if it's easily available and can fit, it's a fantastic choice. The Rds-on and voltage ratings are no problem.

John


----------



## Greg G (Dec 12, 2008)

I was just curious about it. It's a big old honker. 1/2" wide and 3/4" long just on the body part. 

I plan to use the one you're sending. 

Many thanks!


----------



## JimmyM (Dec 12, 2008)

JohnMuchow said:


> One great feature of MOSFETs is that they need only the tiniest amount of current through the gate to turn on....they're voltage controlled.
> 
> John


They require almost no current, Nano Amps, to stay on or off. But require AMPS of current in a short spike to turn on or off quickly. In high current applications, a fast turn on or off is critical. In lower current situations, it's not as critical depending on the FET. A tiny SOT-223 FET would need fast turn on and off to suvive a couple of amps, while a big one (TO-247, etc) can do 2 amps all day in is linear range.


----------



## JohnMuchow (Dec 12, 2008)

JimmyM said:


> They require almost no current, Nano Amps, to stay on or off. But require AMPS of current in a short spike to turn on or off quickly. In high current applications, a fast turn on or off is critical. In lower current situations, it's not as critical depending on the FET. A tiny SOT-223 FET would need fast turn on and off to suvive a couple of amps, while a big one (TO-247, etc) can do 2 amps all day in is linear range.


I agree except that an application involving amps, or even hundreds of amps, can actually benefit from a slow turn on or off. It all depends on the application.

For high-frequency work, speed is everything and the less time you spend in the MOSFET's linear region the better. But, I build electronic loads from 100W to the multi-kilowatt level with MOSFETs that operate in their linear region and up to hard-on. When switching a 1,000A load off, it's much better to do so slowly to reduce the turn-off spike induced by the load or the inductance of the wiring and to minimize EMI. Each MOSFET is driven by an op-amp that only has a 30mA short-circuit current rating with an R-C filter on the gate to slow down the current flow, and thus the switching time, even further.

John


----------



## JimmyM (Dec 13, 2008)

JohnMuchow said:


> I agree except that an application involving amps, or even hundreds of amps, can actually benefit from a slow turn on or off. It all depends on the application.
> 
> For high-frequency work, speed is everything and the less time you spend in the MOSFET's linear region the better. But, I build electronic loads from 100W to the multi-kilowatt level with MOSFETs that operate in their linear region and up to hard-on. When switching a 1,000A load off, it's much better to do so slowly to reduce the turn-off spike induced by the load or the inductance of the wiring and to minimize EMI. Each MOSFET is driven by an op-amp that only has a 30mA short-circuit current rating with an R-C filter on the gate to slow down the current flow, and thus the switching time, even further.
> 
> John


Don't they heat up an aweful lot? Sure, with proper heat sinking, provided you stay under the curve of safe operation, "slow" is a matter of degree.
How big are these loads? I would imagine they are quite heavily heat-sunk. (is that even a word?). I understand exactly what you're saying, and with respect to inductance it makes perfect sense. Those hard turn-on turn-off current transitions are hell on inductance. But would the short wiring in a mag-mod and the filament of a bulb be a significant inductive load? I ask because I'm curious, not because I'm trying to poke holes in your reply. Which I think is quite sound.


----------



## JohnMuchow (Dec 13, 2008)

JimmyM said:


> Don't they heat up an aweful lot? Sure, with proper heat sinking, provided you stay under the curve of safe operation, "slow" is a matter of degree.
> How big are these loads? I would imagine they are quite heavily heat-sunk. (is that even a word?). I understand exactly what you're saying, and with respect to inductance it makes perfect sense. Those hard turn-on turn-off current transitions are hell on inductance. But would the short wiring in a mag-mod and the filament of a bulb be a significant inductive load? I ask because I'm curious, not because I'm trying to poke holes in your reply. Which I think is quite sound.


Hi Jimmy,
No worries, I actually appreciate it when someone finds a problem with something I've brought up. It means I'll learn something new and that's always a good thing. And you brought up some good points earlier. 

Regarding those loads...yup, they can get REAL hot. :huh:
Getting rid of the heat is the hardest part of the design and I have to pay very close attention to the safe-operating area specs and temperature ratings. The loads I've designed span a wide range, from 20W to 20,000W. A new product I've just recently released for limited distribution is rated for 500W (400W continuous), scalable to any power level, and is used to extend the discharge capabilities of a CBA or other discharger/analyzer. Finding the proper component/fan/heatsink combination let me take it from a shoebox sized monster down to something only a bit bigger than a CBA. But, that took almost two years of testing to do. 

IMHO, the inductance of the wiring in a mag-mod isn't that large but, IIRC, the faster the turn-on/turn-off is the more of an effect any inductance has. So I guess it all depends? I'm just glad that all my circuitry runs really, really slow and that I don't have to deal switcher power supplies and high-frequency stuff. Saves a lot of my neurons from being smoked. 

John


----------



## JimmyM (Dec 13, 2008)

JohnMuchow said:


> IMHO, the inductance of the wiring in a mag-mod isn't that large but, IIRC, the faster the turn-on/turn-off is the more of an effect any inductance has. So I guess it all depends? I'm just glad that all my circuitry runs really, really slow and that I don't have to deal switcher power supplies and high-frequency stuff. Saves a lot of my neurons from being smoked.
> 
> John


You and me both, John. My first attemp at building a PWM regulator for Mag lights was based on a 40kHz regulator (TI 5001). My GOD the ringing was awful. Most of the stuff I do now is low frequency. 175Hz for the JM-SST and ~250Hz for the HRDC (or PhD of you choose)


----------



## Daravon (Dec 13, 2008)

Question:

I understand that biasing the gate + turns the mosfet on. the 4.7 resistor to knock the voltage down makes sense because the gate can only take so much voltage, but what's the 10k for?


----------



## Mr Happy (Dec 13, 2008)

Daravon said:


> I understand that biasing the gate + turns the mosfet on. the 4.7 resistor to knock the voltage down makes sense because the gate can only take so much voltage, but what's the 10k for?


...to reduce the voltage. The two resistors act as a potential divider that reduces the voltage by 10/(4.7+10) or approximately 2/3.

A single resistor will not reduce voltage unless a current flows through it. The gate of the MOSFET draws no current, so unless the 10 k resistor is included no current will flow through the 4.7 k resistor, and therefore the full battery voltage will appear on the end of the 4.7 k resistor at the gate.


----------



## Daravon (Dec 13, 2008)

Of course. I always forget about that with high-impedence circuits. I forgot to ground the pot on an audio amp once for the same reason, of course it didn't work because the input stage of the amp is like infinite impedence.


----------



## Greg G (Dec 14, 2008)

So...riddle me this _Oh Wise Ones_.......

If let's say an IRF mosfet likes 10 volts at the gate to turn it on "hard", should we be checking the voltage at the gate and adjusting the resistor feeding the gate accordingly depending on our battery pack?


----------



## Mr Happy (Dec 14, 2008)

Greg G said:


> If let's say an IRF mosfet likes 10 volts at the gate to turn it on "hard", should we be checking the voltage at the gate and adjusting the resistor feeding the gate accordingly depending on our battery pack?


Not necessarily. The short answer is that there is no real point reducing the voltage applied to the gate unless it is too close to the maximum permitted. So for instance, if we look at the data sheet for the IRF540N we see under "absolute maximum ratings" that the maximum gate-to-source voltage is +/-20. So unless there is a danger of approaching or exceeding 20 V (for this specific MOSFET) there is no need to reduce the gate voltage to a lower value than the battery voltage.


----------



## JimmyM (Dec 14, 2008)

Daravon said:


> Question:
> 
> I understand that biasing the gate + turns the mosfet on. the 4.7 resistor to knock the voltage down makes sense because the gate can only take so much voltage, but what's the 10k for?


In the drawing the OP posted, it's to pull the gate down when the switch is opened. The 4.7K acts with the 10K to form a voltage divider, to lower the gate voltage. When the switch is opened, the gate charge dumps through the 10K.


----------



## JimmyM (Dec 14, 2008)

Mr Happy said:


> Not necessarily. The short answer is that there is no real point reducing the voltage applied to the gate unless it is too close to the maximum permitted. So for instance, if we look at the data sheet for the IRF540N we see under "absolute maximum ratings" that the maximum gate-to-source voltage is +/-20. So unless there is a danger of approaching or exceeding 20 V (for this specific MOSFET) there is no need to reduce the gate voltage to a lower value than the battery voltage.


Exactly. You would omit the 4.7K resistor, and use just the 10K.


----------



## Oznog (Dec 18, 2008)

There are plenty of teeny tiny MOSFETs that can switch many amps due to their spectacularly low rds-on. The lower rds-on means less heat and thus the smaller package.

You need to look at rds-on vs Vgs (battery voltage if no divider is used) and Id vs Vgs. See at a particular Vgs, it allows a specific gate current to flow. If the load doesn't draw that much, then it acts like a closed switch except for a small rds-on. Higher Vgs and rds-on goes down slightly. 

But, say your Vgs=6v when the batts are low, and the spec sheet says Id=1.5A for Vgs=6v but your driver- a switching driver- is supposed to draw current surges up to 2.5A due to its PWM circuit. Well, this is bad news because the MOSFET will instantly raise its resistance when current goes above 1.5A to limit the current to only 1.5A. Not only does that prevent the light from operating properly but will probably incinerate the MOSFET.

Note that a lot of garden-variety MOSFETs require >8v or even >10v to turn on fully. There are also ones which turn on fully at 5v, 3.3v, or even 2.5v. Also note that there are limits on Vgs, maybe 20v for the higher voltage gates but the low voltage gates may draw the line at like 8v.

Gates are very sensitive to voltage spikes. If you were to knock the case so the battery bounced off the contact for a moment, the inductive spike from the driver could create a positive or negative voltage that would destroy the gate. A zener diode on the gate (or some MOSFETs have internally protected gates) will keep it 100% protected.


----------



## JimmyM (Dec 18, 2008)

Without having to do a lot of research to find the FET you want...
I've found a few FETs that work very well for flashlight purposes.

For Battery voltage 6V<VBATT< 30V and Amps <10, the IRLR7843.
For Battery voltage 10V<VBATT<24 and amps <25-ish the IRF1324S.
For Battery voltage 10V<VBATT<40 and amps <20 the IRF2804.
Generally though, the IRF2804 is best if you have the room and it has a great voltage range. If you want absolutely the lowest Rds(on) (0.6 mOhm) and will never exceed 24V then go for the IRF1324.
For smaller installs the IRLR7843 or IRLU7843 will do 8-9 amps with no problems. This is the better choice for lower voltage lights like the 5761, 64275, etc. Anything from 5V-10V. The 7843 has better gate performance at voltages under 10V than the others.


----------



## Greg G (Dec 20, 2008)

Thanks for sharing that Jimmy. I'm saving that list for future use. I unfortunately don't have a lot of time to R&D everything I'd like to, and posts like this really help.


----------



## Greg G (Dec 20, 2008)

John, I received the IRL540. 

Thank you very much for helping me out with this, and all the information you've posted in this thread!


----------



## Illum (Dec 20, 2008)

JohnMuchow said:


> Does Radio Shack carry the IRF540N? It's a very common MOSFET and will only need to dissipate about 40mW when passing 1 amp. No heat sink needed.



IIRC last time I checked they only have the IRF510N:candle:


----------



## JohnMuchow (Dec 20, 2008)

Greg G said:


> John, I received the IRL540.
> 
> Thank you very much for helping me out with this, and all the information you've posted in this thread!


Excellent! Glad I could help out. 

John


----------



## The Dane (Nov 30, 2009)

Took the original diagram and modified it a little.
I needed something for 20V max but with a softstart to minimize bulb cold-blow.

The 4.7kOhm is changed to 2.2kOhm
The 10kOhm is changed to 4.7kOhm
A 10microF capacitor is paralleled with the 4.7kOhm resistor

This means that the gate will start at 0V and power the fet up in @ 0.5 sec.
This will eleminate the tendency og blowing (way) overdriven bulbs at cold start.

To further beef the circuit up i used a IRFS3206 FET
840A pulse, 120A continous and Rds is 2.4milliOhm.


----------



## JimmyM (Nov 30, 2009)

This approach has been discussed in the past. Using a cap to slow down gate rise. It will overheat the FET. 0.5 seconds is a long time to dissipate all that power. 0.1 seconds is a long time for this approach to work. That's why I went with PWM for the design of the JM-SST and the new voltage regulators.
It may be turning on in far less than 0.5 seconds though. The FET is FULLY on at Vgs = 10V. It may take 0.5 seconds for the gate voltage to rise close to the voltage divider max, but far less to get to 10 V.



The Dane said:


> Took the original diagram and modified it a little.
> I needed something for 20V max but with a softstart to minimize bulb cold-blow.
> 
> The 4.7kOhm is changed to 2.2kOhm
> ...


----------



## wquiles (Nov 30, 2009)

JimmyM said:


> This approach has been discussed in the past. Using a cap to slow down gate rise. It will overheat the FET. 0.5 seconds is a long time to dissipate all that power. 0.1 seconds is a long time for this approach to work. That's why I went with PWM for the design of the JM-SST and the new voltage regulators.
> It may be turning on in far less than 0.5 seconds though. The FET is FULLY on at Vgs = 10V. It may take 0.5 seconds for the gate voltage to rise close to the voltage divider max, but far less to get to 10 V.



+1

In fact I did pretty much the same circuit and ran bench testing on it back in 2005:
 bench testing of incandecent soft start ckt ...


Like Jimmy states, this design does not work that well (it is more of a delayed start, than a true soft start), but you can always do like I did and go ahead and built it and test it. It is the best way to learn about these circuits 

Will


----------



## JimmyM (Nov 30, 2009)

In that thread you were testing an MN61 bulb. Not a 64623 (or similar) monster. A 0.5 second start with a 100W bulb over driven will overheat the FET in short order. And you NEED to figure out a way to shut it off quickly. You can pretty much forget flashing this thing on and off.

What battery/bulb combo are you going to use?




wquiles said:


> +1
> 
> In fact I did pretty much the same circuit and ran bench testing on it back in 2005:
> bench testing of incandecent soft start ckt ...
> ...


----------



## JimmyM (Nov 30, 2009)

The Dane said:


> To further beef the circuit up i used a IRFS3206 FET
> 840A pulse, 120A continous and Rds is 2.4milliOhm.



The IRF2804 and IRF1324S-7P are both better for <20V operation.
The 1324 has 0.8 mOhms Rds(on) and a Pulse current rating of 1640A.


----------



## The Dane (Nov 30, 2009)

Me oh my, i must have a Midas touch
I just flicked this one on/off 50 times is as many seconds, with my thumb on the FET. No heat at all!
12V 50W bulb overdriven to 20.8V 5.5A (all my bench PSU can muster!)

So for my purposes and uses it works flawlessly


----------



## The Dane (Dec 2, 2009)

Can some of you knowledgeable guys please try to help me here.

I have put the above mentioned circuit together and tested it til i almost got a blister on my thumb. Not from FET heat but from flicking the contact on and off.

I am simply not able to get any heat build up in the FET, so:
What am i doing wrong?
Several comments mentioned FET meltdown when using my soft start approach, and it's simply not happening, what gives?

Bulb 64623 overdriven to @175W and thats it.


----------



## wquiles (Dec 2, 2009)

The Dane said:


> Can some of you knowledgeable guys please try to help me here.
> 
> I have put the above mentioned circuit together and tested it til i almost got a blister on my thumb. Not from FET heat but from flicking the contact on and off.
> 
> ...



Do you have some data (like a scope trace) that you can share with us showing what the circuit is actually doing?


----------



## paetzi (Dec 10, 2009)

Hi, i want to direct drive a sst 90 in a 3d mag.
What kind of mosfet is the best for this setting and what resistor do i need?
Hope you´ll help me.


----------



## JimmyM (Dec 10, 2009)

What's an sst 90? I'm assuming it's an LED. But what are it's specs. Voltage, amperage.
Thanks.



paetzi said:


> Hi, i want to direct drive a sst 90 in a 3d mag.
> What kind of mosfet is the best for this setting and what resistor do i need?
> Hope you´ll help me.


----------



## jtr1962 (Dec 10, 2009)

Greg G said:


> Which mosfet would work for this application? Are the IRF510's from Radio Shack up to this?


Lots of MOSFETs available through electronic supply houses which are way better than the IRF510. For example, I just received these for a project. On resistance is 0.014 ohms with Vgs of 10V, or 0.021 ohm with Vgs of 4.5V. They use a TO-252 SMD case (smaller than the IRF510 TO-220). You can solder the tab to a copper or brass plate for heatsinking although truth is you won't need it if your current is less than about about 5 amps. Best of all, they only cost me $0.189 in 250s. I can send you one or two to play with if you want.


----------



## paetzi (Dec 10, 2009)

Sorry. The sst- 90 is an led.
It runs with 3,7 Volt and up to 9A.
So around 33W.


----------



## JimmyM (Dec 10, 2009)

Thanks. You definitley need a logic level FET. There are several available.


----------



## Mark620 (Dec 10, 2009)

I do not understand : Why turning a FET on/off slowly produces a lot of heat while PWMing a FET does not produce the heat?


----------



## lctorana (Dec 10, 2009)

Mark620 said:


> I do not understand : Why turning a FET on/off slowly produces a lot of heat while PWMing a FET does not produce the heat?


Oh, that's easy.

When a MoSFET's in its off state, the current is zero. Zero power dissipated.
When a MoSFET's in the hard on state, the drain-source voltage drop is very low - close to zero. Very close to zero power dissipated.

It's only in the "in-between" state, where appreciable current flows with appreciable voltage drop, when you get appreciable power dissipation in the MoSFET.


----------



## Mark620 (Dec 15, 2009)

That makes sense, so the inrush current does not cause this device to heat up.? I would guess that if the rise time and fall times are "very" short that heat is not generated while "long" rise and fall times cause significant heating.


----------



## Jackspc (Mar 4, 2010)

JimmyM: 

I'm planning to replace the rocker switch in my mag458 with a mosfet. Is this the one you recommend?

As for the 4.7k and 10k resistors, what type and wattage do you use?


----------



## JimmyM (Mar 4, 2010)

That depends on a couple of things. First of all. That FET would be the one I would use. Second, the values of 4.7k and 10k are for a Maximum of 24V input. However, since this is direct drive, lets assume your pack voltage will not exceed 20V and we want to give that big FET plenty of turn on/off current, you should use 2.2k and a 5k resistors. That will cause a "bypass" current through the voltage divider of 2.8 mA. That's 0.017W through the 2.2k and 0.0392W through the 5k. So you can use any wattage resistors greater than 1/16W.
For even better turn on/off performance you could use 1.8k and 3.3k. This still only passes 3.9mA of current and you can use 1/16w resistors. Of course 1/8W and 1/4W are more common, so you covered with common 1/4W.



Jackspc said:


> JimmyM:
> 
> I'm planning to replace the rocker switch in my mag458 with a mosfet. Is this the one you recommend?
> 
> As for the 4.7k and 10k resistors, what type and wattage do you use?


----------



## Jackspc (Mar 4, 2010)

Thanks for replying so fast.
I'm using 5 IMR 26650's so the initial turn on voltage might be 21 but it would be pulled down pretty quick. Would those resistors still be ok with that?

What film type do you like? The thin and thick film are a lot cheaper than the metal film. Are they ok to use?


----------



## JimmyM (Mar 4, 2010)

Jackspc said:


> Thanks for replying so fast.
> I'm using 5 IMR 26650's so the initial turn on voltage might be 21 but it would be pulled down pretty quick. Would those resistors still be ok with that?
> 
> What film type do you like? The thin and thick film are a lot cheaper than the metal film. Are they ok to use?


1.8k & 3.3k should still be ok. For V/cell going from 4.2->3.3V that gives a gate voltage of 12.94->10.7V Should be fine. Thin, thick. I rarely care. In fact, I'm not sure what the difference is. Buy whatever is available. This application is pretty simple. It shouldn't matter.
I just looked. Thin film has better tolerance. But 5% is good enough.


----------



## Jackspc (Mar 4, 2010)

I also have a mag with an fm1909 bulb with 3 IMR 26650's and a mag ROP with 2 IMR 26650's. I've done the mag switch resistance mods on them but I still think they would benefit more from the mosfets.
What size resistors do you recommend for them?


----------



## JimmyM (Mar 4, 2010)

Jackspc said:


> I also have a mag with an fm1909 bulb with 3 IMR 26650's and a mag ROP with 2 IMR 26650's. I've done the mag switch resistance mods on them but I still think they would benefit more from the mosfets.
> What size resistors do you recommend for them?


To use the big FET above you need 10V at the gate.
So the ROP voltage will be too low. I put an FET into my ROP but I use the IRLR7843. The 3xIMR cell light can use the 1324 FET if you want to.
I'll get back to you regarding resistors. It's getting late here.


----------



## Jackspc (Mar 22, 2010)

I got the IRF1324 mosfet with 1.8k and 3.3k 1/4w resistors installed in my mag458 and it works great. :candle: 
It's nice to be able to use the mag switch again.
Thanks JimmyM!


----------



## JimmyM (Mar 22, 2010)

Jackspc said:


> I got the IRF1324 mosfet with 1.8k and 3.3k 1/4w resistors installed in my mag458 and it works great. :candle:
> It's nice to be able to use the mag switch again.
> Thanks JimmyM!


Oh, good. Glad it worked.


----------

