![]() The right half represents the behavior of the processor, and I used a combination of a transistor, Zener, and resistor to stand in for a regulator. Here's a rough sketch of a circuit design you might use. I think one can reasonably well use resistors to protect the processor's input against voltages in excess of VDD without needing a Zener for that. The original circuit idea is not mine, it comes from Dave Jones over at EEVblog.Īs Bruno Ferreira suggested, the easiest way to allow the button to act as an "off" switch is to change your circuit is to allow the processor to know when the button is pushed. Here is the simulation (V(push) high represents when the button is pushed):Īlso we can see after power off the current heads to zero (as C1 discharges and Q1 turns off) so the circuit consumes no power in the off state (the cursor for I(V1) is at 19.86s and measures 329nA): ![]() R1 pulls the MOSFET base up to 5V and switches it off again. ![]() When S1 is pressed again, Q1 sinks the current from R4 (which is keeping Q2 on) turning Q2 off. R4 now sees 5V and when S1 is released, it provides Q2s base with the current needed to keep it open (and therefore the MOSFET on too) Q1 is also turned on when current through R2 charges C1 to ~600mV, at which point Q1c is <200mV (i.e. This pulls the P-MOSFET gate to ground, turning it on as well. The 5V at Q1c is connected to Q2 base, turning it on. When S1 (ignore the + and - nodes, they are there for SPICE triggering purposes) is pressed When it sleeps it lets the gate float to turn the circuit off.Īt first The P-MOSFET is off, so there is no base current at Q2, which is also off. The micro has power applied all the time, and controls a P-channel MOSFET (with pullup from gate to source) for the rest of the circuit. The simplest version can be something like a IOC (interrupt on change) input with pull up, with button to ground. AS mentioned in the other answers, unless you really can't afford the few uA, it doesn't really make sense not to use the micro to control the power toggle, as it uses less components and can be controlled accurately. EDIT - on reflection, the circuit below (which I'll leave for reference) is probably best suited for use in circuits without a micro.
0 Comments
Leave a Reply. |