# High side mosfet 12V switch from isolated 3V3 GPIO always ON

I design a High side mosfet 12V switch from isolated 3V3 GPIO on previous post, based on EL3H7-G (C) Optocoupler and STR2P3LLH6 Mosfet but it's alway ON... I don't understand why.

## SCHEMATIC

I check the voltage in both state, when GPIO (Open drain) is logical "1" (Green) and logical "0" (Red).
All voltages are measured referenced to DGND for left side voltages and referenced to AGND for right side voltages

## GPIO = 1 (GREEN MEASUREMENT)

In this case, PWREN = 0.16V so current can flow through optocoupler LED.
Vf=1.34V-0.16V=1.18V (OK: Designed to be 1.2V)
If=IR1=(3.31V-1.34V)/200=9.85 mA
If=9.85mA (OK: Designed to be 10mA)

The optocoupler transistor seem to be saturated
Vce=0.06V (Designed to be 0.2V)
So Ic seem to be 11mA on EL3H7-G (C) datasheet (Figure 7) for Vcesat = 0.6V
IR2=(11.84V-0.06V)/10000=1.17mA
IR2=1.17mA (OK: Designed to be 1.18mA)

Hum, this look like current flow from the Gate of the mosfet...
-Ig=11mA-1.17mA=9.83mA
-Ig=9.83mA came from the gate ??? It's possible ???

In anycase Mosfet is ON, let look at Vgs
VR2=11.84V-0.06V=11.78V
Vgs=-VR2
Vgs=-11.78V (OK: Designed to be 11.8V)

Vgs=-11.8V is upper than Vgs(th)=-2.5V

## GPIO = 0 (RED MEASUREMENT)

Is this case, Optocoupler LED seem to not be on.
If=VR1=0V/200=0mA
If=0mA
But there is a small voltage accross the LED
Vf=3.31-2.80=0.51V
Vf=0.51V
Probably not enought to light on the LED ???

When I check the optacoupler transistor VCE=11.82V VR2=11.84V-11.82=V0.02V
Vgs=-VR2
Vgs=-0.02V

Vgs=-0.02V is really lower than Vgs(th)=-2.5V

So why my mosfet conduct ? this puzzle me !

VPWR=11.24V
Vsd=11.84V-11.24V=0.6V
Vds=-0.6V

Can someone help me to unsertand what happen, what is my mistake and how I can correct this ?

## EDIT 1 : PINOUT

I check many time the pinout but perhaps I'm tired... If someone see something strange...

Here is extracted from the STR2P3LLH6 datasheet

## EDIT 1 : PCB

Here is the top, with optocoupler (R3 on PCB is R1 on schematic)

Here is the bottom, with MOSFET (R4 on PCB is R2 on schematic)

(I replace MOSFET and remove C20 and C21 as suggested by @John Birckhead)

## EDIT 2 : WRONG PINOUT "IT WORK"

Many thank you very much to @Charlie and @Louis to point out the wrong pinout of my STR2P3LLH6 PCB footprint. The schematic is good but Drain and Source are swap on my PCB. I flip the Mosfet and rotate it to 45° and now it work very well.

Quick MOSFET pinout inplace correction

Explanation:
On my full schematic I do mistake on MOSFET connection, but I don't do the mistake on the simplified schematic here on stack exchange that why I take time to understand what append and no one here see the problem at first look on schematic. An other thank you to @Charlie and @Louis to take look on the PCB trace to point out this.

This is the part of my wrong full schematic, MOSFET is not connected the right way

## CONCLUSION

You can use the schematic and the method on top of this post without problem as soon as you respect your MOSFET pinout :). The Schematic is good, my PCB is wrong.

• Either your FET is damaged or more likely drain and source are interchanged and you're seeing the body diode drop when it's off. Commented Jun 24, 2021 at 17:02
• I think your input voltages vs GPIO states are reversed, unless there is another transistor you are not showing. With the GPIO Low/0, PWREN should be near zero volts so the opto's LED would be on. Commented Jun 24, 2021 at 17:08
• @JohnD yes I check pinout many time because this is come into my mind at first but pinout is correct Commented Jun 24, 2021 at 20:49
• @PeterBennett I use "open drain" GPIO the other transistor is inside the MCU. Commented Jun 24, 2021 at 20:49
• Your PCB landpatern has pin 2 and 3 reverse. Commented Feb 2, 2022 at 21:34

You have PMOS (Q1) Connected wrong in your PCB.

In your schematic, you have source (PIN2) connected to +12V and R2. In your PCB, however, you have drain (PIN3, the middle pin of SOT-23 package) connected to +12V and R2. You can flip the FET and rotate it 45° to mount and try it again.

The circuit works as expected in simulation:

• You are right, I mixed up my brushes when I created the MOSFET fingerprint on my original diagram, error that I did not make on the simplified schematic here on stack exchange, a big THANK YOU to you d taking the time to look in detail. it works fine now . Many thank you Commented Feb 4, 2022 at 10:28

If you don't have drain and source reversed as @John D suggests, it's likely that you have a blown FET. Take a look at the data sheet for the STR2P3LLH6 and you will see that the safe operating area is all below 8 amperes, even for very short pulses of a few hundred microseconds:

When you turn on the switch you are charging about 5 microfarads of capacitance through the FET's ON resistance of 56 milli-ohms. The instantaneous current when you switch would therefore be many times the current for the safe operating area. I would try replacing the FET with a beefier one or placing a current limiting resistor of 5 ohms or so in series with C20 and C21.

Good luck!

• Many thanks to take time to help me John. I remove capacitance and replace 3 times the MOSFET. (start without load, etc...) I believed it work but no. I think this mosfet is very pernickety or I destroy them with hot air or I don't know... I edit my port to put the layout, I check many time but I begin to "dont have the eyes in front of the holes "... Commented Jun 24, 2021 at 21:33

-Ig=9.83mA came from the gate ??? It's possible ???

Yes its possible, if the gate has been blown out. Large amounts of current from a gate definitely are the sign of a dead blownout gate. The gate is only nm's thick and it doesn't take much to blow through it with ESD or currents.

Replace the mosfet, and observe careful ESD procedures

(Also if you have high power mosfets that are connected to digital logic, like a processor, it can be wise to insert a buffer in between an expenisve part and a not so expensive part. I've had gates blow out and then take out the CPU, so it's much easier to replace a buffer than a CPU (I have people that like to blow out mosfets in my lab).

• I replace the MOSFET several time, I try with SI3401A-TPMSCT-ND too without success. I remove capacitor and be very careful on ESD procedures (anti-static bracelet & co) and nothing change. This make me crazy... Commented Jun 28, 2021 at 22:23
• You might be exceeding one of the parameters, check the datasheet and make sure you are meeting all timing and current parameters. Another thing you could do is tie the gate high and if the FET doesn't die, then it's probably when you switch the FET off and too long a transition in the linear mode when the FET is dissipating the most power. Commented Jun 28, 2021 at 22:27