2

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.).

Edit:

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.

ocrdu
  • 8,705
  • 21
  • 30
  • 42
  • 1
    What is a "Power Profiler Kit 2"? – Hearth Nov 18 '21 at 15:06
  • 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. – Bimpelrekkie Nov 18 '21 at 15:21
  • 4
    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. – Davide Andrea Nov 18 '21 at 15:22
  • 1
    I now notice that the source of the NMOS connects to GND while the gate-source pull down resistor connects to **P**GND. Why? – Bimpelrekkie Nov 18 '21 at 15:25
  • 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. – dandavis Nov 18 '21 at 18:31
  • Power Profiler kit is just a handy tool for measuring and visualizing the current consumption: https://www.nordicsemi.com/Products/Development-hardware/Power-Profiler-Kit-2 – Elvin Qasanov Nov 19 '21 at 06:49
  • Different labels on GND and PGND is not a design mistake, I just forgot to name them same way. – Elvin Qasanov Nov 19 '21 at 06:49
  • @Bimpelrekkie the 9ms on the image is not time to charge the gate if I am not mistaken. This graph was plotted when the processor pin for mosfet control switched from High to Low, in other words I was turning the mosfet off. – Elvin Qasanov Nov 19 '21 at 06:54
  • OK, discharge time, still, 9m ms discharge time is **a lot**. You added equipment **in series** with that gate and in my view that is **asking for trouble**. I would measure the **voltage** across the gate resistor instead. Why? Because the **long wires** to your measurement device can change the behavior of the circuit. Watch the grounding when probing the voltage on the gate resistor. I would use two probes and subtract their voltages (probe differentially). – Bimpelrekkie Nov 19 '21 at 08:32
  • Please see my comments to Davides answers. I tried measuring voltage there. – Elvin Qasanov Nov 19 '21 at 08:49

2 Answers2

2

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.

GeBJT
  • 444
  • 2
  • 5
  • *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. – Bimpelrekkie Nov 18 '21 at 15:23
  • 1
    _There is the drain-source diode in the MOSFET_. There is, but it's facing the wrong way to do any good. – Davide Andrea Nov 18 '21 at 15:31
  • 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. – Elvin Qasanov Nov 19 '21 at 07:33
  • Also, I added the diode as per your recommendations. It didn't change anything. – Elvin Qasanov Nov 19 '21 at 08:04
  • @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! – GeBJT Nov 19 '21 at 13:15
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.

Davide Andrea
  • 16,164
  • 4
  • 33
  • 62
  • 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. . – Elvin Qasanov Nov 19 '21 at 08:07
  • 1
    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. – Elvin Qasanov Nov 19 '21 at 08:47
  • 1
    This explains why increasing the gate resistor doesn't affect these peak values that I was capturing. – Elvin Qasanov Nov 19 '21 at 08:51
  • 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. – Davide Andrea Nov 19 '21 at 17:21