It's not always the mosfet which is slow

Initial situation

Today I stumbled upon a high side switching method I used but never really tested. I was thinking to use it for another project to turn on/off some sub-circuit and get a very low power mode (the sub circuit is consuming 2uA, which is already low, but wanted to go down even further).

This is the switch I use. Sometimes it's better to have a high side switch to have a stable GND over all the circuit.
The input IR_EN is used to control the power over IR_3.3. If IR_EN is high, we have 3.3v on IR_3.3. If IR_EN is low, there's no power.

simple high side switch

Q3 is a n-mos, Q2 a p-mos Fet. Whenever IR_EN is high, Q3 turns on, which takes the gate of Q2 low. Thus Vgs gets -3.3v and Q2 turns on. Both fets have a low Vgs-threshold.

I wanted to be sure it works as expected and measured the voltage with an oscilloscope. This is what I measured, when setting a 20ms high pulse on IR_EN:
output of high side switch

So what happens? I 1st thought Q2 is not turned off as quickly as needed. But in fact I was wrong. It just seems that the sub-circuit (ie the IR-receiver TSOP34838) stops consuming power below ~0.7v. From there we see a curve similar to a self-discharging capacitor. In this case C6.


The high side switch works as expected.

It might not be worth it though, to have such a high-side switch to turn on/off 2uA in a mcu application unless we really have long sleep cycles and every uA matters.

In my case the active part consumes ~30mA every 250ms for about 400us.