Searching \ for 'self latching' 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/index.htm?key=self+latching
Search entire site for: 'self latching'.

Truncated match.
PICList Thread
'self latching'
1999\08\09@150618 by Bruce Cannon

flavicon
face
Hi all:
If I have a zero-power device which is powered up by a fairly brief external
switch event, I'd like to have that switch closure power up my (3v lithium
powered) PIC and then have the PIC latch itself on.
I thought I could use a transistor in the PIC ground connection in parallel
with the external switch.  So that as soon as it wakes the PIC can drive it
on, latching itself on until it's done processing then powering down
completely.

I'd like to use a MOSFET but I couldn't turn it on, could I?  What is the
most efficient switch to use in this type of app?  In either case, with the
switch on the low side, would I run into the situation where I coudn't turn
it off, because PIC ground is above switch ground?

In general, how does a smart person do this type of thing?

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@153913 by MEDICINTEKNIK KB

picon face
Bruce,

One way is to connect a small capacitor from the OSC output to a diode, that in turn goes to the MOSFET gate. Wire the MOSFET drain to +, and the source POWERS the PIC (Vcc). You need a second diode from gate to GND; anode end to GND.

Put your ON switch across the MOSFET. This will temporarily power the PIC, but as the oscillator starts up, it will feed the gate to keep the MOSFET conducting after you have let go of the switch ("instantly" - that is).

When the process is complete, the code should end with SLEEP. What happens ? The oscillator stops. The MOSFET will stop conducting, and your product is at near-zero power again.

I hope I got this right.

Best wishes


Sven
-----Ursprungligt meddelande-----
FrŒn: Bruce Cannon <spam_OUTbcannonTakeThisOuTspamJPS.NET>
Till: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU <PICLISTspamKILLspamMITVMA.MIT.EDU>
Datum: den 9 augusti 1999 21:06
€mne: self latching


{Quote hidden}

1999\08\09@154334 by Dave VanHorn

flavicon
face
> One way is to connect a small capacitor from the OSC output to a diode,
that in turn goes to the MOSFET gate. Wire the MOSFET drain to +, and the
source POWERS the PIC (Vcc). You need a second diode from gate to GND; anode
end to GND.


I think you failed to consider the effect of gate capacitance on the osc.

1999\08\09@160204 by Adam Davis

flavicon
face
Now that's what I'd call 'Neat Design'.  I'd like to know if you've implemented
it, or if you've just come up with it?

-Adam

MILTON MEDICINTEKNIK KB wrote:
>
> Bruce,
>
> One way is to connect a small capacitor from the OSC output to a diode, that i
n turn goes to the MOSFET gate. Wire the MOSFET drain to +, and the source POWER
S the PIC (Vcc). You need a second diode from gate to GND; anode end to GND.
>
> Put your ON switch across the MOSFET. This will temporarily power the PIC, but
as the oscillator starts up, it will feed the gate to keep the MOSFET conductin
g after you have let go of the switch ("instantly" - that is).
>
> When the process is complete, the code should end with SLEEP. What happens ? T
he oscillator stops. The MOSFET will stop conducting, and your product is at nea
r-zero power again.
{Quote hidden}

1999\08\09@162325 by MEDICINTEKNIK KB

picon face
That, I BELIEVE, the gate capacitance is quite small, But in general, adding the diodes, Cu-foil, etc have a capacitive loading effect yes. The "ordinary" cap's value can maybe be reduced. But you are right that this might be critical at high clock freq's, and frequency should be verified.


Sven

-----Ursprungligt meddelande-----
FrŒn: Dave VanHorn <@spam@dvanhornKILLspamspamCEDAR.NET>
Till: KILLspamPICLISTKILLspamspamMITVMA.MIT.EDU <RemoveMEPICLISTTakeThisOuTspamMITVMA.MIT.EDU>
Datum: den 9 augusti 1999 21:43
€mne: Re: SV: self latching


