Searching \ for '[PIC] Power on with momentary pushbutton' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/power.htm?key=power
Search entire site for: 'Power on with momentary pushbutton'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Power on with momentary pushbutton'
2005\11\04@083509 by fred jones

picon face
Hi all,
Hope I don't get flamed for this because I recall it being covered here
before, however I have searched and can't find it.  Does anyone have
info/schematic on using a momentary pushbutton to turn on the PIC and
circuitry and then another press of the button to turn it off?  Thanks for
the help.
FJ


2005\11\04@090711 by Buehler, Martin

picon face

- bistable relais
- t-flip-flop controlling transistor or relais in power supply
- transistor or relais in power supply, enabled by pic pin and button.
button also detected from a pic pin, disabling power supply when button
detected
- ...

************************************************************************
******************************


>{Original Message removed}

2005\11\04@092438 by Maarten Hofman

face picon face
Rochester, 4 november 2005.

Not sure if this would work, but here is what I came up with:

http://horta.urmc.rochester.edu/~mhofman/PIC/poweronoff.gif

The button will supply power to the PIC and circuit when pressed (note
that the power supply of the circuit and PIC will need some
stabilization as the switch will bounce). It will also provide a
"high" signal to PIN1, which is normally pulled "low". When the PIC
starts running, it should immediate output a "high" on POUT1, which
will cause the MOSFET to switch and power the PIC and circuit instead
of the push button. It should then wait for the signal on PIN1 to
become low, indicating that the user has finished pressing the button.

Later, whenever PIN1 suddenly becomes high again, the PIC can shut
down gracefully.

I would appreciate it if anyone found any flaws in my design (my
electronics skills are slightly stale compared to my software skills).

Greetings,
Maarten Hofman.

2005\11\04@094444 by Andrew Kieran

picon face

Way back in 2002, I also needed to be able to use a PIC to turn
off it's own power.  I received an outstanding response to my
question from Roman Black.  He uses an inexpensive SCR.  (Thank
you, Roman). Check out his page at:

http://www.romanblack.com/self_swi.htm

Andrew



________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag


---- On Fri, 4 Nov 2005, fred jones (spam_OUTboattowTakeThisOuTspamhotmail.com) wrote:

> Hi all,
> Hope I don't get flamed for this because I recall it being
covered here
> before, however I have searched and can't find it.  Does
anyone have
> info/schematic on using a momentary pushbutton to turn on the
PIC and
> circuitry and then another press of the button to turn it off?
Thanks for
> the help.
> FJ
>
>
> --

2005\11\04@095444 by Dave Tweed

face
flavicon
face
Maarten Hofman <.....cashimorKILLspamspam@spam@gmail.com>
> Not sure if this would work, but here is what I came up with:
>
> horta.urmc.rochester.edu/~mhofman/PIC/poweronoff.gif
>
> The button will supply power to the PIC and circuit when pressed (note
> that the power supply of the circuit and PIC will need some
> stabilization as the switch will bounce). It will also provide a
> "high" signal to PIN1, which is normally pulled "low". When the PIC
> starts running, it should immediate output a "high" on POUT1, which
> will cause the MOSFET to switch and power the PIC and circuit instead
> of the push button. It should then wait for the signal on PIN1 to
> become low, indicating that the user has finished pressing the button.
>
> Later, whenever PIN1 suddenly becomes high again, the PIC can shut
> down gracefully.
>
> I would appreciate it if anyone found any flaws in my design (my
> electronics skills are slightly stale compared to my software skills).

Pretty close. But the MOSFET needs to be a P-channel device, and its gate
is driven low to turn it on. An N-channel device would need to have its
gate driven *above* 5V to work in this configuration.

Since the PIC outputs are effectively shorted to ground by its protection
diodes when it is unpowered, you'll also need a separate driver transistor
for the MOSFET -- a low-power NPN device with the emitter grounded, the
collector connected to the gate and also pulled up with a high-value
resistor to the unswitched +5V rail, and its base connected through a
resistor to the POUT1 pin. Then the circuit will work as you describe.

