5
\$\begingroup\$

I'm trying to use a MOSFET, an N-channel (specifically IRLB8721PbF), with a gate controlled by an AVR to power on/off a Raspberry Pi (powered through GPIO), I'm using it on the low side. (Both share the same +5 V rail).

When I measure the Raspberry Pi's current draw, it seems limited, and it doesn't operate properly.

On that MOSFET:

  • Gate: To AVR digital pin (and pulled low with a 10k resistor)
  • Drain: To Raspberry Pi GPIO ground
  • Source: To GND

Naturally, my 5 V from my power supply is directly to the Raspberry Pi GPIO 5 V.

As a kind of experiment control: I just power the Raspberry Pi directly from my power supply 5 V/ground. I measure the current the Raspberry Pi draws through 5 V with a multimeter, and during power up it fluctuates from 0.15 A (up to about 0.45 A) and settles at about 0.35 A.

However, when I measure how much current the Raspberry Pi draws when connected to the MOSFET and when I turn the gate on -- it seems the current is limited and it gets up to about 0.30 A (approx) and never gets higher, and the Raspberry Pi seems to never fully power on.

I'm curious if I'm missing something here with trying to power this on. It is indeed a logic-level MOSFET, but, as an experiment I've tried powering the MOSFET at varying voltages with a bench power supply -- but no noticeable change by using more voltage (up to 10 V I tried.)

Granted, I am more of a programmer and electronics technician -- so I appreciate any electronics engineering input and advice, but, pragmatic solutions are most appreciated. I'm just so puzzled as the MOSFET should be rated up to 60 A, and I would've thought that just applying a logic-level voltage I would've been able to draw more current through the MOSFET.

Here's a diagram of the circuit (please note: I can re-create this situation without the microcontroller at all, and just with the Raspberry Pi + bench power + MOSFET, as diagramed). Note that in this representation the Raspberry Pi GPIO connection is simplified and in this diagram pin 1 on the jumper = 5 V, and pin 2 = GND.

Enter image description here


Update: It turns out the voltage drop on the MOSFET is enough to give the Raspberry Pi fits. A friend of mine pointed it out in the data sheet, and here's a screen capture of the exact graph that shows where approximately 0.15 V are dropped, which can be measured on source and drain (as pointed out early on! great eyes guys, I really appreciate). I have decided to instead use a relay.

Enter image description here

\$\endgroup\$
9
  • 1
    \$\begingroup\$ What do VGS and VDS measure? \$\endgroup\$ Sep 2, 2013 at 18:03
  • \$\begingroup\$ Could you put together a schematic or if not, a hand-drawn connection sketch of what is hooked up to what and at what voltages, please? \$\endgroup\$ Sep 2, 2013 at 18:07
  • \$\begingroup\$ What gate voltage does the MOSFET get to power the raspberry? \$\endgroup\$
    – Andy aka
    Sep 2, 2013 at 18:11
  • \$\begingroup\$ @AnindoGhosh -- diagram added, good suggestion. \$\endgroup\$
    – dougBTV
    Sep 2, 2013 at 18:59
  • \$\begingroup\$ @IgnacioVazquez-Abrams -- Vgs (is that the voltage at the gate? I'm assuming) is 5.1v in the posted diagram (with just bench power, no micro), from the micro it's more realistically 4.3v. How do I measure Vds? It's on the low side, should it not be zero? I'd love to learn. \$\endgroup\$
    – dougBTV
    Sep 2, 2013 at 19:00

1 Answer 1

3
\$\begingroup\$

Perhaps your bench supply doesn't have enough current. If you use your bench supply to power the Raspberry Pi directly, does it power it correctly? If you also power the Arduino at the same time, do they both work? The RPi wants around 700 mA with graphics and Ethernet on, and the Arduino anything between 20 and 200 mA depending on load.

If not that, then I think you wired something wrong -- either the IRLB8721 (which is a great N-channel FET IMO!) source/drain (or gate, even) mixed up, or the Arduino pinout mixed up. Or perhaps you forgot to configure the Arduino pin as output? By default, Arduino pins are inputs, and if you "write" to them with digitalWrite(), you turn on a very weak pull-up (about 20-40 kOhm) so it may "seem" to be an output.

Use a scope or multimeter to probe each voltage while the circuit is actually running, and report back!

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Looks like you're right on the money. I had a friend who's an EE look at my work, and he picked up on it right away. The voltage at the Source/Drain is approximately .15V -- which is just enough to cause an improper functioning of the raspberry pi. He also pointed out where the problem is on the datasheet too (which I'll add an image of in the original question). Great eye on that, I appreciate it. \$\endgroup\$
    – dougBTV
    Sep 4, 2013 at 0:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.