>> One way is to connect a small capacitor from the OSC output to a diode,
>that in turn goes to the MOSFET gate. Wire the MOSFET drain to +, and the
>source POWERS the PIC (Vcc). You need a second diode from gate to GND; anode
>end to GND.
>
>
>I think you failed to consider the effect of gate capacitance on the osc.
>

1999\08\09@175814 by paulb

flavicon
face
Bruce Cannon wrote:

> I'd like to have that switch closure power up my (3v lithium powered)
> PIC and then have the PIC latch itself on.  I thought I could use a
> transistor in the PIC ground connection in parallel with the external
> switch.

 But you are going to lose voltage with the transistor.

> I'd like to use a MOSFET but I couldn't turn it on, could I?  What is
> the most efficient switch to use in this type of app?

 Can you find some sort of 74(A)HC00 rated to work at this voltage?
Make an R-S latch, using three gates paralleled if necessary for the
half that powers the PIC.  I suspect you'd end up with a lower component
count than using discretes.

 Actually, you need another gate for the shutdown function:

   o +V           +---------------+
   |              |               |
   |  +-----------C--+            |
   <  |   ____    |  |    ____    |
 R <  +--|    \   |  +---|    \   |
   <     |     o--+      |     o--+-----o PIC power
   |   +-|____/        +-|____/   |
   |   |               |          |
   +---+--+------------+  +-------+
          |            |  |
 Switch o-+    ____    +--C----------+
            +-|    \      |  ____    |
            | |     o--+  +-|    \   |
 Shutdown o-+-|____/   |    |     o--+
                       +----|____/

--
 Cheers,
       Paul B.

1999\08\09@184453 by Dennis Plunkett

flavicon
face
At 12:02 9/08/99 -0700, you wrote:
{Quote hidden}

I have read the responses to this, but firstly I must ask why turn the
power off? Why not use the power down and sleep function in the PIC?

Dennis

1999\08\09@191812 by Bruce Cannon

flavicon
face
Thanks to everyone who has offered an opinion on this topic!

> I have read the responses to this, but firstly I must ask why turn the
> power off? Why not use the power down and sleep function in the PIC?

Because asleep, with the WDT running so it can wake itself periodically, the
current drain is (data sheet worst case) about 10uA.  Which would only give
me a couple of years even on the fattest coin cell readily available (250mAH
or less), and the person who's asking my help wants four or five years.  So
I thought I'd better kick around some zero-power ideas.  I know others have
done similar things; I've searched the archives and read several interesting
threads but thought I should fish for fresh wisdom.

I'd pay money to be a member of this list!!

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@201000 by Dennis Plunkett

flavicon
face
At 16:11 9/08/99 -0700, you wrote:
{Quote hidden}

Did you not indicate that the PIC would be powered up by the use of appling
power? If this is the case then there is no need to run the WDT, and power
drain will drop. You can use external stimulus to provide a reset and the
PIC will start off and run each and every time
How long does this thing have to go for?

Dennis

1999\08\09@205622 by Bruce Cannon

flavicon
face
> Did you not indicate that the PIC would be powered up by the
> use of appling
> power? If this is the case then there is no need to run the
> WDT, and power
> drain will drop. You can use external stimulus to provide a
> reset and the
> PIC will start off and run each and every time
> How long does this thing have to go for?

I'm not doing a good job of explaining myself, am I?  I'll try to be
clearer:  some very small thing stuck on the bottom of a bottle which times
a mercury switch closure in an attempt to determine rough quantities of
liquid dispensed (good idea or not, this is a given).  Typically you might
leave the PIC on all the time, but asleep most of the time, and interrupted
by the tilt.  But as I tried to figure out how to meet the stipulated
battery life requirements (goal of 5yrs, I talked them down to 3), I
realized that it's doing nothing most of the time.  If I could power it
through the tilt switch and have it latch itself on until it was done
processing, then I could run a lot longer.  But not if I had to stay awake,
running at full speed, the whole time the bottle was tilted.  I would need
to sleep, waking periodically to check the state of the tilt, and on untip
finish up all the duties then unlatch the power.

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@211035 by Wagner Lipnharski

