Searching \ for 'rapid PIC power cycling' 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: 'rapid PIC power cycling'.

Truncated match.
PICList Thread
'rapid PIC power cycling'
1999\08\09@144459 by Bruce Cannon

flavicon
face
part 0 1296 bytes

<META content="MSHTML 5.00.2014.210" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2><SPAN class=290542518-09081999>Hell
all:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=290542518-09081999></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=290542518-09081999>I'm working on a
battery-powered product which only&nbsp;does some work when a mercury switch is
closed for long enough.&nbsp; To save power when not in use I'd like to power my
device though the&nbsp;tilt switch.&nbsp; My question is: will the device power
up correctly every time even if it encounters the rapid power cycling I'd expect
from switch bounce?</SPAN></FONT></DIV>
<P><FONT size=2>Bruce Cannon<BR>Style Management Systems<BR>1228 Ceres ST
Crockett CA 94525<BR>(510) 787-6870<BR><A href="http://www.jps.net/bcannon"
target=_blank>http://www.jps.net/bcannon</A><BR><BR>Remember: electronics is
changing your world...for good!</FONT> </P>
<DIV>&nbsp;</DIV></BODY></HTML>

</x-html>

1999\08\09@145338 by Harrison Cooper

flavicon
face
I'd guess no.  It takes a certain amount of time for Vcc to come above
threshold, and all inputs, including the tilt switch input, would be invalid
during this time.  Also, depending on if you were sending any data or
switching outputs, they would all be invalid as well.  You would have to
have an output, set for a long period of time to indicate that the micro was
up and running, then do your stuff.  Of course, while it was waiting to
really run, the tilt might open up again.

Suggestion might be to use the tilt as an interrupt to wake from sleep.

email me private....on the application.  Just curious.

Suggestion might be to use the tilt as an interrupt to wake from sleep.

1999\08\09@150002 by Jeff King

flavicon
face
Bruce:

Bruce Cannon wrote:

>I'm working on a battery-powered product which only does some work when a
mercury switch is >closed for long enough.  To save power when not in use I'd
like to power my device though the tilt >switch.  My question is: will the
device power up correctly every time even if it encounters the >rapid power
cycling I'd expect from switch bounce

There are a number of ways to approach this. However, the first question is what
PIC
part have you targeted? Some have a PUT (power up timer) that should deal with
this
issue fairly well. Others can be "put to sleep" (low power mode) only to be
woken up
by a IRQ, which the mercury switch could generate and the PIC would remain in a
known state.