-- Dave Tweed

2005\11\04@095748 by michael brown

picon face
From: "fred jones"

> Hi all,
> Hope I don't get flamed for this because I recall it being covered
here
> before, however I have searched and can't find it.  Does anyone have
> info/schematic on using a momentary pushbutton to turn on the PIC and
> circuitry and then another press of the button to turn it off?  Thanks
for
> the help.

I'm sure there must be many ways to accomplish this.  The PIC can wake
up from sleep mode by a change on a PORTB pin or an RB0 interrupt.
Depending upon the power requirements of the external circuitry, you
might be able to simply power it directly from a PIC pin.  I have
successfully done this with a temperature datalogger that I built.  When
it was awake, the PIC powered an LM35 temp sensor and a couple of serial
I2C EEPROMs with no problem.  Otherwise, a MOSFET should do the trick.
Just remember to not let input pins float when your external circuitry
is turned off.  As far as shutting down on a button press, your software
could easily handle that by waiting for a second or so (to allow the
user time to release the button so you don't immediately wake back up)
and then going to sleep after powering down the external circuitry.

2005\11\04@103214 by Buehler, Martin

picon face

that's exactly what i tried to explain in my post.
instead of the fet, a relais or transistor may be used too, although a
fet might be better (if you are able to deal with fets ;-)
think this will work.
tino

************************************************************************
******************************


>{Original Message removed}

2005\11\04@104507 by Paul Hutchinson

picon face
> -----Original Message-----
> From: piclist-bouncesspamKILLspammit.edu On Behalf Of fred jones
> Sent: Friday, November 04, 2005 8:35 AM
>
<snip>
> Does anyone have info/schematic on using a momentary pushbutton to turn
> on the PIC and circuitry and then another press of the button to turn it
> off? Thanks for the help.
> FJ

It appears to me that you want the first button press to turn on the circuit
and then a second press of the same button to turn off the circuit.

If I've interpreted this correctly, then are you really locked into a
momentary push button?

A standard push on - push off push button switch placed in the power line
will do this without any other circuitry.

Paul

2005\11\04@112917 by Harold Hallikainen

face picon face
I've done this with a regulator that has a shutdown pin. The pushbutton
drives the pin true, starting up the PIC, which then holds the pin true.
The PIC can then shut the regulator down. The PIC also monitors the
pushbutton so another push of it can tell the PIC to shut it down.  After
doing that, I found this LT chip:

http://www.linear.com/pc/productDetail.do?navId=H0,C1,C1003,C1144,C1129,P10330


Harold


--
FCC Rules Updated Daily at http://www.hallikainen.com

2005\11\04@114518 by Mauricio Jancic

flavicon
face
> pushbutton so another push of it can tell the PIC to shut it down.  After
> doing that, I found this LT chip:

In that case why don't put a 10F ?

Mauricio Jancic
Janso Desarrollos
Microchip Consultant Program Member
.....infoKILLspamspam.....janso.com.ar
http://www.janso.com.ar
+54 11 4542 3519

2005\11\04@132444 by fred jones

picon face
Thanks, you are correct.  Sorry if I wasn't clear on this.  I want to be
able to press a membrane power switch to turn on the PIC/device and then
press the same membrane momentary switch to turn it back off.  I think I
came up with a circuit to do this when I re-phrased my google search today
and a solution from another forum came up.  It really may not be the best
solution though so any others would be appreciated.
Thanks,
FJ
==================================================

It appears to me that you want the first button press to turn on the circuit
and then a second press of the same button to turn off the circuit.

If I've interpreted this correctly, then are you really locked into a
momentary push button?

A standard push on - push off push button switch placed in the power line
will do this without any other circuitry.

Paul

2005\11\04@133427 by Mauricio Jancic

flavicon
face
And the solution you found is...?? :)

Mauricio Jancic
Janso Desarrollos
Microchip Consultant Program Member
EraseMEinfospam_OUTspamTakeThisOuTjanso.com.ar
http://www.janso.com.ar
+54 11 4542 3519

2005\11\04@190231 by fred jones