picon face
>> [snip]  If I could power it through the tilt switch and have it latch itself
on until it was done processing, then I could run a lot longer.  But not if I ha
d to stay awake, running at full speed, the whole time the bottle was tilted.  I
would need to sleep, waking periodically to check the state of the tilt, and on
untip finish up all the duties then unlatch the power.

It sounds strange to me. Sorry :)
If you are connecting the tilt switch to trigger power on to the unit,
and if this is the only function of the switch, probably you will have
just a pair of wires coming out of the switch, right? like a mercury or
steel ball switch.  In this case, if the switch fails by any reason, it
will not power up your circuit, and *NOT EVEN* tells your circuit that
the switch is tilted when you wake your circuit periodically to check
the switch... it means that doesn't make sense to wake up your circuit
periodically to check the switch, because if the switch is failling,
your circuit would not be able to check it.

A very simple and economic way to do that... just use the switch to feed
the base of a transistor via a high value resistor. Upon the switch is
tilted, the transistor powers the PIC, the RESET condition at one of the
PIC I/O port pins keeps the transistor operating (via a smaller resistor
that bypasses the tilt switch resistor). At this time, the tilt switch
can even return to normal, the PIC will still keeping the transistor
feeding power to it.  At the end of your software routine, just change
the voltage of that port I/O pin and the transistor opens *forever*
waiting again the tilt switch.

You just need 3 resistors and a small PNP or NPN darlington (or not)
transistor. Less than one dolar.

Wagner.

1999\08\09@213951 by Wagner Lipnharski

picon face
Some better design for your self latching.

Upon the mercury switch closes, it feeds power to the pic unit, the
reset situation of the pic puts its port pin up, driving the NPN
transistor that drives the PNP in a loop condition.

After your software finishes what it needs to do, it drops the port pin
to low level what would cut power to the PIC.  To check if the mercury
switch is continuously tilted, just make your software execute a certain
time loop after it drops the port pin low (to allow capacitor discharges
and so on), and try to do something with the software, if the routine
still working it means the mercury switch still contacted.


+VCC---+----o-MERCURY-o------+-----+------> +VCC TO PIC
      |      SWITCH         |     |
      |                     |     |
      +-------.     .-------+     |
      |        \   /             ===
      R         V /  PNP         ---  10uF
      R 4.7k   -----              |
      R          |                |
      |          |               GND
      +----------+
      |
      R
      R 4.7k
      R
      |
      .
       \ |
NPN     \|         4.7k
         |----+-----RRRR------ FROM PIC PORT PIN
        /|    |
       V |    R
       |      R  4.7k
       |      |
       |      |
      GND    GND


The following circuit variant doesn't need the PIC port pin to be driven
high at the reset, but it needs a LOW level to power off the circuit via
the diode.  In some way this version is better than the above since it
latches itself immediatelly, without even the need of the pic to keep it
latched.


+VCC---+----o-MERCURY-o------+-----+------> +VCC TO PIC
      |      SWITCH         |     |
      |                     |     |
      +-------.     .-------+     |
      |        \   /        |    ===
      R         V /  PNP    |    ---  10uF
      R 4.7k   -----        |     |
      R          |          |     |
      |          |          |    GND
      +----------+          |
      |                     R
      R                     R 4.7k
      R 4.7k                R
      R                     |
      |                     |
      .                     |
       \ |                  |
NPN     \|       2.2k       |  + Diode -
         |----+--RRRR-------+----|>|---- FROM PIC PORT PIN
        /|    |                          Minus Level Powers
Off
       V |    R
       |      R  2.2k
       |      |
       |      |
      GND    GND

Wagner.

1999\08\09@215909 by Dennis Plunkett

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

Agreed the first circuit requires that the PIC sets the pin high within a
set time period to turn the thingo off, however! (Always a but don't yopu
just like them?) On setting the pin high the PIC must hold it until the
supply voltage fails (PIC enters a brownout type state) At this point the
PORT pin may be in amy state and thus may set low, and enough leakage may
exist to turn the transistor back on again. Also the large cap is a waste
of energy that has to be used by the PIC doing nothing! Also the resistors
are required to waste energy while the cap is discharging.


