user28317: I would like to control power to Arduino B from signal of digital pin from Arduino A.
I use IRFZ44N MOSFET as switch and +12V DC source. The Arduinos have common ground. The connection is:

Gate: signal from Arduino A (+5V or 0V)
Source: +12V
Drain: Vin of Arduino B

At this settings Arduino B is powered regardless of the value on the gate. What am I doing wrong and how should I change the settings to get the desired result? I know I misunderstand how the transistor works, please show me the correct approach.

user4143: You have an N-channel MOSFET. That is not suitable for switching the 12V supply of an Arduino.
Instead you need a P-channel MOSFET which has the gate pulled up to 12V using a resistor, and then an N-channel logic level MOSFET which is used by the Arduino to pull the gate of the P-channel MOSFET LOW to turn it on.
Something like:

simulate this circuit – Schematic created using CircuitLab
When the GPIO is HIGH it turns M2 on. This pulls the gate of M1 down, turning it on. When GPIO is LOW, or not actively being driven (thus being pulled down by R2), M2 is off. This allows the gate of M1 to be pulled up to +12V by R1, switching M1 off.

28317: <p>I would like to control power to Arduino B from signal of digital pin from Arduino A.</p>

<p>I use IRFZ44N MOSFET as switch and +12V DC source. The Arduinos have common ground. The connection is:</p>

<ul>
<li>Gate: signal from Arduino A (+5V or 0V)</li>
<li>Source: +12V</li>
<li>Drain: Vin of Arduino B</li>
</ul>

<p>At this settings Arduino B is powered regardless of the value on the gate. What am I doing wrong and how should I change the settings to get the desired result? I know I misunderstand how the transistor works, please show me the correct approach.</p>
 4143: <p>You have an N-channel MOSFET. That is not suitable for switching the 12V supply of an Arduino.</p>

<p>Instead you need a P-channel MOSFET which has the gate pulled up to 12V using a resistor, and then an N-channel logic level MOSFET which is used by the Arduino to pull the gate of the P-channel MOSFET LOW to turn it on.</p>

<p>Something like:</p>



<p><img src="https://i.stack.imgur.com/Bb0af.png" alt="schematic"></p>



<p><sup><a href="/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2fBb0af.png">simulate this circuit</a> &ndash; Schematic created using <a href="https://www.circuitlab.com/" rel="nofollow">CircuitLab</a></sup></p>

<p>When the GPIO is HIGH it turns M2 on. This pulls the gate of M1 down, turning it on. When GPIO is LOW, or not actively being driven (thus being pulled down by R2), M2 is off. This allows the gate of M1 to be pulled up to +12V by R1, switching M1 off.</p>
