electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

need a circuit that use 1 button switch that give 2 input


Post new topic  Reply to topic    EDAboard.com Forum Index -> Electronic Elementary Questions -> need a circuit that use 1 button switch that give 2 input
Author Message
inifinitrix



Joined: 30 Jul 2006
Posts: 80
Location: MALAYSIA


Post22 Aug 2006 16:13   

one button switch circuit


somebody help me

i need a circuit (maybe with help by logic gate ic) that only use one button as an input and give 2 input

how to differentiate two types of input,i. e. the quick click vs. the long depression,by use only 1 button ??

somebody,can u solve my problem??
Back to top
safwatonline



Joined: 19 Nov 2005
Posts: 1418
Helped: 172
Location: EGYPT


Post22 Aug 2006 18:07   

one button switch ic


this can be done in uController using a delay loop , such that the fist click lets u inside a loop that if broken by another click do something and if broken by end of delay do something else

Added after 1 hours 37 minutes:

ofcourse u can make it using hardware like using a two way switch which has a three terminals one connected to the output and the other two either conected to a resistor which in turn connected to either supply or GRound , OR connected to the opposite of the first terminal i.e. gnd if supply in T1 or supply if gnd in T!
in which if the o/p is connected to the terminal with Resistance +Supply "or GND" then it gives logic High"or low" and if the terminal is connected to the the other terminal then it gives opposite logic.
sorry for the bad description , if u dont understand what i meant i will try to attach some sketch
Back to top
inifinitrix



Joined: 30 Jul 2006
Posts: 80
Location: MALAYSIA


Post22 Aug 2006 19:07   

one button trigger circuit


i'm using 1 push button( quick click and long click ) to toggles between 2 mode.i need to solve this by not using microcontroller device.sound like a challenge right??
is there any logic ic that i could use??
Back to top
safwatonline



Joined: 19 Nov 2005
Posts: 1418
Helped: 172
Location: EGYPT


Post22 Aug 2006 20:10   

need a circuit that use 1 button switch that give 2 input


Hello again,
the 2nd idea using two way switch should do it.

another idea is using the push button to charge a cap. where the voltage of the cap. controls a bistable circuit maybe by 555
Back to top
newelltech



Joined: 23 Aug 2006
Posts: 217
Helped: 32


Post23 Aug 2006 19:20   

Re: need a circuit that use 1 button switch that give 2 inpu


Not knowing what components would be ok, here's a simple idea.
I'm assuming that +5 and -5 Volts are available.
I'm assuming a 2 pole 2 pos switch although I think you can use a SPST with diodes.

Add two RC low-pass filters, one with a time constant of T1 that charges to +5 v when the switch is pressed and one with a time constant of T1 x 3 (or so) that charges to -5v when the switch is pressed. When the switch is not pressed, the filters are grounded.

Add a logic IC with Schmidt trigger inputs and connect one to C1 and C2 with resistors. Connect the other input to C1 and C2 with 2 other resistors, connecting its input to another gate to invert the signal.

When the switch is pressed for only T1/2 time the first output should go active soon after it is released.
When the switch is pressed for longer than T1, the second output should go active.

You'll need to adjust all the values and do some worst case engineering calcs, but it should work ok. Draw out the waveforms to see how it works.

This seems like a lot of trouble, but also a lot of fun. I'd argue for 2 switches Smile
Back to top
lambtron



Joined: 02 Nov 2005
Posts: 256
Helped: 26
Location: Portland, OR


Post23 Aug 2006 22:32   

Re: need a circuit that use 1 button switch that give 2 inpu


You can use a clock source such as a free-running 555 timer and a state machine made from discrete logic or a pld.

The state machine must implement a state diagram like the one shown in the attached image. In the state diagram, P means button pressed, P with overbar means button not pressed. State Short is active for one clock period upon detection of a "short" button press, and state Long is active for one clock period upon detection of a "long" button press. I show 8 states because this can be easily implemented with a 3-bit state register, but you can modify it as needed.
Back to top
Google
AdSense
Google Adsense




Post23 Aug 2006 22:32   

Ads







Sorry, but you need login in to view this attachment

Back to top
inifinitrix



Joined: 30 Jul 2006
Posts: 80
Location: MALAYSIA


Post29 Aug 2006 19:01   

need a circuit that use 1 button switch that give 2 input


ok,i think i will use the one with schmitt trigger.

there is one more problem..

if there two push button switch for two input..
one switch to increase a value for output
and another switch to decrease the output value

for example,with help of 555 timer,
if the output is speed for motor,
one button to increase the pwm signal (speed increase)
and another button to decrease the pwm signal (speed decrease)

another example,
if the output is brightness of LED,
one button to increase the pwm signal (brightness increase)
and another button to decrease the pwm signal (brightness decrease)

is there any suggestion circuit??
any genius in edaboard that want to help me to solve this problem??

oopps!! forgot to tell,try solve this by not using microcontroller device =)

thanx
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Electronic Elementary Questions -> need a circuit that use 1 button switch that give 2 input
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
A circuit that gives monostable pulse if the input is high (4)
Need a small, flat switch or sensor that detects shaking. (6)
Delay circuit that can delay the input signal 1 clock period (9)
Need a circuit that performs bitstuffing functions (2)
need a circuit that will supply 12 volts DC (1)
need a Bi stable circuit that uses CMOS (2)
Anyone can give me an advise that is my result in CST (1)
I need a simple circuit that can read IR signals, store them (3)
a book that will give mathematical details and the theory (1)
Toggle switch that activates with DC current? (4)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS