The drop across Q5 is roughly .5/.6 of a volt. Tolerable for the application. What's curious is that the Gate voltage of Q5 is lower than the Source Voltage by about .5V again. Considering Vgsth needs to be (quoted) min +0.4V to turn on, this has perplexed me slightly. Gate of Q5 (drain of Q3) is tied to +9 via a 1M resistor.
It seems to be unlikely that you'd be limited by leakage, but using a "power" device, versus e.g. CD4000 series logic, gives some possibility. If nothing else, it seems the transistors are within spec (1uA max D-S leakage, and G-S for +/- 4.5V).
Ed: oh, and also... is your meter 10Mohm (give or take), or is it Hi-Z on that range? Try measuring with two meters at once and see what the effect on the circuit is.
I'd also suggest using smaller resistors, or stronger drive (e.g., CD4000 series logic), to give stronger gate signals. 1M resistor means, any capacitive coupling from nearby terminals goes right on through.
And sensitivity to leakage, including on-board leakage. Apparently, "no-clean" fluxes can leave residues in the 100kohm range. That would be pretty damning here.
The power source toggle works. The problem I'm having is that (when no USB connected) the Gate of Q3 is floating to +2V when I push the power button (despite the fact it's supposed to be at 0V - pulled to ground via R17). Thus, switching Q5 Off and powering the circuit down. The gate of Q3 is then pulled to 0V once the circuit has discharged, Q5 switches back on, and the process repeats itself.
Ok, what does that have to do with the power button?
Leakage sounds like Q4 going backwards. Which again, should be 1uA max, but maybe there's something else here I don't know about.
- R17 superfluous (unless discharging the +5V is desirable somewhere).
This should be pulling the Gate of Q3 low when the USB is disconnected.
Oh, it looks weird paired with the diode-strapped transistor transistor.
When the USB is plugged in, the voltage at Vin decreases slowly from +9 to +5. I haven't scoped it for excessive transients. (should probably check it out though).
Under what load? I'm assuming this needs to withstand the ~200mA the converter is capable of. If you're using it for flea farts, the brown-out rate will be quite slow indeed, but it will still be present.
Not that you'd ever expect USB to be anything other than on or off, but it's an operating condition which clearly wasn't considered, but should be standard part of circuit analysis.
It's easy, I'd dare say trivial, to arrange a circuit which meets limited constraints, at DC.
It's equally as easy, almost trivial, to have such a circuit be utterly useless when one considers that those voltages aren't simply magically there forever, but have to be connected, disconnected, ramped, may change quickly or slowly, may be forward or reversed, etc. In other words, the dynamics.
Dynamics are, by no means, a matter of infinite complexity. Statics are to addition what dynamics are to solving polynomial roots. Harder, but easy given a simple toolkit and sufficiently simple (or simplifiable) problems (e.g., the quadratic equation, and a system that can be simplified to second order).
(Which isn't just analogy; polynomials are used to solve RLC circuits and such. The behaviors of a circuit like this aren't really DC nor steady-state AC, so it is still an analogy. But just because it's nonlinear doesn't mean, in this case, that it's intractable.)
Design is already on PCB, so can't make changes (at least not right now). The quick fix was to remove Q3, but I then don't have a power source toggle. It will always draw from battery unless battery is physically removed.
What means "can't make changes"?
PCBs are exactly as changeable as you put your mind to. Perhaps you don't know the construction methods associated with, shall we say, extensive circuit modifications?
Most simple, of course, being the cutting of traces, and patching in of bodge wires. But depending on board area and resources, you can add quite a lot, with some amount of effort (example: scratching the soldermask off a ground pour area, then carving it up into a footprint and traces for a new component), let alone if you add another tiny board with more components on it, and wire that up to everything.
Depending on circumstances, there's also the option of breadboarding circuits like this, probably using breakout boards to handle the SMT parts. Obviously that's in hindsight, but, by the sound of it, the stage this should've been in..
Tim