picon face
www.embeddedrelated.com/groups/piclist/show/2496.php



--------------------------------------------------------------------------------
And the solution you found is...?? :)

Mauricio Jancic
Janso Desarrollos
Microchip Consultant Program Member
infospamspam_OUTjanso.com.ar
http://www.janso.com.ar
+54 11 4542 3519


2005\11\04@191150 by Bob Axtell

face picon face
er... I am stumped by Roman Black's SCR scheme. The 7805 is NOT turned
off by the SCR, the 7805 simply no longer regulates at 5V when the SCR
drops out due to low current.

In addition, SCR specs are VERY unreliable, changing drmatically with heat,
voltage, and load current.

--Bob

Andrew Kieran wrote:

{Quote hidden}

>>--

2005\11\05@062108 by Gerhard Fiedler

picon face
Bob Axtell wrote:

> er... I am stumped by Roman Black's SCR scheme. The 7805 is NOT turned
> off by the SCR, the 7805 simply no longer regulates at 5V when the SCR
> drops out due to low current.

The input of the 7805 may not be switched off, but the return path seems to
be. No return current == no input current, no? Where would the current
flow, if the 7805 is not turned off, as you say?

Gerhard

2005\11\05@063037 by Gerhard Fiedler

picon face
fred jones wrote:

>> And the solution you found is...?? :)

> http://www.embeddedrelated.com/groups/piclist/show/2496.php

It's always nice to get a feedback on the chosen solution for questions
asked here... contributes to everybody's education and overall satisfaction
:)

Gerhard

2005\11\05@123026 by Bob Axtell

face picon face
Gerhard Fiedler wrote:

>Bob Axtell wrote:
>
>  
>
>>er... I am stumped by Roman Black's SCR scheme. The 7805 is NOT turned
>>off by the SCR, the 7805 simply no longer regulates at 5V when the SCR
>>drops out due to low current.
>>    
>>
>
>The input of the 7805 may not be switched off, but the return path seems to
>be. No return current == no input current, no? Where would the current
>flow, if the 7805 is not turned off, as you say?
>
>Gerhard
>
>  
>
No, Gerhard, that's not how a 7805 works. If the GND pin of a 7805 is
opened, the
pass element inside is 7805 is switched on fully, and  the OUT pin
equals the IN
pin except for a small PN drop.

Try it!

--Bob

--
Note: To protect our network,
attachments must be sent to
KILLspamattachKILLspamspamengineer.cotse.net .
1-520-777-7606 USA/Canada
http://beam.to/azengineer

2005\11\05@140300 by Dwayne Reid

flavicon
face
At 10:30 AM 11/5/2005, Bob Axtell wrote:
>Gerhard Fiedler wrote:
>>Bob Axtell wrote:
>>>er... I am stumped by Roman Black's SCR scheme. The 7805 is NOT turned
>>>off by the SCR, the 7805 simply no longer regulates at 5V when the SCR
>>>drops out due to low current.
>>
>>The input of the 7805 may not be switched off, but the return path seems to
>>be. No return current == no input current, no? Where would the current
>>flow, if the 7805 is not turned off, as you say?
>>Gerhard
>No, Gerhard, that's not how a 7805 works. If the GND pin of a 7805
>is opened, the
>pass element inside is 7805 is switched on fully, and  the OUT pin
>equals the IN
>pin except for a small PN drop.

What I think that you've missed, Bob, is that the SCR completes the
ground leg of the circuit for both the regulator AND the load.

IOW, the Vss connection to the PIC and all the rest of the load
current is returned to the anode of the SCR.  That's also where the
reference (Gnd) leg of the regulator is connected.

You are right: when the SCR is off, the Vdd line floats up to the
unregulated input with respect to the incoming power ground.  But the
voltage across the regulator output is zero because there is no
ground return and the device is OFF.

Also note that the voltage drop across the SCR is outside the
regulation loop - any voltage drop across the SCR simply appears as a
voltage drop at the input of the regulator.  So long as there is
sufficient input voltage that the regulator remains above dropout,
the PIC and the rest of the circuit are operating at 5V.

