I am using the circuit below to switch a bi-latching relay once a wire is disconnected, i.e. to not switch as long as a voltage is present on the wire.

After assembling on a PCB, on which there are multiple instances of the circuit, about half appeared to work properly once, but after cycling the relays on/off by disconnecting the wire and resetting on the other side, all of them would stop working.

Specifically, the Q2 gate voltage appears to be internally pulled up to between 2V and 10V, and even when connected directly to GND it becomes active and brings Q1's gate to GND. Q1 appears to still function as expected.


In simulations it works as expected, and I find it strange that Q2 is the one that goes given how relatively shielded it is from the relay current and potential flyback voltage spike.

Potential solutions I see here are to use bigger MOSFETs or switch Q2 to a BJT, but I'd like to understand what could be causing this to avoid the same problems in future.

  • \$\begingroup\$ Sounds like Q2 gate is damaged. Tell us more about "J? Wire" and the 3.3V supply connections. \$\endgroup\$ – Spehro Pefhany Aug 1 '19 at 21:46
  • \$\begingroup\$ J? wire on the board is normally a connector to external circuitry, during testing I was connecting it directly to the 12V supply and a 3V3 supply with common grounds. \$\endgroup\$ – nebkat Aug 1 '19 at 21:55

Seems like you've damaged the gate of Q2 by ESD or similar effects. It's a bad idea to expose an unprotected MOSFET gate to external connections, particularly a small MOSFET such as a 2N7002.

A series resistor (eg. 1K) and something like a 5.1 or 6.2V zener from gate to source will protect the MOSFET from most reasonable transients.


simulate this circuit – Schematic created using CircuitLab

You could switch to a BJT (with a series base resistor) but it would be a good idea to have a diode from base to emitter to prevent ESD-induced reverse base-emitter junction breakdown, so the component count does not look much different.

| improve this answer | |
  • \$\begingroup\$ Thanks for the response. I thought previously that the gate series resistor was mainly to protect the driving microcontroller rather than the MOSFET, but I see how this could cause issues. Would this be universal to all SOT-23 MOSFETs, or is the 2N7002 particularly "small"? I think I may have tried an AO3402 in place of the 2N7002 with similar results. I've also used both in various other designs without such protection, albeit not being driven directly by an external connection, but it worries me that the same thing could occur. \$\endgroup\$ – nebkat Aug 1 '19 at 22:34
  • 1
    \$\begingroup\$ The AO3402 should be harder to damage, but it's also rated for less gate voltage. Big power MOSFETs seem to have fewer issues. Body model is 100pF, charged to some kV so 20V means the gate has to have tens of nF capacitance. AO3402 has a couple hundred pF, 2N7002 has about 1/10 of that. I'm a bit surprised to see you're in Ireland, from my brief experiences there static electricity wasn't all that prevalent (too wet). Maybe something else is putting too many volts on there. \$\endgroup\$ – Spehro Pefhany Aug 1 '19 at 22:40

It looks like Q1 is connected incorrectly...the source and drain are reversed. As shown, the body diode is always forward biased so the voltage across the MOSFET should be less than 1V, always.

I realize that this does not explain why Q2 is failing, but it makes your whole schematic suspicious.

| improve this answer | |
  • \$\begingroup\$ Sorry I flipped it accidentally when remaking the simplified schematic, updated with fixed orientation. \$\endgroup\$ – nebkat Aug 1 '19 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.