How to use a MOSFET as a diode to protect an MCU

Hello, I am working on a development board, which will be connected to a power supply that feeds all the modules.

The problem is that the modules for which I am preparing the board exceed the power that a usb (and the internal regulator) can transfer, for which I want to implement a diode so that the current can flow from the source "MP1584EN" and the "ExP0" modules to the "WEMOS-D1-MINI-ESP32" MCU, but not vice versa, that is, if it is powered from the main source, the entire board receives voltage, but if it is powered from USB (programming) , only the MCU is powered.

I have found and tried a schematic (top schematic), which protects the MCU from polarity reversal, but how can I apply it to replace the "1n4001" diode in my diagram (bottom)?

The need to use a mosfet is the voltage drop, a normal diode subtracts between 0.4v and 0.7v, the supply voltage is 3.3, the problem is that one of the modules that I intend to use works at a minimum of 3v (both data and power), so I can NOT use a normal diode for this project.

зображення

Do you see the body diode of the MOSFET that prevents it from ever turning off in your circuit diagram?

U2 in your diagram first acts as a diode, and then, when the polarity is right,
turns it into a bi-directional switch (which you probably don't want).

The IRF9530 is not logic-level, and therefore not suitable to use with micro processors.

You should power that development board with 5volt, on the USB/VCC pin.

Can't you use a dedicated buck converter for that ExP0, whatever that is.
Leo..

image
https://www.electrosoftcloud.com/circuitos-de-proteccion-contra-polaridad-inversa/

Well, here I leave the exact diagram on which I base myself together with the url of the original page (in Spanish), the circuit works correctly, if you have any diagram that complies with what I say, please let me know, thanks

Just a thought. Schottky diodes have a lower volt drop. There are many types. Maybe one would work for you

Hello, 3 points to keep in mind.

  • The IRF9530 is not being used to transmit any kind of signal, its only function is to allow the flow of current in a single direction.
  • Despite the fact that the board has an internal 3.3v regulator, the idea is to use the 3.3v power supply together with a filter for switched sources, thus having a single source with an efficiency of more than 90%
  • No, I can't use a dedicated source for that module, because I still have the problem of the logic signal, besides, the ExP0 port, among others, must be able to be used as a voltage input

Yes, I have taken it into account, but, it is still too much dropout, the closest I have seen, they had 500mA maximum current and a 0.25 dropout, which leaves only 0.05v of margin, Too close to the limit

Not sure if it would work but how about a couple in parallel. Reduce the current and the volt drop per diode. Just an idea

no combination of diodes would allow the voltage of the set to be lowered, that is to say:
if they are put in series, the voltage drops are added and the current does not change, if they are put in parallel, the currents are added and the voltage drop does not change
(in theory, in practice, it is always worse)

I think you don't understand.
The fet conducts in both directions.
That circuit is basically a normal 0.7volt diode with a Rds(on) resistor across.

That fet resistor value could be high in this case, because of the IRF9530 is not a logic level fet.
Leo..

Are there FETs with separately exposed or without body diodes?

Analog switches and multiplexers can conduct and block in both directions.

That is a very basic design error, and bandaids like MOSFETs won't fix that fundamental mistake.

Start over and include a power supply that can handle the load, with a significant safety margin.

Reverse Voltage Protection With A P-FET | Hackaday

1 Like

Would it be possible to power everything from the normal power supply during programming, and not from USB? If so, that would seem to be the most direct solution.

I'm not sure I understand exactly what you need, but if you need to disconnect power to the downstream parts of the circuit, you could insert a P-channel mosfet into that line with a pulldown resistor from the gate to ground, so it would be on normally. But you would also connect USB power to the gate. So if USB is present, it would pull the gate high, turning off the mosfet. Of course you would need a logic level mosfet.

Except in case of a complete disaster, I think that the MP1584EN can take care of the reverse polarity "danger".
As for the other thing, a small normally closed relay powered by USB should work.

According to the datasheet for the D1 Mini ESP32, the 5V USB supply goes through diode D1 to connect to the 5V pin, and from there to the regulator. That means if you can find a way to solder a wire to D1, you can connect the wire to the gate of the mosfet. When USB is not connected, the gate pulldown resistor will turn on the mosfet, which will conduct in either direction. When USB is connected, the gate will be pulled high, turning off the mosfet, and the body diode will block any current flow back into the normal supply. But you will need a logic level mosfet.

Well, I've been looking and I think the solution is to join a MAX40200, which is an ideal diode that supports 1A and a drop of 85mV

Thank you all :slight_smile:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.