dwayne

--
Dwayne Reid   <RemoveMEdwaynerTakeThisOuTspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 21 years of Engineering Innovation (1984 - 2005)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

2005\11\05@150835 by Spehro Pefhany

picon face
At 05:11 PM 11/4/2005 -0700, you wrote:
>er... I am stumped by Roman Black's SCR scheme. The 7805 is NOT turned
>off by the SCR, the 7805 simply no longer regulates at 5V when the SCR
>drops out due to low current.
>
>In addition, SCR specs are VERY unreliable, changing drmatically with heat,
>voltage, and load current.
>
>--Bob

I'm with Bob on this one- I looked at one of the suggested SCRs, the C103B,
and the *maximum* holding current is rated at 5mA. There is no minimum spec,
so there is no guarantee it will drop out with 4 or 5 mA current from a
78x05 (in fact, it's practically guaranteed that it *won't*.

However, the idea is feasible. I suggest an "artificial" SCR made from
a couple of BJTs *with* base resistors to control the drop-out current,
and using a low-Iq regulator (some LDOs draw more current as the dropout
voltage approaches-- we don't want one of those.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
spamBeGonespeffspamBeGonespaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
->> Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff


2005\11\05@163221 by Bob Axtell

face picon face
Dwayne Reid wrote:

{Quote hidden}

I guess I just have to breadboard it to understand it.
If it works, it certainly is an unusual way to accomplish this.

I always do power switching schemes by a flipflop, usually
by crosscoupled gates, using a CD4001, so I switch it at
5-17V of the raw power.  A PIC can turn it off by pulsing
a voltage-doubling charge pump (a diode and two caps),
driving an extra gate which turns it off. A momentary PB
in the input of the turns it on.

I have also found a slick way to do it using a latching relay,
a PB switch, and two caps. The caps store the energy to
pulse a change in the relay. At 5V, this even works when
driven by a PIC signal.

--Bob


--
Note: To protect our network,
attachments must be sent to
TakeThisOuTattachEraseMEspamspam_OUTengineer.cotse.net .
1-520-777-7606 USA/Canada
http://beam.to/azengineer

2005\11\05@165102 by Gerhard Fiedler

picon face
Spehro Pefhany wrote:

>> In addition, SCR specs are VERY unreliable, changing drmatically with
>> heat, voltage, and load current.
>
> I'm with Bob on this one- I looked at one of the suggested SCRs, the
> C103B, and the *maximum* holding current is rated at 5mA. There is no
> minimum spec, so there is no guarantee it will drop out with 4 or 5 mA
> current from a 78x05 (in fact, it's practically guaranteed that it
> *won't*.

I don't have much experience with SCRs, but I think the idea here is not
that the SCR will drop out closely below 5 mA, the idea is that it won't
drop out at 5 mA or more, and that it will drop out at currents in the
range of a sleeping PIC -- in the microampere range. Is that something
that's doable with SCRs, even with varying specs?

Gerhard

2005\11\05@170753 by William Chops Westfield

face picon face

On Nov 5, 2005, at 9:30 AM, Bob Axtell wrote:

> If the GND pin of a 7805 is opened, the pass element inside is 7805
> is switched on fully, and  the OUT pin equals the IN pin except for
> a small PN drop.
>
But the circuit doesn't have a return path either, so effectively
you're just switching the ground wire ("low side switching") instead
of the V+ rail, which should be fine for a battery operated circuit,
even if it feels a bit weird...

BillW

2005\11\05@171227 by olin piclist

face picon face
Gerhard Fiedler wrote:
> I don't have much experience with SCRs, but I think the idea here is not
> that the SCR will drop out closely below 5 mA, the idea is that it won't
> drop out at 5 mA or more, and that it will drop out at currents in the
> range of a sleeping PIC -- in the microampere range. Is that something
> that's doable with SCRs, even with varying specs?

I haven't seen the schematic so I'm only going on what people are saying
about it.  However if there is a 7805 regulator in there, it won't matter if
the PIC is taking 0 current.  The quiescent current of a 7805 is quite high,
probably above the minimum sustaining current of most SCRs, when such a
thing is even specified.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\05@174505 by Gerhard Fiedler

picon face
Bob Axtell wrote:

>>> er... I am stumped by Roman Black's SCR scheme. The 7805 is NOT turned
>>> off by the SCR, the 7805 simply no longer regulates at 5V when the SCR
>>> drops out due to low current.
>>
>> The input of the 7805 may not be switched off, but the return path
>> seems to be. No return current == no input current, no? Where would the
>> current flow, if the 7805 is not turned off, as you say?
>>
> No, Gerhard, that's not how a 7805 works. If the GND pin of a 7805 is
> opened, the pass element inside is 7805 is switched on fully, and  the
> OUT pin equals the IN pin except for a small PN drop.

As Dwayne wrote, it seems you imagine a current path from the regulator
output to input supply ground. Which I don't see in the circuit.

> Try it!

I just hooked up the input of a 7805 to 12 V and a load resistor between
the other two pins (and nothing else). It did not create a current through
it... just kidding :)  I didn't do that, but I doubt you can have a current
flowing there. If you have, you have just invented the perpetuum mobile!

Gerhard

2005\11\05@175619 by Spehro Pefhany

picon face
At 07:43 PM 11/5/2005 -0200, you wrote:
>Spehro Pefhany wrote:
>
> >> In addition, SCR specs are VERY unreliable, changing drmatically with
> >> heat, voltage, and load current.
> >
> > I'm with Bob on this one- I looked at one of the suggested SCRs, the
> > C103B, and the *maximum* holding current is rated at 5mA. There is no
> > minimum spec, so there is no guarantee it will drop out with 4 or 5 mA
> > current from a 78x05 (in fact, it's practically guaranteed that it
> > *won't*.
>
>I don't have much experience with SCRs, but I think the idea here is not
>that the SCR will drop out closely below 5 mA, the idea is that it won't
>drop out at 5 mA or more, and that it will drop out at currents in the
>range of a sleeping PIC -- in the microampere range. Is that something
>that's doable with SCRs, even with varying specs?
>
>Gerhard

Yes, the problem is that the quiescent current of a 78x05 can be as
high as 6mA at 25°C, so even if you unplug the PIC and throw it in the
trash the thyristor current can't fall below that.

Only large insensitive-gate SCRs have holding current that's reliably
above that level, and of course you'd have to spend significantly more
current than *that*, controlled by the PIC, to have it reliably stay *on*.

There are lower quiescent current regulators, of course, though some
bipolar LDOs have an Iq that shoots through the roof as you approach
the dropout voltage.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
RemoveMEspeffspamTakeThisOuTinterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
->> Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff

2005\11\06@081111 by Gerhard Fiedler

picon face
Bob Axtell wrote:

> I guess I just have to breadboard it to understand it.
> If it works, it certainly is an unusual way to accomplish this.

Kind of, yes... the unusual thing is that the circuit ground (and the
regulator ground) are not hard-wired to the (unregulated) input ground.

Think of power switches (for devices with two small pins)... it doesn't
matter whether they switch off the power or neutral wire; either one
switches off the current flow.

Gerhard

2005\11\06@081904 by Gerhard Fiedler

picon face
Spehro Pefhany wrote:

>> I don't have much experience with SCRs, but I think the idea here is not
>> that the SCR will drop out closely below 5 mA, the idea is that it
>> won't drop out at 5 mA or more, and that it will drop out at currents
>> in the range of a sleeping PIC -- in the microampere range. Is that
>> something that's doable with SCRs, even with varying specs?
>
> Yes, the problem is that the quiescent current of a 78x05 can be as high
> as 6mA at 25°C, so even if you unplug the PIC and throw it in the trash
> the thyristor current can't fall below that.

Oh, of course... <slap on forehead> :)  I missed this one. I did like the
other approach he found better, and if I had to do something like this,
that would be probably close to what I would come up with. I just liked the
parts count of the SCR solution... but of course if it doesn't work, that
doesn't help much :)

Thanks,
Gerhard

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...