Cheap/easy/efficient way to switch 5A without a 5A switch?

Hey guys,

The board I'm currently developing has the potential to draw a lot of power, and I need a way to disconnect the battery from the voltage source. Normally I'd just use a switch, but switches you would mount on the board which can handle >5A are kind of bulky and expensive ($2-$3 is a lot when you're thinking about having 50 boards made), and there's not a whole lot to choose from.

A relay would be an obvious solution, but since this is a battery powered device a relay would be too wasteful. Also I imagine they're even more expensive than a switch. And probably too bulky for a tiny SMD board to boot.

I'm probably just going to live with there being only one or two good on-board switch choices, and have a terminal block for mounting an external switch for which the current won't be an issue, but I'd still like to know if there is some really obvious way that everyone handles this problem.

I thought perhaps a mosfet would do the job. I found this one that can handle 8A:

I'm not sure how you use it, I haven't used one before and the circuit diagram is a bit confusing, but it is a transistor and if I'm not mistaken switching large currents is what they're deigned to do.

As I mentioned in other threads though, I am kinda squeezed for space on this board, so if I could avoid using another component entirely that would be nice. So another thing I've been wondering about is if there isn't some kind of voltage regulator with a built in switch.

That's not the right part - that one is intended to drive a 2nd transistor that actually controls the current.

A part like this would probably be better as a High Side switch -that is, it switches the 5V on and off to the circuit.
You would have the Gate pulled high to turn things off.
A switch would take it low to turn things on, your circuit would then hold it low to keep things on.
Your circuit releasing the gate then lets it get pulled high to turn the MOSFET off.

I'm sure there are applications written up covering that kind of behavior.

Hm, if I understand you right, what you're suggesting is a setup where I could either use a regular switch or a momentary pushbutton to pull the gate low, and then either the switch could continue to hold it low, or the microcontroller itself would be connected to it via a pin and hold it low after the pushbutton is released, in which case it would work like the power button on many modern electronic devices.

That's a neat idea. But how would the microcontroller know when to turn the device off again if the pushbutton were only connected to the gate and ground?

So I did some reading on mosfets being used as switches and like you said, high side seems to be the preferred way of doing things. I still don't have a real good grasp on exactly how that's wired up, but it seems that you need a p-channel mosfet for that, and that's what you've linked to.

Here's another p-channel I found in my search for the least expensive / smallest one:

Would that be suitable? I notice the gate charge voltage is lower on that. I don't know what that is though. If it helps, I'm trying to design my circuit to handle at least a little over 12V on the input. 16V would be nice. That drain-source voltage on the absolute max rating is a concern though. I'm not sure if that -12v is calculated by subtracting drain from source or if the dash just means "drain to source". But some other documents indicated Vgs means Vg - Vs, so I'm thinking Vds is the same. 5v - 12v = -7 so I think both Vgs and Vds might be okay?

That one you linked might not be suitable due to to the package. I'm not sure if the PCB manufacturer will do pads on the bottom like that with their low cost assembly deals.

Devils advocate

Not cheap or small, but easy:

Bistable or latching relay.

The part you linked to has a higher Rds
Drain-Source On-State Resistancea RDS(on)
VGS = - 4.5 V, ID = - 5.1 A 0.0285 0.035
VGS = - 2.5 V, ID = - 4.5 A 0.036 0.045 ?
VGS = - 1.8 V, ID = - 2.0 A 0.046 0.059

so it will run warmer at higher current.

The surface mount part I linked is installed like any other surface mount part.

To turn the part off, you will just stop driving the gate low, the pullup resistor will turn it off.
When to turn off is decided in your code - time on, button read, etc.

Latching relay is likely to be a larger part. And you have to be able to pulse current both directions to make it switch.

Can you use the power connector as the switch? Can you switch the power coming to the board instead of having a switch on the board? Adding some transistor device just adds complexity, and probably doesn't help reliability.

Putting the power switch on the power cord wouldn't solve my problem. The switch was going to be off the board anyhow, and either way it would still have to be able to handle the current, and that would limit my choice of switches.

The reason I need to do this is because the board I'm designing is for a replica movie prop and the end user will want to be able to select whatever switch looks best. They also won't know enough about electronics to select a switch capable of handling the kind of current the board might draw in their particular application. So putting as little current as possible through the power switch is the safest and most flexible setup.

I've decided I'll probably go with a mosfet. It looks like I can get a tiny one that can handle the current I need. I just need to understand how to select one and wire it up properly. The information provided so far has been helpful, but I'm still foggy on the details and I wanna understand this thing well before I stick it in my circuit.

So I've been reading pages and pages of stuff about mosfets and I'm still confused about a few things:

  1. Why is it recommended I use a p-channel mosfet on the high side, rather than an n-channel on the low side?

I understand that a high-side n-channel isn't a good idea. It seems there is a voltage drop and a need for a bootstrap capacitor. But there seems to be no such issue with a low side n-channel and most of the tutorials seem to be about n channels, and the cheapest high power mosfets seem to be n-channels as well.

Is it because in a low-side setup with an N-channel mosfet, the gate needs to be pulled high, and that would mean if I had a 24v source, Vg would be 24v, Vs would be 0, and Vgs (which is Vg - Vs) would be 24v, and Vgs = 24v is too much for the mosfet to handle?

But in a high-side setup, isn't Vgs going to just be -24v instead, so there would be no benefit to that setup?

  1. Is a resistor needed on the gate to limit the current flow through the switch? What would be a good value for this? How would I calculate it?

  2. Will the mosfet be drawing power all the time when it is off? I saw a post on Sparkfun where someone mentioned this in regards to their n-channel mosfets. I guess they don't turn off completely unless you pull the gate to ground via a 1M resistor? With a 1M I guess I wouldn't need to worry about draining my battery too much when it's off. I don't know how fast that would turn off though. 100K and 10K are suggested for faster turn off at the expense of more current.

Oh and just so you know, the circuit won't be running off 24v, I just used that as an extreme example because I don't know what voltage the mosfet might be able to handle at the gate. The voltage in my circuit should actually be limited to around 12v, though I'd like the option to go up to 16v is possible since the rest of the components can handle that.

I'm trying to calculate how much power the mosfet will need to dissipate as well.

Is this correct?

Rds (resistance between source and drain) = 35 milliohms = .035 ohms
Id (current at drain) = 5A

P = I^2 * R

So:

5A^2 * 0.035 = .875 watts

It seems a little odd to me that the voltage isn't taken into account there.

P= I^2 * R

V= I*R, subsititute in:

P = I * V
P = (V^2)/R
take your pick.

Will add something about the rest when I get home

P= I^2 * R

V= I*R, subsititute in:

P = I * V
P = (V^2)/R
take your pick.

I think I get what you're trying to say... that voltage and current are related. I still have a hard time wrapping my head around that concept.

If I understand right though, then I think knowing Rds and Id, I can calculate the voltage drop across the mosfet like so:

P / I = V
.875W / 5A = .175V

Is that correct? Would there be a .175v drop across the mosfet if I'm drawing 5A from it and if Rds were 0.035 at Vgs = -12v?
Or should I perhaps be using Vsd for this calculation, and Vgs just happens to work here cause they're the same?

I've also created a schematic for how I think this is all supposed to be wired up:

Is the switch supposed to just go directly to ground like that, or should there be a resistor?
And is 1M a good choice for the pullup on the gate, or would a lower value be fine / better? Could I use a 10K or would that drain my battery?

  1. P-channel vs N-channel. P-channel, only the MOSFET has power live at its terminal, vs the whole circuit being 'live' waiting for a ground connection to be made.

  2. Power: power dissipated by the MOSFET is I^2R, or 5A * 5A * 0.020ohm with the MOSFET I suggested, or 0.5W.
    Voltage loss across the MOSFET Vds will be V=I
    R = 5A*.02 = 5*.02 = 0.1V.

Smaller resistor would be okay, current into the gate will be minimal.

Smaller resistor would be okay, current into the gate will be minimal.

I take it this means you think my schematic is okay as is then?
How do I calculate how much current will flow into the gate?

only the MOSFET has power live at its terminal, vs the whole circuit being 'live' waiting for a ground connection to be made.

I don't understand the concept of the circuit being "live" when power isn't applied to it. How does it make a difference if +12v line is attached to the regulator, or 0v? It's all relative potential, isn't it?

If you look at sheet 2 of the part you found,
you'll see this
Gate-Source Leakage IGSS VDS = 0 V, VGS = ± 8 V ± 100 nA
So not much current is going to flow into the gate.
When the gate switches on/off tho, you want it to do it quickly so you don't have 5A trying to flow while the part is transitioning from off to on.
A lower value resistor to pull the gate high quickly to turn off quickly is thus better.

The circuit being "live" is a safety thing - do you turn off your high power electric circuits by switching the ground off? Or do you take away the 120V source instead?

The circuit being "live" is a safety thing - do you turn off your high power electric circuits by switching the ground off? Or do you take away the 120V source instead?

Take away the 120V source, but I don't really understand why. First of all, it's AC, so current flows both ways. And second, I know that in a DC circuit electrons really flow from the - to the +, and the holes the other way, and that what charging a battery does is create a surplus of electrons on one side and a shortage of electrons on the other. So if you were to touch either side, assuming you were electrically neutral there ought to be an equal chance of electrons either flowing from you or to you.

I think there's something going on with AC that I don't fully grasp though. I know AC is grounded to earth somehow. I don't know how that works with the current flowing back and forth, but something tells me it's bad to be at ground potential and touch the "live" wire.

Back on the subject of mosfets though...

If you look at sheet 2 of the part you found, you'll see this
Gate-Source Leakage IGSS VDS = 0 V, VGS = ± 8 V ± 100 nA
So not much current is going to flow into the gate.

That part I linked to...

Would that even be okay to use in my circuit if my battery were 12-16v?

The reason I ask is it says under absolute maximum ratings: "VGS ± 8v"
And if I'm not mistaken, if I put 16v in I'll have Vg = 0v, Vs = 16v, and Vgs =-16v, which would appear to exceed that rating

On a related note, if you were looking for a mosfet on Digikey how would you determine what voltage the gate can handle? They don't seem to have a parameter specifically for that. The nearest they have is Vgs(th) (Max) @ Id, but the ratings for that are all really low, like 1.5V @ 250µA, and when I look at the datasheets for the corresponding parts, they can clearly handle far more voltage on the gate than that.

When the gate switches on/off tho, you want it to do it quickly so you don't have 5A trying to flow while the part is transitioning from off to on.

But if the mosfet's resistance is high when it is off, and low when it is on, and the voltage is constant, then doesn't that just mean while it is turning on less current will be able to flow? Why is it bad if it take 1 ms to turn on fully instead of a ns?

A lower value resistor to pull the gate high quickly to turn off quickly is thus better.

Do you have any specific recommendation? I don't know how to calculate how fast it will turn on with different resistances, or how to take this:
Gate-Source Leakage IGSS VDS = 0 V, VGS = ± 8 V ± 100 nA

...and calculate how much current will flow through the gate at different resistances.

Hmm. I'm thinking:
Gate-Source Leakage IGSS VDS = 0 V, VGS = ± 8 V ± 100 nA

Is a maximum regardless of whatever pullup resistor I choose.

I'm also thinking that what I should worry about, besides how fast the resistor I choose can pull up the mosfet, is the leakage from +12v to ground via the resistor when I have my switch closed. Which would be around 1.2mA with a 10K resistor and a 12v supply.

But that's when the device is powered up. The 100nA would be what it draws when it's off.

Now I need to know why starting the mosfet up slow is bad, and how to calculate how fast a particular resistor will pull it up, and how fast I really need to pull it up.

If you're planning to source from 16V, than a part with absolute max of 12V is underrated.

You've got a 16V, 5A source. If you supply power to your circuit, and turn the circuit on/off by connecing the ground, then your circuit is live any time power is applied. And if you happen to touch something inside, then you are liable to act as the ground.
If you turn the 16V on/off tho, then the circuit is not live when power is removed and you can tough anything except the MOSFET and not have to worry.

Same with an AC powered circuit - you have a hot wire, usually Black in the US, a return, usually white, and sometimes ground, usually green.
Return connects to ground back at the circuit breaker box - and black is hot. So if you switch off the hot wire, the rest of the circuit is not active. But if you turn it off by switching the return, then the circuit is live and looking for a ground path - and you don't want that to be you.

Back to digikey
I did a search for p-channel mosfet, single fet, in-stock, with a Vds of 20V and Ids of 6A to provide some margin, then browsed the results for a part with low Rds - and guess what came up:

Or you could save 21 cents and use a part with twice the resistance

Power dissipated: 5A x 5A x 0.02ohm = 0.5W
vs 5 x 5 x 0.41 = 1.025W

I think I'd go with the cooler running part.

You want it to switch fast. If you look at the data plots, you can see that all the best numbers occur when Vgs >4.5V - lowestRds, lowest capacitance, etc.
If you slowly go from off to the on-state, you sit in the higher Rds region longer and generate more heat.

Yes, you'll need a transistor to hold the part in the on-state - a simple NPN, wired as open collector, the collector will go up to 16V when it is not driven by an arduino pin to let the MOSFET gate get pulled high to turn off the voltage.