Offhand, I'd say hang a large cap on the output of the mercury switch and that
will get
rid of most of the short transits (BTW, mercury switches don't bounce) from
initial
vibration/sloshing of the mercury switch. Then wait a predetermined time and do
what
you need to do.

The only issue I've ever had problems with locking PICS up with is brownouts.
(which
potentially my cap idea above could make *worse*) If you part doesn't have
brownout
detection (which also is a power hog) there is an app note for a inexpensive
brownout
circuit using a 2n3906 and a couple of resistors. This, with a PUT will be
foolproof.

Good luck

Jeff King
Aero Data

1999\08\09@152650 by Bruce Cannon

flavicon
face
Thanks for the replies!!

> There are a number of ways to approach this. However, the
> first question is what
> PIC
> part have you targeted?

12C508 (cheap!)

Some have a PUT (power up timer) that
> should deal with
> this
> issue fairly well.

So if power is cycled, this timer restarts everything reliably every time,
until power is stable?  I can't cause the PIC to be powered up in a 'stuck'
state by the mercury switch jiggling?

Others can be "put to sleep" (low power
> mode) only to be
> woken up
> by a IRQ, which the mercury switch could generate and the PIC
> would remain in a
> known state.

Can't spare the battery life, I don't think, so would like to try powering
off completely in between tilts instead of sleeping (which if I read the
data sheet correctly will draw max 9uA if WDT enabled, (which I would
need)).

{Quote hidden}

Wouldn't I then need to worry about leakage current through the cap?

Bruce Cannon
Style Management Systems
1228 Ceres ST Crockett CA 94525
(510) 787-6870
http://www.jps.net/bcannon

Remember: electronics is changing your world...for good!

1999\08\09@170801 by Jeff King

flavicon
face
Bruce Cannon wrote:

>  what
> > PIC
> > part have you targeted?
>
> 12C508 (cheap!)

Check the price on the 16C505... my MicroChip rep told me that the 505 was
cheaper
then the 508.

> Some have a PUT (power up timer) that
> > should deal with
> > this
> > issue fairly well.
>
> So if power is cycled, this timer restarts everything reliably every time,
> until power is stable?  I can't cause the PIC to be powered up in a 'stuck'
> state by the mercury switch jiggling?

The 12C508 has a PUT. I don't have time right now to go through the
data book on this part,  you might look in the spec section at the end
as your answer is there. You also should use the watchdog timer.

{Quote hidden}

Why? The cap is only powered when the mercury power switch is
closed. Its leakage current will be insignificant compared to the current
the PIC draws in active mode. As soon as the mercury switch is
open, the cap is out of circuit. Hence no leakage current.

I'll explain the purpose of the cap. Its purpose is to quickly ramp up to Vcc
when the mercury switch is closed. In its uncharged state, it will draw much
more current then the PIC will. However, it will quickly ramp up to Vcc (which
will be a function of the caps ESR and the internal resistance of your battery).

So, since the cap has now is charged up to Vcc, it can hold up the PIC until
the mercury/tilt switch is in a stable position.

-Jeff

1999\08\09@215907 by Anne Ogborn

flavicon
face
hmm... power to some sort of cap, then use a regulator as
an anti-brownout circuit? So the ragged 'power on' gets chopped out,
and the regulator makes it come up sharp. Most modern IC
3 terminal regulators do this.

--
Anniepoo
Need loco motors?
http://www.idiom.com/~anniepoo/depot/motors.html

1999\08\09@222155 by Dennis Plunkett

flavicon
face
At 17:01 9/08/99 -0400, you wrote:
{Quote hidden}

(which
>will be a function of the caps ESR and the internal resistance of your
battery).
>
>So, since the cap has now is charged up to Vcc, it can hold up the PIC until
>the mercury/tilt switch is in a stable position.
>
>-Jeff
>
>

Humm I don't think so. A short make period on the switch may not allow the
cap to chagre to full potential and thus cause a brwonout! The size of the
cap will have to be set correctly.
Actually mercury switches are great in that the actual contact time is for
a long period with no contact bounce.

Dennis

1999\08\09@223233 by Dennis Plunkett

flavicon
face
At 12:51 9/08/99 -0600, you wrote:
>I'd guess no.  It takes a certain amount of time for Vcc to come above
>threshold, and all inputs, including the tilt switch input, would be invalid
>during this time.  Also, depending on if you were sending any data or
>switching outputs, they would all be invalid as well.  You would have to
>have an output, set for a long period of time to indicate that the micro was
>up and running, then do your stuff.  Of course, while it was waiting to
>really run, the tilt might open up again.

Yes true but the fact that the tilt has operated means that the thing has
been tilted and perhaps the count could be incremented. It will take the
PIC around 18uS to exit the reset state, one would assume that the switch
will still be operated at this point.


>
>Suggestion might be to use the tilt as an interrupt to wake from sleep.
>
>email me private....on the application.  Just curious.
>
>Suggestion might be to use the tilt as an interrupt to wake from sleep.


To this I agree, use the tilt to reset the PIC and bring it out of the
sleep state, do some stuff and then go  back to sleep. The advantage of
this is that the reset circuity can be controlled by teh PIC on a port pin,
and the RESET will put this pins back into an input state and thus dissable
the reset control

                       VCC
                    -----
                       /
                       \
       switch          /
       o/ o -------------PIC RESET
       |
       |
       |----------------- PORT pin set low

Set the port pin low when all is done then when the switch closes the PIC
is reset, the port pin goes to an input, and no power is used or false
resets. A small cap can be connected on the reset line to hold low (The pin
will current limit)
Then comes brown out. In this case I don't think that this should be
considered, however Seiko make a range of low current comparators for a few
cents each. This could be also placed in the reset line, or! you could use
it as a low battery monitor


Dennis

1999\08\09@224306 by Gennette Bruce

flavicon
face
If instance response is not needed then you just have to put a small
capacitor on the MCLR pin.  You should already have a high value resistor
feeding this pin, the capacitor will steal the trickle of power through this
resistor for a short period (until the capcitor is charged up) THEN the PIC
will get reset.

You could calculate the values for the resistor and capacitor, but almost
any value capacitor will be Ok if the resistor is big (>10k).

Bye.

> {Original Message removed}

1999\08\10@135146 by Wagner Lipnharski

picon face
Bruce Cannon wrote:
> The thing is, in my idea of a super cheap 3v lith device there are as few
> parts as possible.  There is no brownout circuit and no regulator as the 3v
> is pretty flat and comes on without much of a ramp.  And I realize that
> mercury switches don't 'bounce', but they do 'jiggle'.  That is, it's likely
> that the power will cycle within the window of the startup timer.
>
> My questions are really "Will power cycling during the startup timer period
> just restart the PIC no problem, or can there occur a brownout-like
> condition?" and "Is a startup timer needed or useful in this scenario?"

This is why the recomendation to use an external "power latching"
system, using transistores. Once the mercury switch make the first
contact, it is done, power will be stable to the uC until it commands
differently, except if the mercury switch still contacted, when things
need to be done differently.

If you don't use a pulse discriminator to "wake up" the uC via Reset
connected to the mercury switch, it will holds the uC in reset state.
Using the discriminator pulse, the problem still the same, as many reset
pulses as many contacts the switch does, and if the switch still
contacted your program would never know, except if another pin port
check it out via a direct connection (resistor or something).

Remember that "cheap" doesn't mean "zero components". You can implement
a lot of components and build a nice circuit for less than 2 dollars,
that by the way, small quantities production speaking, 2 dollars is not
a fortune. Except if you are planning to produce thousands of units,
perhaps you are expending dozens of hours to save fifty cents in 20
units. Those hours of your time cost hundreds of times more than the
savings in the circuit.

This type of calculation is done all the time in the industry.  How much
we will expend in research to save how much in the final circuits?
Considering a professional costing $70/hour for the company, wasting 40
hours ($2800) to generate some savings in a circuit that will be
produced 100 thousand units, so the minimum cost reduction he =NEEDS= to
generate is 2800/100k = 2.8 cents per unit.

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