We are using a FDN028N20 n-channel MOSFET for load switching. Load current is 80mA max. and it is controlled via processor's 3.3V pin (NRF52832).

Our schematic:

enter image description here

When the MOSFET turns off, I measure 6mA current peaks flowing into the processor pin. We make the measurement using a Power Profiler Kit II. This is expected since the gate behaves as a capacitor, and discharges.

You can see the peak in the screenshot below:

enter image description here

Sometimes these peaks may reach higher values (e.g. 15-20mA). It is said that overall current going in/coming from the pin shouldn't be above ~20mA. (https://devzone.nordicsemi.com/f/nordic-q-a/15800/gpio-sink-current-on-nrf52832/60290#60290).

That's why I am worried that in this design pins may be damaged in the future. I tried to reduce the peak current using a gate resistor, but surprisingly the peaks increased in frequency and sometimes even in amplitude (we tried various gate resistors - 100Ω, 1000Ω, etc).

Can someone please explain to me why the gate resistor doesn't reduce amplitude of peaks and how to protect the processor pin?

Note: I tried the same with other loads and observed the same behavior. This question is not about driving a motor with PWM, but a general problem we observe on other loads too (LEDs etc.).


I made the same test with another load (resistor). See the circuit below:

enter image description here

As you can see there is no motor here, and I suppose there shouldn't be any EMF related issues here with a resistor as a load.

The processor switches its output state every 5 seconds (5 seconds high, 5 seconds low) infinitely.

You can see the measured current below:

enter image description here

As you can see, these peaks happen all the time. I tried removing the gate resistor, and had the same result.

  • 1
    \$\begingroup\$ What is a "Power Profiler Kit 2"? \$\endgroup\$
    – Hearth
    Commented Nov 18, 2021 at 15:06
  • \$\begingroup\$ 1) If a 1k ohm gate resistor doesn't solve this you have a different issues. 3.3 V / 1 kohm = 3 mA is the maximum that can flow (it is unclear what current you get with 1 kohm). 2) Around 9 ms is needed to charge the gate and that makes no sense to me, I would expect only a few us, not ms. 3) explain in more detail how you're measuring. \$\endgroup\$ Commented Nov 18, 2021 at 15:21
  • 4
    \$\begingroup\$ Please draw your circuits the standard way to help us understand them: Inputs on the left, outputs on the right, Positive above, Negative below. Thanks. \$\endgroup\$ Commented Nov 18, 2021 at 15:22
  • 1
    \$\begingroup\$ I now notice that the source of the NMOS connects to GND while the gate-source pull down resistor connects to PGND. Why? \$\endgroup\$ Commented Nov 18, 2021 at 15:25
  • \$\begingroup\$ 20ms is within spec though. They can also sink a bit more than source typically and those max current figures are for long-lasting amounts that build up heat, not tiny within-range pulses. \$\endgroup\$
    – dandavis
    Commented Nov 18, 2021 at 18:31

2 Answers 2


The peak you see is not actual current, it is an artifact of your measuring set-up, either due to a ground loop or due to radiation. To prove it, run the measurement again, but with no input. For example, if you are using a scope probe, connect the tip to the ground clip instead. Theoretically, it should read perfectly 0 V. If it reads that same 6 mA, then you know that the problem is an artifact of the measuring method, not actual current.

Now, as far as the original cause, the problem is that you need a way for the load current to go somewhere else when the MOSFET is turned off. You can do that with a diode across the load, with an RC snubber, or with a TVS diode across the MOSFET. Otherwise, you get an inductive kickback that radiates and is being picked up by your test equipment.

  • \$\begingroup\$ Thank you for your help. Please see updated question and comments. I doubt that it is a measurement error, because on everything else we get expected values. The measurement device has polarity though. But it is adjusted in a way to detect current flowing into the output pin. These peaks don't happen at random moments, but when mosfet transitions from high to low. . \$\endgroup\$ Commented Nov 19, 2021 at 8:07
  • 1
    \$\begingroup\$ In order to verify if the problem is in the measurement, I did following: I tried to measure the voltage across the gate resistor with oscilloscope and observe the graphic. Strangely these peaks don't seem to happen when measuring voltage on gate resistor. Since gate resistor has fixed value, if voltage doesn't have peaks then it means the current doesn't have peaks as well. I guess you are right, it may be an artifact of measurment system. \$\endgroup\$ Commented Nov 19, 2021 at 8:47
  • 1
    \$\begingroup\$ This explains why increasing the gate resistor doesn't affect these peak values that I was capturing. \$\endgroup\$ Commented Nov 19, 2021 at 8:51
  • \$\begingroup\$ Thank you for the additional information. Because you are using a resistor to measure the current, and that resistor is not referenced to ground, I suspect that the problem is due to poor common-mode rejection in you measuring set-up. \$\endgroup\$ Commented Nov 19, 2021 at 17:21

It appears that there is no diode to absorb the back EMF when the motor is switched off.

Place a diode close to the motor, cathode to +ve supply (pin 2) and anode to pin 1 (FET control).

As a rule-of-thumb, the forward current capability of the diode should be the same as the motor running current.

  • \$\begingroup\$ It appears that there is no diode to absorb the back EMF when the motor is switched off. There is the drain-source diode in the MOSFET but that relies on proper supply decoupling of the 3.3 V so that that supply can handle the current pulse. Also: I would never want to rely on that diode. But I agree that a flyback diode should have been added. \$\endgroup\$ Commented Nov 18, 2021 at 15:23
  • 1
    \$\begingroup\$ There is the drain-source diode in the MOSFET. There is, but it's facing the wrong way to do any good. \$\endgroup\$ Commented Nov 18, 2021 at 15:31
  • \$\begingroup\$ Thank you for help. Can you please check updated question. I made additions at the end of the text. I am not sure that the problem is EMF related. \$\endgroup\$ Commented Nov 19, 2021 at 7:33
  • \$\begingroup\$ Also, I added the diode as per your recommendations. It didn't change anything. \$\endgroup\$ Commented Nov 19, 2021 at 8:04
  • \$\begingroup\$ @ElvinQasanov Thanks for all the detailled feedback on your further tests and results, very interesting. "... diode ... didn't change anything". Nevertheless, hoping that you keep the diode in order to prevent a problem in a different area! \$\endgroup\$
    – GeBJT
    Commented Nov 19, 2021 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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