A
Abstract Dissonance
For one of my projects I decided to use a momentary switch(where its held on
as long as you push it in and when you release it will disconnect... I think
its called momentary switch). The switch basically selects presets and I
will have a couple of them. The idea is like the buttons on a blender where
you press one and it mechanically turns off all the others. I'm trying to do
the same thing digitally. i.e., if I press button A it will turn off all the
others(only one will be on ofcourse). I do this by basicaly using toggle
FF's.
The main issue I have, I think, is the switch debouncing part of it. I've
look on some web sites and they basicaly give a few methods such as a simple
filter circuit(which I think won't work on mine because of the switch type)
and an monostable vibrator. Anways, I feel that I can do this with just some
resistors and capactiors. By looking at the idea for a monoastable vibrator
where they used a capacitor to "slow the change" I figure I can sorta do the
same.
Basicaly the way I see it is that when the switch bounces it will discharge
a capacitor... the more bouncing the more discharge. By setting the
capacitor to slowly charge but discharge quickly when the switch is pressed
the voltage across the capacitor is 0... any bouncing will discharge the
capacitor as it slowly charges. By using a schmitt trigger then I can get a
high only after the capacitor has charged enough. By setting the time
constant one should be able to get rid of the bouncing(its effect is to
length the time it takes to charge).
The circuit is
---- Schmitt Trigger - Out
|
V --- R1 --+-- Switch --- R2 --- GND
|
--- C1 -- GND
What I'm wondering is if this is an effective circuit(i.e., if its
practical). I can simulate it and it seems like it would work but I have no
idea if it will work in the real world(and I have no components to test it
but will order some soon after I get a general idea what I need).
I figure the only problem is that if the person pushing the button pushes it
to fast then it will increase the time the button is "activated" and it
won't change anything... not sure if one could get the time constant down
enough so that the bouncing is fixed but not part of the button pressing of
the user.
Heres a link to the a pic:
http://www.geocities.com/abstract_dissonance/SDBC1.JPG
the green is ofcourse the charge on the capacitor(well, voltage) and the red
is my "output". Whenever I hit the switch the capacitor discharges(drop on
the green line) rather quickly and tries to "recover". Each suscessful time
I hit the switch I try to hit it several more times a row to simulate the
bouncing. Note at the last time there are two red "boxes" next to each other
which would be problem I think... I think this can be fixed with setting the
appropriate resistor and capacitor values though.
Any ideas?
Thanks,
AD
as long as you push it in and when you release it will disconnect... I think
its called momentary switch). The switch basically selects presets and I
will have a couple of them. The idea is like the buttons on a blender where
you press one and it mechanically turns off all the others. I'm trying to do
the same thing digitally. i.e., if I press button A it will turn off all the
others(only one will be on ofcourse). I do this by basicaly using toggle
FF's.
The main issue I have, I think, is the switch debouncing part of it. I've
look on some web sites and they basicaly give a few methods such as a simple
filter circuit(which I think won't work on mine because of the switch type)
and an monostable vibrator. Anways, I feel that I can do this with just some
resistors and capactiors. By looking at the idea for a monoastable vibrator
where they used a capacitor to "slow the change" I figure I can sorta do the
same.
Basicaly the way I see it is that when the switch bounces it will discharge
a capacitor... the more bouncing the more discharge. By setting the
capacitor to slowly charge but discharge quickly when the switch is pressed
the voltage across the capacitor is 0... any bouncing will discharge the
capacitor as it slowly charges. By using a schmitt trigger then I can get a
high only after the capacitor has charged enough. By setting the time
constant one should be able to get rid of the bouncing(its effect is to
length the time it takes to charge).
The circuit is
---- Schmitt Trigger - Out
|
V --- R1 --+-- Switch --- R2 --- GND
|
--- C1 -- GND
What I'm wondering is if this is an effective circuit(i.e., if its
practical). I can simulate it and it seems like it would work but I have no
idea if it will work in the real world(and I have no components to test it
but will order some soon after I get a general idea what I need).
I figure the only problem is that if the person pushing the button pushes it
to fast then it will increase the time the button is "activated" and it
won't change anything... not sure if one could get the time constant down
enough so that the bouncing is fixed but not part of the button pressing of
the user.
Heres a link to the a pic:
http://www.geocities.com/abstract_dissonance/SDBC1.JPG
the green is ofcourse the charge on the capacitor(well, voltage) and the red
is my "output". Whenever I hit the switch the capacitor discharges(drop on
the green line) rather quickly and tries to "recover". Each suscessful time
I hit the switch I try to hit it several more times a row to simulate the
bouncing. Note at the last time there are two red "boxes" next to each other
which would be problem I think... I think this can be fixed with setting the
appropriate resistor and capacitor values though.
Any ideas?
Thanks,
AD