> Just curious, can you simplify the circuit using a regulator that has an > on/off switch ? > For example > > http://cache.national.com/ds/LM/LM9074.pdf or > http://rocky.digikey.com/WebLib/Sharp/Web%20Data/pq1txx1m2zp.pdf Yes and no, depending on your requirement. Regulators with shutdown pins all too often have disappointingly high current drains when off. The LM9074 is a good example of a bad quiescent off current with 20 uA typical and 60 uA worst case. (At 60 uA a small battery (say 20 mAH) would go flat in ~= 300 hours). It's dropout voltage makes the horrible LM7805/LM340 look good. It does have other features to redeem it (reset output and stay alive while dying feature). BUT the Sharp PQ1Txx1M2Zp series that you list appears to be an utterly marvellous device. It is the answer to a maiden's prayer (and those of a number of PICListers of the past. It seems to outperform the wonderful LM2936 AND have a shutdown pin to boot. It's maximum off state current of 1 uA would be acceptable in many applications. The dropout voltage is 0.1v typical and 0.15v max at 60 mA with Vo=3V. That is very good. It has a number of other good features (including 300 mA max output or 6 times the LM2936). All in all an excellent device and worth looking at (if you can buy them)(Not from RS,or Farnell alas) BUT Digikey has them at prices below LM28936.5v version at $US0.91/1 and $US0.47/100. This regulator would answer many PICListers nees and would be well worth looking at for use in a power off circuit provided the 1 UA off current is acceptable. Russell McMahon > > Tal > > > -----Original Message----- > > From: pic microcontroller discussion list > > [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Russell McMahon > > Sent: Friday, September 12, 2003 8:33 PM > > To: PICLIST@MITVMA.MIT.EDU > > Subject: [PIC:] Auto shut off > > > > > > Auto poweron/poweroff is a perennial. > > Here's a post message I posted in April based on something > > posted in .... This is based on a circuit I have in > > successful use in a low volume production specialist item. I > > could give you (Jinx) a PCB to populate to try it if you wished. > > > > This draws NO measurable current when off, starts on a button > > press and subsequently allows the button to be used as an input. > > > > > > Russell McMahon > > > > ________________________________________ > > > > > I'd like to > > > 1) Turn on the device by pressing a button > > > 2) Later be able to have the PIC turn itself off > > > 3) While the PIC is on, have it be able to detect "ON" > > button presses > > > again > > > 4) Only use one IO pin (so gnd or +5v to switch off, high-impedance > > > input to detect button and stay on) > > > > Here's an attempt to meet your full specification. > > I haven't tried it and it's not fully designed yet but I > > think a little thought and/or playing would make a reliable > > working circuit from it. > > > > There are too many requirements on the single pin to allow a > > simple digital 0/1 full rail signal level to be used. Roman > > Black recognises this in his SCR design and "cheats" by > > making the turnoff function independent of the pin - in his > > cct the PIC reduces its current consumption below the SCR > > hold on current. This is a clever and legitimate solution but > > will not work in cases where there is other circuitry drawing > > current in excess of the SCR holding current. > > > > My solution also uses a "trick" - but using the PIC pin to do > > it. Transistor TR2 is held on by R3+R4 BUT the voltage at the > > junction of R3 & R4 is a LOGICAL low level which the PIC can > > read. When the button is operated after startup the PIC pin > > sees a logical high. > > > > To turn the circuit off the PIC (or other cpu) takes R3/R4 > > junction to ground. Proper design may wish to see a small > > series resistor to avoid possible damage from the 100uF > > capacitor discharging into the pin. The true low level turns > > off TR2 and initiates shutdown. Somewhere along the way the > > PIC will lose the ability to maintain an active low output > > and C1/R3 must have a long enough time constant to hold the > > transistor off after this. > > > > The time that the voltage into the regulator (on capacitor > > C7) stays actively high will be an important factor in turn > > off. Suitable care and thought would definitely turn up a > > working combination but odds are that as shown the component > > values are wrong. > > > > If the regulator has a substantial output capacitor but a > > smaller input cap, the PIC may be designed to stay alive > > after TR3 is turned off. This would ensure the circuit is > > well shut down before the PIC expires. > > > > PIC "death throes" need to be carefully thought through - as > > is always the case in this sort of circuit. > > > > Z1 stops PIC pin being taken illegally high. > > R5 provides turn off for TR2 in absence of other drive > > sources. R3/R4 divider, which holds TR2 latched on, must > > provide low enough output to place a logical 0 on PIC pin, > > while R7/R4 divider provides a logical high. R7 sized to > > provide enough level for a logical 1 - higher voltages will > > be clamped by Z1. D3 left over from a prior circuit - does no > > harm but Z1 probably sufficeth at 4v7. C1 value should be as > > low as reasonably possible consistent with turn off timing > > requirements. R4 can be made much larger (depending on > > transistor beta, load current supported etc) - allowing > > scaling up of other resistors allowing smaller C1 > > > > > > > > Russell McMahon > > > > > > > > > > > > > > -------------------------------------------------------------- > > -------------- > > ---- > > > > > > > > > > -- > > http://www.piclist.com#nomail Going offline? Don't AutoReply > > us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > > > > > > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu