The input voltage is about 15V. I was thinking that a P-Channel Enhancement
FET might work by grounding the gate with the switch. This could provide
power to a nanowatt PIC (via a regulator) or something else. The PIC would
then need to drive the gate low to keep the product on. I still have to
figure out how to turn the product off again with the same PB switch.
I know this problem has been solved many times before. Any suggestions?
--
Al Clark
Danville Signal Processing, Inc.
--------------------------------------------------------------------
Purveyors of Fine DSP Hardware and other Cool Stuff
Available at http://www.danvillesignal.com
> I have an low power application where I want to turn a product on or off
> with a tact switch. Tact switches (as far as I know) are momentary SPST.
>
> The input voltage is about 15V. I was thinking that a P-Channel Enhancement
> FET might work by grounding the gate with the switch. This could provide
> power to a nanowatt PIC (via a regulator) or something else. The PIC would
> then need to drive the gate low to keep the product on. I still have to
> figure out how to turn the product off again with the same PB switch.
>
> I know this problem has been solved many times before. Any suggestions?
>
Connect the switch from portb/7 to ground. Enable the pullup option and
interrupt on this pin. Put the PIC into Sleep mode. Wake up from sleep
and see toggle a bit in memory for on/off.
There are several other versions of this scheme for the PIC.
--
Luhan Monat, "LuhanKnows" At 'Yahoo' dot 'Com'
http://members.cox.net/berniekm
"The future is not what it used to be."
> Al Clark wrote:
>
>> I have an low power application where I want to turn a product on or
>> off with a tact switch. Tact switches (as far as I know) are
>> momentary SPST.
>>
>> The input voltage is about 15V. I was thinking that a P-Channel
>> Enhancement FET might work by grounding the gate with the switch.
>> This could provide power to a nanowatt PIC (via a regulator) or
>> something else. The PIC would then need to drive the gate low to keep
>> the product on. I still have to figure out how to turn the product
>> off again with the same PB switch.
>>
>> I know this problem has been solved many times before. Any
>> suggestions?
>>
> Connect the switch from portb/7 to ground. Enable the pullup option
> and interrupt on this pin. Put the PIC into Sleep mode. Wake up from
> sleep and see toggle a bit in memory for on/off.
>
> There are several other versions of this scheme for the PIC.
>
This method assumes that the PIC and its regulator are powered (and thus
drawing a small amount of current). With a SPDT switch, one half of the
switch could be connected as you suggest, with the other closure used for
turning on the FET from the off position. Tact switches are SPST, so this
doesn't work.
If you consider that the PIC16F818 (nanowatt PIC), might only draw .3uA
during sleep mode, your method might work if you can drop the incoming
supply voltage from 15V to 3.3 or 5V without the regulator becoming a
current problem.
Input voltage 12V to one side of SW out put to /SHDN input of regulator
(i use PQ20VZ11 from Sharp, but most switchers and regulators will do)
via half of BAV70. REGENABLE signal from micro to other side of BAV70.
This takes care of ON, push SW regulator regulates, micro powers up and
then latches power on through the BAV70.
For power off I connect the input power to an I/O pin, usually a KEY
input type, with interrupt on change, via a simple resistive divider,
set such that the lowest desirable operating voltage will easily meet
the switching threshold of the micro. This allows you to time the OFF
period. If an INT pin is not available I usually have some kind of heart
beat signal say every 5msecs, that I can also moitor this with.
Occasionally I wire this to a spare A/D pin, this allows me to check the
battery voltage at power up, if I have no other battery test.
Al
Al Clark wrote:
> I have an low power application where I want to turn a product on or off
> with a tact switch. Tact switches (as far as I know) are momentary SPST.
>
> The input voltage is about 15V. I was thinking that a P-Channel Enhancement
> FET might work by grounding the gate with the switch. This could provide
> power to a nanowatt PIC (via a regulator) or something else. The PIC would
> then need to drive the gate low to keep the product on. I still have to
> figure out how to turn the product off again with the same PB switch.
>
> I know this problem has been solved many times before. Any suggestions?
>
--
Please remove capitalised letters to reply
My apologies for the inconvenience
Blame it on the morons that spam the net
Perhaps add a few diodes (3), resistors and transistor.
The P-mosfet has a pullup between gate and +V, from this node
two diodes, one going to the switch, another to a PIC 'open
collector' output, for which you need to add a transistor.
From the hot side of the switch, the 3rd diode, to a PIC
input with a (internal) pullup.
When the button is first pressed, the fet turns on, the PIC
starts, and the PIC sets an output high, to drive the transistor
that keeps the FET turned on.
When the PIC powers up, it ignores the switch for at least 100mS.
After that, when it sees a negative *edge*, it turns off the output
that kept the circuit powered. It won't power off immediately, but
will as soon as the button is released.
--
Thanks, Frank.
(remove 'x' and 'invalid' when replying by email)
Yes, you can drop the voltage with a zener diode. I would use a 10 volt
zener for this application.
I used the sleep mode and a zener for a project....
http://members.cox.net/berniekm/crickt.gif
It seems to draw very little from the battery until you trigger the PIC.
Al Clark wrote:
> I have an low power application where I want to turn a product on or off
> with a tact switch. Tact switches (as far as I know) are momentary SPST.
>
> The input voltage is about 15V. I was thinking that a P-Channel Enhancement
> FET might work by grounding the gate with the switch. This could provide
> power to a nanowatt PIC (via a regulator) or something else. The PIC would
> then need to drive the gate low to keep the product on. I still have to
> figure out how to turn the product off again with the same PB switch.
>
> I know this problem has been solved many times before. Any suggestions?
>
We have worked this out before- a pair of CMOS inverters is all that's
needed- each switch press toggles and debounces- the current draw in the
OFF state is all leakage- and you can omit the 10K pulldown on the
output of the left inverter if you don't care about ON/OFF state when
the Vdd is first applied:
Please view in a fixed-width font such as Courier.
Vdd
+---------------------+--------------------+
| | |
| | |
| | |
| | |
| | |
| 4007A | |
+-+ +-+ |
+-| |P +-| |P | |--+
| +-+ | +-+ 10K | |
+--+ +----+------+---+ +--+----/\/\----| |->+
| | +-+ | | | +-+ | |
| +-| |N / / +-| |N | | |--+
| +-+ \ \ +-+ | |
| | 1.5M 10K | | |
| -+- | \ \ | | L
+--o o---|----+ | | | O
| sw | ---0.1u | | | A
| | --- | | | D
| | | | | | |
| +----+------+---------+--------------------+
| | |
| | |
| 15K | GND
+-----------------/\/\------------+
Al Clark wrote:
> I have an low power application where I want to turn a product on or off
> with a tact switch. Tact switches (as far as I know) are momentary SPST.
>
> The input voltage is about 15V. I was thinking that a P-Channel Enhancement
> FET might work by grounding the gate with the switch. This could provide
> power to a nanowatt PIC (via a regulator) or something else. The PIC would
> then need to drive the gate low to keep the product on. I still have to
> figure out how to turn the product off again with the same PB switch.
>
> I know this problem has been solved many times before. Any suggestions?
>
Another method with low parts count would be like so- this keeps the
high voltage off the PIC and draws no power in the OFF state- turn ON is
clear, to turn OFF monitor INT pin, then send PIC into loop keeping
transistor base drive off, when UVLO resets the PIC, the SW has finished
debounce, and ckt remains OFF.
Please view in a fixed-width font such as Courier.
p-fet
V+>--+----+-+ +-------------------------------------------+--> V+,sw
| | ^ | |
| ----- |
| 100k | sd sd 100K +-------+
+-/\/\-+--+-|>|-+-|<|-+----/\/\----+------------Vcc PIC |
| | | | | | |
c | | | +-------+ UVLO | REGLTR|
|/ | o| +------->|INT |<--------| |
+----| === +-- | | RST | |
| |\ 0.1u o| +--| PIC | | |
| e | | | +-------+ +-------+
| 10K | | | | | |
+-/\/\-+--+-----+------------------+-----------------+
| | |
| 10K | ---
+---------/\/\--------------+ gnd
>I have an low power application where I want to turn a product on or off
>with a tact switch. Tact switches (as far as I know) are momentary SPST.
>
>The input voltage is about 15V. I was thinking that a P-Channel Enhancement
>FET might work by grounding the gate with the switch. This could provide
>power to a nanowatt PIC (via a regulator) or something else. The PIC would
>then need to drive the gate low to keep the product on. I still have to
>figure out how to turn the product off again with the same PB switch.
>
>I know this problem has been solved many times before. Any suggestions?
Here's a perfectly (actually, imperfectly) bizarre circuit:
v+
|
|
|
|
relay coil
|
|
|
+----+--res--+
| | |
| | |
| cap |
switch | |
| | |
| gnd |
| d
+-----------g n-mosfet
s
|
gnd
John
Need a res from g to gnd or it will drift "on". Also, you might
consider what happens if you hold the switch down too long. ;-)
Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
sp...@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
It's got to drift somewhere! And it will typically take days to do so.
> Also, you might
>consider what happens if you hold the switch down too long. ;-)
>
Sure; but after that, consider what happens if you tap..tap..tap the
switch some more.
John
Not so bizarre:
Please view in a fixed-width font such as Courier.
v+
|
+------+--------------------+
| | |
_ | |
^ relay coil /
- | 4.7K
| | /
+------+ \
+----+--1M---+-------------+ |
| | | | |
| | | | |
| 1U | | +---------------+
switch | | | | |
| | | | | |
| gnd | | | |
| d | d |
+-----------g n-mosfet +-----g n-mosfet |
| s s |
| | | |
| gnd gnd |
| |
| |
| |
| |
+------------------47K----------------------------+
;-)
>> Also, you might
>>consider what happens if you hold the switch down too long. ;-)
>>
>
>Sure; but after that, consider what happens if you tap..tap..tap the
>switch some more.
Counting on the external feedback loop, hunh?
Al
--
This was basically the same circuit I had designed except for the two
diodes that allow a SPST switch to be used. My original circuit used a SPDT
switch (which I couldn't buy) to isolate the PIC from the FET.
After I saw the diode isolators, I felt a little stupid, since I have used
this method myself in the past and I am an experienced designer. This is a
good example of how we can help each other when one of us has a design
block.
Thanks.