Switch question

Is there anyway to turn a momentary on push switch into a SPST?.. so that if you push it once it keeps the circuit on.. then if you push the same button again the circuit turns off. Any help would be appreciated.

Reply to
none none
Loading thread data ...

Not easily. What are you controlling, and from what kind of power supply? Is this a homework question?

Reply to
mc

It's easy (if you use logic parts)...

Debounce the switch.

Clock a D-flop (QN connected to D) with the debounced signal.

Use Q or QN to operate a logic level MOSFET to do the actual power switching.

Probably can also do it with a multi-pole relay.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

no it's not homework, it's just curiosity.. i'm basically wanting an LED light to turn on and off by touching the button.. just a small part of a larger system that i'm working on. The test circuit will receive 3VDC

Reply to
none none

If that's from a battery, then CMOS would be a good choice. Well, you'll need low voltage CMOS, but I think 3V is available. You could use a stock type D f/f chip as mentioned, then add a transistor to drive the LED and anything else. Hmm..what color is the LED? 3V isn't much headroom for even a green LED.

Tim

--
Deep Fryer: a very philosophical monk.
Website: http://webpages.charter.net/dawill/tmoranwms
Reply to
Tim Williams

none none scrobe on the papyrus:

I would put in an 8-pin PIC or AVR (ATtiny13 would be ideal). The button goes to one of the I/O pins and the other five can be used to control the LED and other stuff as well. Cost's pennies and you'll learn a bit about software along the way.

--
John B
Reply to
John B

OK, build Jim Thompson's flip-flop circuit, and make sure the switch is debounced.

Is your pushbutton SPDT by any chance? If so, a much simpler solution can be made using an R-S flip-flop made from two NAND or NOR gates.

Reply to
mc

Yes... you get the debouncing without adding any parts, and you get the full output capability of the AVR, which is enough to drive an LED.

*sigh* How soon will we be using a CPU in *everything*? :)
Reply to
mc

On Sun, 18 Jun 2006 15:46:40 -0400, "mc" Gave us:

Some idiot up in avd is "laughing" because he thinks that the fact that Toshiba's new HD DVD player has a PC like motherboard in it, a flash drive, A LAN connection, and runs Linux, makes it a PC.

I guess those Windows CE refrigerators are PCs too then...

Reply to
Roy L. Fuchs

That is NOT a SPST action. An ordinary pushswitch IS ALREADY a SPST device.

You are instead requesting an ALTERNATE ACTION pushbutton.

Use two inverters, two resistors, and a capacitor.

See the ALTERNATE PUSHBUTTON cameo in my CMOS Cookbook.

--
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU\'s LAIR web site at http://www.tinaja.com
Reply to
Don Lancaster

Like in a flashlight to turn the bulb on?

--
Service to my country? Been there, Done that, and I\'ve got my DD214 to
prove it.
Member of DAV #85.

Michael A. Terrell
Central Florida
Reply to
Michael A. Terrell

Call the input of the first CMOS inverter A, its output B Call the input of the second CMOS inverter C, its output D

Connect B to C directly. Connect D to A via a 4.7 k resistor, forming a set-reset latch.

Add a series 470K resistor and 0.1 uFd capacitor to ground at point BC with the capacitor end being grounded. Call the resistor capacitor junction E.

Wire the pushbutton directly between A and E.

This is one of the simplest possible relalizations of a master slave type T flip flow.

It is, of course, self-debouncing.

More in

formatting link

--
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU\'s LAIR web site at http://www.tinaja.com
Reply to
Don Lancaster

Has that been done yet?

Even worse are the students who assume everything has *always* had a CPU. What kind of CPU is in a 1950s radio? :)

(And those who use the word "fifties" to denote approximately 1925-75. The "fifties" do not comprise the Nixon or Hoover presidencies, nor WWII, nor the Beatles...)

Reply to
mc

if

button

Duck tape.

Reply to
Richard Henry

Not to my knowledge, but it was the most extreme overkill I could come up with in under five seconds. ;-)

--
Service to my country? Been there, Done that, and I\'ve got my DD214 to
prove it.
Member of DAV #85.

Michael A. Terrell
Central Florida
Reply to
Michael A. Terrell

Sure, the 8048 came out just before 1950, wasn't it? ;-)

Nixon was in office in the '50s ('53-'61), BTW. Hoovers sucked then too.

--
   Keith
Reply to
krw

use a flip flop if your using a SPST type botton.

--
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
Reply to
Jamie

Eh?

'53-'61 would be about right for Nixon as Eisenhower's VP, but he was President from 1969-1974. See...

formatting link

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

A CPU controlled LED flashlight is ridiculously more efficient than a conventional one.

Also MUCH cheaper in the long run.

--
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU\'s LAIR web site at http://www.tinaja.com
Reply to
Don Lancaster

I was thinking about the traditional incandescent lamp type of flashlight with more mechanical parts than electrical.

--
Service to my country? Been there, Done that, and I\'ve got my DD214 to
prove it.
Member of DAV #85.

Michael A. Terrell
Central Florida
Reply to
Michael A. Terrell

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.