BSS138W MOSFET unexpectedly blowing
Q12 (M1 on my schematic) needs to be a P channel MOSFET with a VGS(max) of at least 20V, or you can add a resistor as shown to prevent the gate of q12 from breaking down.  Size R1 and R2 so that Q12 VGS is less than 12v when VBATA is 18.







simulate this circuit &ndash; Schematic created using CircuitLab