Powering RPi Using Atmega328p and MOSFET

Hello,

I am working on a small project to power on / off my RPi using IR receiver that is connected to Atmega328p. I've connected a digital pin to the MOSFET gate so whenever the IR recognizes the specific code it opens the MOSFET.
The MOSFET drain is connected to the RPi GND, and the Source is connected to GND.

The functionality works fine, but the RPi keeps rebooting because it gets low input voltage - about 4.0V-4.2V.
my VCC Supply is from a USB Supply (+5.25V).

Any ideas?

The $1000 question here, which MOSFET?

Did you use a "logic" fet with low enough Rsd(on).
Leo..

septillion:
The $1000 question here, which MOSFET?

Wawa:
Did you use a "logic" fet with low enough Rsd(on).
Leo..

Thanks for the replies,

This is the FET I am using:

asafsarid:
This is the FET I am using:
http://www.irf.com/product-info/datasheets/data/irfz44n.pdf

So how is it connected?

The IRFZ44n has a Vgs(th) of 2-4volt.
AFAIK that does not make it a logic fet.
Some will work, others not.
Leo…

Wawa:
The IRFZ44n has a Vgs(th) of 2-4volt.
AFAIK that does not make it a logic fet.
Some will work, others not.
Leo…

So you’re saying I need to change the FET? Any recommendations?

I’ve attached a picture showing the way I am connecting the FET.

Your connection is fine.

I keep IRLB8743's handy. I get them for about a $1, if I recall, and they are good enough for just about whatever load I toss at it.

FYI: IRLB8743 is supreme overkill for what you want... But I have them as spares for my 3D printer... Here's a hint... devices that use the prefix "IRL" are commonly "logic level" and is the reason for the "L" in the part name, as compared to "IRF" which commonly need ~10V to be fully "on".

pwillard:
Your connection is fine.

I keep IRLB8743's handy. I get them for about a $1, if I recall, and they are good enough for just about whatever load I toss at it.

FYI: IRLB8743 is supreme overkill for what you want... But I have them as spares for my 3D printer... Here's a hint... devices that use the prefix "IRL" are commonly "logic level" and is the reason for the "L" in the part name, as compared to "IRF" which commonly need ~10V to be fully "on".

Thanks a lot for this information.
I will get one of these and try it... I'll post here the results, hopefully this will solve the problem.

Here’s a useful hint - if your MOSFET is from International Rectifier (IRF, IRL etc) and
has less than 4 digits in the part number, its a truly ancient device, just avoid. Modern
devices are perhaps 1 to 2 orders of magnitude better in performance. Other manufacturers
have different numbering schemes.

Another useful hint - ignore the current rating. Always choose by the on-resistance and
calculate the thermal losses (I-squared-R) and the Vsat (I times R). Make sure the Vsat <<
gate drive - less than 0.5V if possible. Try and get low heat dissipation, heatsinks are bulky,
cost more money than the devices!

You’ll find you will always be well below the nominal current rating anyway doing it this way.

I think the previous posters said most of it.
If you look at datasheets, you will see that a "logic" fet has a Vgs(on) of ~0.5-2.5volt.
That "just-turn-on" voltage has to be less than half the voltage you are going to drive the fet with.

It might be wise to add a 220ohm resistor in series with the gate.
The rather high gate capacitance of a power mosfet "overloads" the Arduino pin during switching.
A 10-100k resistor from Arduino pin to ground is also wise.
Arduino pins are "floating" during bootup.
Leo..

Thanks for the tips MarkT and Wawa.
Just to verify that I got it right - The Vsat is calculated by I (Drain to Source Current) * R (The Rd(on) resistance), and I need it to be << Vgs(on).
So for example in my case, if I=2A and Rd(on)=5mOhm then 2*0.005 = 0.01 and Vgs is 5V so I got this one right.

The thing I don’t understand yet - do I need to be in ‘saturation’ mode of the mosfet? Or ‘linear’ mode is what I am looking for? Because from what I know - for saturation mode I need Vgs>Vt and Vds > Vgs-Vt.
So in my case I won’t get Vds>Vgs-Vt, right? So I will be in linear mode.

Thanks again!

There are a few things that appear to be wrong here.

One is switching the power to the RPi rather than shutting it down.

Another is switching the ground line rather than the 5V supply.

Paul__B:
There are a few things that appear to be wrong here.

One is switching the power to the RPi rather than shutting it down.

Another is switching the ground line rather than the 5V supply.

Hi Paul__B,
I'm sorry but I didn't fully understand your respond.
If you're talking about shutting down the raspberry pi, so don't worry about that - I will do a soft shutdown before I'll turn off the power.

About the switching the supply and not the ground.. Can you explain more? I am using a N-Channel FET, if i'll want to switch the supply I will need to use a P-Channel. Right?