{Quote hidden}

Better in this case however (There it is again) the diode serves no useful
purpose as the PIC will enter a reset state at power up and the port pins
will be in a high impedance state, thus the user needs to set the port
direction control bit and set low. Again it has the same problems as above
in that the brownout period may induce all sorts of trouble (The cap thing
and resistors still are the same).


I still say that the power down method is better in that a 5uA idle state
with a button cell of 250mA will operate for 5 years



Dennis


>
>

1999\08\10@004750 by William K. Borsum

flavicon
face
At 04:11 PM 8/9/99 -0700, you wrote:
>Thanks to everyone who has offered an opinion on this topic!
>
>> I have read the responses to this, but firstly I must ask why turn the
>> power off? Why not use the power down and sleep function in the PIC?
>
>Because asleep, with the WDT running so it can wake itself periodically, the
>current drain is (data sheet worst case) about 10uA.  Which would only give
>me a couple of years even on the fattest coin cell readily available (250mAH
>or less), and the person who's asking my help wants four or five years.  So
>I thought I'd better kick around some zero-power ideas.

Take a look at a 9-volt lithium battery in standard transistor radio style.
1200 mAH.  The battery may die of old age before you deplete it at a few
uA.  About 14 years at 10 uA, battery shelf life is ten years.  Standard
(cheaper) alkaline should get you five years.

Kelly

****************************************************************************
********
All legitimate attachments to this email will be clearly identified in the
text.
William K. Borsum, P.E.
OEM Dataloggers and Instrumentation Systems
<spamBeGoneborsumspamBeGonespamdascor.com> & <http://www.dascor.com>

1999\08\10@132743 by Bruce Cannon

flavicon
face
>From Walter's first msg:
> It sounds strange to me. Sorry :)

It was in response to a suggestion to not use the WDT; I was explaining that
I'd have to use it in order to time things.  Without it I'd have to stay
awake running at full power the whole time the tilt switch was closed.  Knwo
what I mean?

{Quote hidden}

I always do such a terrible job of explaining things!  Here's the deal: say
you are a PIC, trying to last as long as possible.  You are off until
powered up by (through) a tilt switch.  Then you latch yourself on and begin
timing the tilt.  Which means you have _to monitor_ the state of the switch,
because it no longer controls your power, right?  Then, when the tilt switch
finally goes off you send you total time logged to somewhere else.  Once
done communicating and making your own internal records, you unlatch
yourself.  See?

{Quote hidden}

This is the kind of thing I was wondering about.  Do you mean RESET
condition (IO pins hi Z state), or an active driving of the pin by the
program once the PIC starts up?  So the NPN is on the ground side of the
PIC.  But in this case, how can the PIC turn itself off, since it's ground
is higher than the emitter?  Oh, yeah, it's current not voltage, so it just
goes high impedance.

And from Walter's other msg:
>The following circuit variant doesn't need the PIC port pin to be driven
>high at the reset, but it needs a LOW level to power off the circuit via
>the diode.  In some way this version is better than the above since it
>latches itself immediatelly, without even the need of the pic to keep it
>latched.
<schematic snipped>

I like it, but I had the same question Dennis had about the big cap.  And he
raises another interesting question; I hadn't thought about a brownout
condition on power down which causes unknown output states.  Would this
really happen?  Wouldn't the transistor shut down pretty quickly?  Maybe I'm
not conceptualizing that scenario too well.

And maybe he's right too that I should just do a simple always-on device.

Thanks,

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\10@140228 by Wagner Lipnharski

picon face
Oh, now I understand what you want. A time logger circuit, that tracks
the time the tilt switch is on.
This is a complete different story. For this type of thing you really
need =TO READ= the tilt switch status, while the tilt switch also has
the function to latch power to your circuit.  I have a solution using a
simply 74HCT00 that should interest you, we used it in one of our "time
loggers"... similar to what you want.  Let me check if I can post public
the circuit.
Wagner.

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