| Author |
Message |
inifinitrix
Joined: 30 Jul 2006 Posts: 80 Location: MALAYSIA
|
22 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
|
22 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
|
22 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
|
22 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
|
23 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
|
|
| Back to top |
|
 |
lambtron
Joined: 02 Nov 2005 Posts: 256 Helped: 26 Location: Portland, OR
|
23 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

|
23 Aug 2006 22:32 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
inifinitrix
Joined: 30 Jul 2006 Posts: 80 Location: MALAYSIA
|
29 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 |
|
 |