Help Selecting a MOSFET for Turning Peripherals On and Off at 3.3V

Hi,

I am running an Atmega328 at 3.3V 8Mhz on a breadboard with a couple of peripherals / modules connected which are also running at 3.3V. I am trying to keep everything as low powered as possible so I only want these modules powered up when in use and then powered down again.

Having done some research I am lead to believe a P-Chanel MOSFET would do the job but I'm very confused over which one to select or what the circuit should be (gate resistors, pull up resistors etc).

The total "load" will not exceed 500mA so it must be capable of handling that.

Any help greatly appreciated!

Hi,

Is there any inductive load ?

Hi Standby. Thanks for replying!

No, there is no inductive load - I should have mentioned that in my OP. Sorry.

I am planning on using the 'FET to power up / power down a transmitter module - and maybe one or two other modules later down the line if things work out.

I mentioned about these DRA818 transmitters to a friend who immediately suggested trying to build a foxhunt transmitter with them so that's what I'm attempting.

I've been doing a fair bit of reading about controlling power with FETs but it's left me a little confused.

All the examples I see are for switching a higher voltage to the peripherals eg 3v3 at the gate and 5v at the source so I'm not sure how I would do what I'm trying to do.

Normally I'd just use a relay but I'm trying to save as much power as possible.

I have been looking at the NDP6020P as a potential candidate but I'm not entirely sure it is what I want.

Also I've read stuff where people say to that any pins connecting from the Atmega to the Peripheral Devices should be written LOW so they can't leak power. So in my case, I have TX, RX and PTT pins from the Atmega to the transmitter which will want writing LOW before powering off?

I'm sure I read that it has something to do with stopping the pins latching in a state which allows a current or voltage drain? I'm not 100% sure as I'm still processing everything I've been reading LOL

Thanks again!

You need a p-channel logic level MOSFET with Rds(on) specified for Vgs of 3.3V or less (in the datasheet
it will usually be quoted as -3.3V, since this is the voltage of the gate w.r.t. source)

Typically such MOSFETs are surface mount, not through hole, since this is not the 1980's any more(!),
which can be annoying for prototyping. So a good search tool is needed, ie digikey/mouser/farnell etc
are the places to go to look.

At a pinch a logic-level FET designed for Vgs=-4.5V might do... But you take a risk assuming that.

Thank you for the replies and the help from everyone so far.

Things are beginning to make more sense with how these MOSFETS work - I think..

So as I understand it, the kind of 'Fet I need is one where it is "fully on" when the gate is saturated? with the max voltage the gate needs to turn it fully on? So in my case I want a logic level fet that is "fully on" at 3.3V or less at the Gate Pin.

What I am not sure of and still a little confused is with the source voltage. Do I have to use a source voltage that is higher than the 3V3 at the gate or does it not matter? If I think in terms of a normal mechanical switch then the voltage being switched shouldn't matter but these are not mechanical switches.

As I think I understand it in layman's abstract terms, if I max out the Gate to turn it fully on, I shouldn't see any voltage drop or very little and I can draw the max current rated for that Fet. If I only partially turn the Gate on I can only draw a limited amount of current and I get a voltage drop?

What I don't want to do is end up with a partially "on" Gate / Fet and my 3V3 ending up at 2V @ 10mA by the time it reaches my peripheral devices LOL.

I know it has something to do with the resistence of the Fet somehow which varies depending how much voltage is being provided to the Gate pin within it's range. So like, a gate which wanted 5V is only getting 2.5V is only half on which results in a voltage drop between Source and Drain?

Wow - that's a lot to get my head around for a switch hehe. Am I even close to being correct?

So if I'm right in my understanding, I want to be selecting a Fet with a Gate voltage of 3.3V or less. And if the voltage being "switched" can be equal to or greater than the gate voltage then I should be able to find what I need that's rated for at least 500mA and will switch 3V3 or greater.

Assuming I'm right?

Thanks :slight_smile:

Perhaps a BS250P might work for your.

John

A BS250P is entirely hopeless, it has a 10V minimum gate drive and a phenomenally large on-resistance of
14 ohms, it couldn't be less appropriate.

