Mosfet FDN340P always on, no matter if GPIO pin is LOW or HIGH?

Thread Starter

akke

Joined Dec 17, 2015
77
I have a 3.3V CPU (SAMD21G18) that drives a FDN340P mosfet but the mosfet is not switching.
The mosfet's gate is connected to the CPU's GPIO pin.
The mosfet's source to +5V.
The mosfet's drain to the load.

The CPU's GPIO pin is set to output. If I set it high I measure 3.3V on the mosfet's gate. If I set it low I measure 0V on the mosfet's gate.
Yet, the mosfet's drain measures +5V all the time?
 

BobTPH

Joined Jun 5, 2013
9,003
The MOSFET is controlled by the voltage between the source and gate. The voltage on the source is 5V. When the voltage on the gate is 0V, the voltage difference between them is 5V, so the MOSFET is on.

When the gate is at 3.3V, the voltage between the source and gate is 5 - 3.3 = 1.7V.

The threshold for the MOSFET to begin conducting is 1.5V. So through it is not fully on, it IS partially on.

Are you measuring the drain voltage with no load? If so, it should read 5V as you found. If you put a load on it, the voltage will drop, but will not be 0V.

You need another transistor to make the gate voltage 5V for off and 0V for on.
 

Thread Starter

akke

Joined Dec 17, 2015
77
Ok. The thing is, this is a problem on an already manufactured PCB.
Maybe there's another mosfet that would work in this situation so that I can handsolder a new mosfet on it?
 

BobTPH

Joined Jun 5, 2013
9,003
Depends on how much leakage current you can tolerate in the off state, and how much resistance you can tolerate in the on state.

You will not likely find a new MOSFET that is fully on and fully off at those voltages.
 

Thread Starter

akke

Joined Dec 17, 2015
77
Depends on how much leakage current you can tolerate in the off state, and how much resistance you can tolerate in the on state.

You will not likely find a new MOSFET that is fully on and fully off at those voltages.
It's a battery powered thing so I need the leakage currents to be as low as possible.
Ok.... I will be patching this PCB then.

You said "You need another transistor to make the gate voltage 5V for off and 0V for on."
Something like this?

mosfet leds.jpg

+5V = regulated +5V voltage
+5VL = +5V net for U5 and a bunch of leds.



I actually added these mosfets for other parts of the PCB too. Assuming it will work with logic level 3.3V.
Adding a transistor and two resistors on the pcb is almost impossible but if the above circuit should work I will send it to JLCPCB for building new PCB's ;)
 

BobTPH

Joined Jun 5, 2013
9,003
It's a battery powered thing so I need the leakage currents to be as low as possible.
Ok.... I will be patching this PCB then.

You said "You need another transistor to make the gate voltage 5V for off and 0V for on."
Something like this?

View attachment 304160

+5V = regulated +5V voltage
+5VL = +5V net for U5 and a bunch of leds.



I actually added these mosfets for other parts of the PCB too. Assuming it will work with logic level 3.3V.
Adding a transistor and two resistors on the pcb is almost impossible but if the above circuit should work I will send it to JLCPCB for building new PCB's ;)
Yes, exactly. Note that the logic output from the micro must be reversed now. Previously, low would be on. With the new transistor added, high is on.
 

Thread Starter

akke

Joined Dec 17, 2015
77
I tried the above circuit with a BT2222A transistor and a FDN340P mosfet.
The "LEDS ON/OFF" GPIO pin comes from my MCP23008 expander

When the pin is low, the transistor is not conducting, the mosfet is pulled to +5V and there is no power on +5VL, as expected.
But when I put the gpio pin HIGH the SAMD21 CPU seems to be resetting for some reason?
The CPU is driving the MCP23008 over i2c but for some reason it seems to reset whenever I put the expander's pin HIGH.

But even when it's resetting, the circuit seems to work. +5VL gets +5V after the reset.

So now I wonder what could be a possible reason for the CPU to reset with this circuit?
Maybe the current through the MCP23008 is too high and it, in turn, does something with the i2c bus that causes a reset for the samd21 cpu?

Or what could be the cause?

It's not random. Every single time I drive the pin high my serial consoler tells me the samd21 is resetting (I get all init messages again..)
 

BobTPH

Joined Jun 5, 2013
9,003
Whatever the MOSFET driving is putting a glitch in the power rail, causing the reset.

What is it the load MOSFET is switching?

Updated schematic?
 

Thread Starter

akke

Joined Dec 17, 2015
77
Sorry for the late reply. It must be something else wrong with the board. I made the same changes to a second pcb and this one works perfectly fine.

I will dig deeper on the faulty pcb but it might not be related to this circuit after all.

Other question:

isn’t it a better idea to to replace the 10K resistor with a 150K or something? (Lower power consumption when in ON stare?)
 

eetech00

Joined Jun 8, 2013
3,961
Sorry for the late reply. It must be something else wrong with the board. I made the same changes to a second pcb and this one works perfectly fine.

I will dig deeper on the faulty pcb but it might not be related to this circuit after all.

Other question:

isn’t it a better idea to to replace the 10K resistor with a 150K or something? (Lower power consumption when in ON stare?)
The BJT needs current into the base to dive it into saturation. Replace the BJT transistor with a low VGS(on) NMOS mosfet. The MOSFET will turn on when the gate voltage exceeds VGS(on) but will draw an extremely low amount of current (uA's).
 
Top