We need a 3.3V logic-level p-channel MOSFET, preferably 0.2 ohms or less on resistance (we don't know
the load current, but at 3.3V you can't afford much extra voltage drop).

A quick search at farnell turned up http://uk.farnell.com/vishay/si2301cds-t1-e3/mosfet-p-ch-20v-3-1a-sot-23/dp/2335284

as I suspected surface mount.

pi_and_chips:
Thank you for the replies and the help from everyone so far.

Things are beginning to make more sense with how these MOSFETS work - I think..

So as I understand it, the kind of 'Fet I need is one where it is "fully on" when the gate is saturated? with the max voltage the gate needs to turn it fully on? So in my case I want a logic level fet that is "fully on" at 3.3V or less at the Gate Pin.

Gates don't saturate. The device is on when the channel is fully formed, ie beyond the charge plateau.

What I am not sure of and still a little confused is with the source voltage. Do I have to use a source voltage that is higher than the 3V3 at the gate or does it not matter? If I think in terms of a normal mechanical switch then the voltage being switched shouldn't matter but these are not mechanical switches.

In a p-channel enhancement mode MOSFET the gate must be negative compared to the source to turn on the device.

As I think I understand it in layman's abstract terms, if I max out the Gate to turn it fully on, I shouldn't see any voltage drop or very little and I can draw the max current rated for that Fet. If I only partially turn the Gate on I can only draw a limited amount of current and I get a voltage drop?

Pretty much - you need a full channel to get low on-resistance.

What I don't want to do is end up with a partially "on" Gate / Fet and my 3V3 ending up at 2V @ 10mA by the time it reaches my peripheral devices LOL.

That's why you calculate the maximum on-resistance you can tolerate and select a device with
a resistance no larger.

I know it has something to do with the resistence of the Fet somehow which varies depending how much voltage is being provided to the Gate pin within it's range. So like, a gate which wanted 5V is only getting 2.5V is only half on which results in a voltage drop between Source and Drain?

You get no guarantee of device behaviour outside the limits provided in the datasheet because there is
much device variability in gate voltage. Give a gate 2.5V when its only spec'd for 5V means you have
no idea if it will carry 1mA or 10A. You just don't know without measuring each device individually.

Wow - that's a lot to get my head around for a switch hehe. Am I even close to being correct?

So if I'm right in my understanding, I want to be selecting a Fet with a Gate voltage of 3.3V or less. And if the voltage being "switched" can be equal to or greater than the gate voltage then I should be able to find what I need that's rated for at least 500mA and will switch 3V3 or greater.

You go by the on-resistance, not the current rating - the current rating is a power dissipation rating in disguise

Assuming I'm right?

Thanks :slight_smile:

Hi Mark,

Thank you for taking the time and trouble to correct my understanding and for helping explain it all to me.

I've never really studied Fets / Transistors in detail with a view to picking my own parts for my own designs before. Usually I google what I want to do and go along with the recommended tried and tested parts and circuit designs of others.

Unfortunately, there is no go-to solution for what I'm after so it has been and still is a steep curve of learning for me. There's quite a few specs and values to take into account when selecting the right part.

Incidentally, the load that is to be switched should be no more than 500mA in total and I've over-estimated that value by around 200mA to give me some head room. The load is a VHF transmitter module which runs at 0.5W Low Power and 1W High Power.

I worked out the following using Ohms Law:-

1W @ 5V = 200mA
1W @ 3V3 = 303mA

I worked it out at both 3V3 and 5V incase I had to do some jiggery-pokery with changing the voltages around to get my design to work.

The VHF module runs at 3V3 min, 4.5V max (4V typical) so I have explored alternatives to make my design easier in case I couldn't power the whole design from 3V3 - such as powering everything from battery into a 5v DC-DC converter then stepping that 5V down to 3V3 for the atmega and the tapping off that 5V for my MOSFET to power my transmitter after stepping the voltage down to 4V using a silicone diode.

But really, if I can, I'd like to stick with just the one voltage - 3V3.

I've ordered a couple of the fets you pointed out so I can do some tests with them too.

Now I know these Fets can be very sensitive so do you think I'd get away with soldering some pins directly on to the pads of the surface mount fets for breadboard testing? I could at a push mill out a small break out board for the fet but I'm lazy so I'd rather just solder some pins on hehehe.

Thank you so much again for all your help Mark!

I have DMG3415 and DMG6968. They have 28 milliohms (typical) of on resistance with only 1.8 V of gate voltage, and have ESD protection diodes attached to the gate. They're perfect for use in low-voltage systems.

The only downside is that it's SOT-23. I've looked quite a few times, and I couldn't find any through hole devices with specs anywhere near this. It's perfectly possible to solder them to a breakout board and use right-angle headers to stand them up in a breadboard just like a normal through hole component.

DMG3415 - P-Channel MOSFET.pdf (529 KB)

DMG6968 - N-Channel MOSFET.pdf (184 KB)

Also consider the A19T P-channel mosfet with a low Rds(on) at 2.5V of 120mOhm (less at 3.3V) and rated at 4A current.

You can get 100 for a few £/$/€ on ebay.

Thank Jiggy-Ninja and skywatch!

I've ordered the SI2301CDS-T1-E3 based on MarkT's recommendation to try but I will now also order some of those DMG3415 and DMG6968.

I don't mind using a few surface mount parts in the finished build. If I were able to find a process that I could easily follow to accurately mill out double sided boards on my CNC machine then I would use far more surface mount components in my projects - if not all surface mount.

I also converted a toaster oven into a re-flow oven a while back which I've not really had a chance to put to any real work yet.

So this is the circuit I've got laid out in eagle for switching power to my peripheral devices (modules). For the moment I've used the SI2301CDS-T1-E3 part in the design. Hopefully I've got everything correct.

A 1K current limiting resistor for safety between the Atmega's Digital Pin and the Mosfet Gate pin and also a 1K Pull Up resistor to keep the Mosfet turned fully off so it can't remain in any other state if for some reason my Gate pin ends up floating or something.


free image cdn

Sorry it's a "board house" layout. I do them that way because I can follow them easier than the conventional schematic layouts.

The resistor values I've chosen are just arbitrary starting values somewhere in the right range but are not set in stone.

Hopefully I'm heading in the right direction?

Thanks!

Bad circuit. Change RES6 to 100k

You don't want a 2:1 voltage divider reducing 3.3V gate drive to 1.65V gate drive do you?

Well spotted and thank you Mark.

I had completely overlooked those resistors being a voltage divider in that configuration.

I'd been so preoccupied with their other functions (current limiting and pull up) that I'd completely missed the connection.

Putting 100K and 1K in my voltage divider calculator, using 3.3Vin I get 3.27Vout which is very close to my source voltage. :slight_smile:

If for some reason my peripherals don't like it that low (being their lower operating power limit) I have devised an alternate circuit idea which is powered from a 5V dc converter to a 3V3 regulator to power the atmega. Then I'll use the Mosfet to switch the 5V to the peripherals via a silicone diode (prob a 1n4001) to drop the 5V down to near 4V for the devices instead. Or something along those lines If push comes to shove.

I'm just waiting on Mr. Postman to deliver my goodies then I can begin testing....

Thank you again. I will post back with my findings. :slight_smile:

Hi Guys,

I thought I'd post back with my findings and hopefully ask a couple of questions because I'm seriously confused - again lol.

I've been testing with the following MOSFETS:- NDP6020P, SI2301 and DMG3415U-7. I milled out some breakout boards for the last two because they are SOT-23 SMD Packages.

Firstly I tried using each one in turn to switch 3V3 to my devices using 3V3 logic as per my original plan. None of the FETs seemed to want to play ball. No matter what I tired or what combinations of resistors, dividers or pullu ps, I couldn't get more than 2.4V from the drain pin.

So my next attempt was to switch the FETs "On" using 3V3 Logic from the arduino but have the FET switch a separate 5V source (provided by my bench supply) instead of 3V3.

The NDP6020P didn't perform well at all in that scenario either so I gave up with it in the end. The SI2301 came closer but still I couldn't get more than 2.4V from the thing - no matter what combinations I tried.

The closest I've gotten is with the DMG3415U-7 which IS working but I just wanted to clarify some stuff before I call it good and finalise it in my design.

This is my revised circuit with the resistor values that are oddly working...


image upload html

I had to play around with differing resistor values until I arrived at 100Ohm and 47Ohm. I tried other values including 1K and 10K and 10K and 100K but with all the other values I tried I either couldn't get the FET to switch off so I had almost 5V on the drain pin all the while OR when I could get it to turn off, it only delivered 1.5 - 2.4V at the drain pin.

With my circuit at the moment which is working on 100 Ohm and 47 Ohm I am getting the following readings:-

When the MOSFET is OFF I read 4.5V at the Divider and the Gate Pin (Test Point 2) and I read 0.5V at the Drain Pin.

When the MOSFET is ON I read 3.6V at the Divider and Gate Pin (Test Point 2) and I read 4.9V at the Drain Pin.

So everything IS working (my devices are turning on and off with the FET) but I'm wondering about that 0.5V leak at the drain pin when the FET is "Off" and I'm also trying to comprehend why those values of resistors are working best.

When I put those values into a voltage divider calculator using 5Vin, the calculator says I should be seeing 3.4V at the divider but I'm seeing 3.6V when the FET is ON and 4.5V when it's off.

Is there any other combo of resistor divider I could use to try to completely turn off the FET while still delivering 4.5V at the Drain Pin? I've got to step the voltage down for my devices anyway to nearer 4.0 - 4.2V so I don't mind some voltage losses at the Drain Pin.

Any advice / comments / suggestions are welcome. I'd be very interested to know what's going on in my circuit.

I've been making full use of my scope with this problem. I've got one channel hooked up to the Gate and another to the Drain which as well as being very interesting to observe, it's making troubleshooting so much easier.

Thanks in advance!

Hmmm something else I've just discovered while tinkering around with my switching circuit...

When the load (my transmitter) is connected to the Drain pin I get 0.5V at the drain pin when the FET is "Off". When I disconnect the load, I get 2.4V at the Drain Pin when the FET is "Off".

Is this Voltage drop with the load in circuit normal behavior for FETs?

So now I ask myself if I had chosen resistors for my divider when the load was out of circuit, would I have gotten different values and different switching results with the load in circuit?

I only discovered this quite by accident while using a crude system of placing a 1n4001 in series between my drain pin and my load to step the voltage down. I also then noticed that with my load connected in series with the diode, I now have 0.9V leaking away at the Drain pin when the FET is off.

I wonder if this is normal stuff or something my Load (Transmitter Circuitry) is causing somehow?

I find myself at a place where I'm not sure of much now LOL....

47 ohms is FAR FAR FAR too small for the pullup resistor. That's a pretty bad way to level-shift, because it's going to be shoving 7 mA through the ESD diode constantly as long as the pin is HIGH or INPUT. This will end up damaging it eventually, causing to malfunction at some point.

Your solution might work for now, but you've made it far more likely to break the Arduino pin.

Hi Jiggy-Ninja and everyone else reading,

I've been experimenting around for days now and I can't seem to get what I want.

The closest I've gotten is to use 100 Ohm and 75 Ohm on that divider and the MOSFET works AND the current consumption of my project is around 9.5mA.

When I use higher value resistors in the divider, the current consumption increases to around 16mA or more.

HOWEVER - you are quite correct and these are not ideal values that I'm using - in fact my MOSFET switching circuit I believe is bordering on unstable. There appears to be a VERY fine line between the MOSFET being on, off or not coming on at all.

My circuit is currently like this:-

  1. My 12V Battery Powers a DC Converter which is giving out 4V.
  2. The 4V from the DC Converter goes to an AMS1117 3V3 Regulator and the MOSFET Source Pin
  3. The AMS1117 3V3 power goes to just the Atmega.

Using that circuit, I have been experimenting with various combinations of input voltages (3.7 - 5V) as well as different resistor values in the divider in an attempt to get a good balance between a solid switching circuit and low power consumption but I am failing miserably.

At one point, I got everything to run nice and stable and I thought I'd cracked the problem but apparently not.

Using the circuit above with 100 and 75 Ohm divider resistors, I was providing 4.02V from the DC Converter and from that I was getting around 4V at the MOSFET Source Pin. At the Gate Pin I was getting around 3.5V and on the Drain Pin I was getting around 0.3V

This combo was working very well for ages on breadboard so I decided to mill out a quick prototype PCB of the circuit so far. I built that PCB up and it worked but I began to notice it wasn't as stable as the breadboard prototype.

I began to observe strange behavior from the MOSFET on my scope. I have Probe connected to the MOSFET Gate at the Resistor Voltage Divider and one Probe connected to the MOSFET Drain Pin.

What happens is the MOSFET appears to turn on but at only 2.5V at the DRAIN then turns off again and then comes back on again at 3.99V at the DRAIN Pin and it runs fine. So I made the assumption it must be something in my code with the pin states or something.

Convinced it was a code issue - rather than attempt to hunt it down, I thought I'd mill out a second identical prototype and build that up so I had a spare to experiment with and this is where the problem with the my MOSFET circuit became more apparent.

This PCB and it's MOSFET behave really badly. It is exactly the same as the first PCB. Nothing has changed - it uses the same value components etc and yet it is wildly more unstable.

For a start it doesn't like being fed the same voltage as the first PCB. It wont turn on.
If I increase the Voltage to say 4.2V then I get around 2.5V sat on the Drain Pin and the MOSFET wont work. If I decrease the Voltage to say 3.8 - 3.9V then I get a very strange thing happen with the MOSFETs Drain Pin.. it fluctuates between 1 - 2.5V and instead of a flat line on my scope, it becomes more of a Saw Tooth and it's very erratic.

I believe at this point, I'm somewhere between the MOSFET being ON and OFF and it's too fine of a line so it's on, off, on off. Unstable basically.

So If I drop the Voltage further to something like 3.7V, the MOSFET turns off. I get MAX Voltage on the Source Pin and Nothing on the Drain pin except perhaps a few mV flickering in and out. But the MOSFET wont come on.

So what I am trying to actually achieve is a low powered Arduino circuit controlling a MOSFET to turn devices on and off while consuming as little current as possible in standby.

I've been over and over and over Nick Gammon's stuff (who recommends turning off devices using a MOSFET to save power while asleep), I've read about MOSFETs until my eyes are sore and stinging and I've burnt every candle in the house at both ends for days but I'll be the son of a gun if I can get anything stable or anywhere near the uA range. I'm struggling to get below 10mA.

I've tried writing unused pins in various states, I've tried writing used pins in various states when asleep. I'm using Low Power Sleep routines in my code to shut down the Atmega as much as possible for 8 secs at a time. I'm running the Atmega at 3V3 (or very near to it) using the 8Mhz internal clock.

I don't know what more I can do to save any more power and have a stable MOSFET switching circuit that works....

Don't get me wrong, 10mA is an impressive improvement over my previous design which consumed some 40mA at standby but I'm driven by the overwhelming urge to get it lower. But first I need to work out how to get this MOSFET stable at the power I'm looking for.

Now I know I originally started out experimenting around with a transmitter for a fox hunt device but I have now become consumed by the urge to consume less. It's an itch that just isn't being scratched lol.

Funny how you start a project with one goal but then something comes along that just niggles away at you until you crack it. I'm not going to be happy until I've gotten a stable power switch and a circuit that uses very little power in standby...

What I've done now is to take the second PCB I milled (the most unstable one) and I have de-soldered the resistors from the MOSFETs voltage divider. In place of them I have soldered in some single female header pins so now I can experiment with different value resistors at will without destroying my prototype PCB.

All of the MOSFETs I ordered are in place on these two prototype PCBs along with the Transmitters so I'd like to salvage these PCB prototypes if I can and make them work.

Onwards and Upwards........

Goal Achieved.

My circuit is working now and I am drawing 1mA. Very pleased with that.

Turns out I had forgotten to put a current limiting resistor in series with the TX pin between the Atmega and the Transceiver and it was affecting the MOSFET.

Popped in a 10K and TA DA. The MOSFET worked and my current draw dropped down to 1mA.