Build Your Own Arcade Controls Forum

Main => Main Forum => Topic started by: Felice on March 07, 2005, 04:27:18 pm

Title: button-qustion
Post by: Felice on March 07, 2005, 04:27:18 pm
I should need
Title: Re: button-qustion
Post by: tetsujin on March 07, 2005, 04:36:19 pm
Saying that you'll do that with "the microswitch" is a little inaccurate, or rather represents a needlessly complicated way of getting the effect you want.  To have the output be a "closed circuit" you'd need to connect your button and circuit to a (electro-mechanical) relay, for total isolation.  But for most practical purposes it's enough to just have one output line which changes voltage with respect to the ground line on your button encoder.

There are various ways you can achieve this effect.  You may be able to pull it off with a simple R-C circuit (closing the switch quickly charges the capacitor, and then releasing the switch causes the capacitor to discharge through a resistor) in conjunction with what I believe is called a "one-shot" (translates a falling edge on the button voltage - the switch closure, into a fixed-length pulse).  Or if you know where to get or how to build a one-second one-shot, that would do it, too.

You should look through the basic circuits books at Radio Shack.  I have a nagging suspicion that they'd have something like this, possibly implemented with a 555 IC and a few extra parts.

Me, I'd program a PIC to do the job.  But if you're not set up for that, it takes a bit of money and learning to get up to speed enough to make useful stuff.
Title: Re: button-qustion
Post by: RayB on March 07, 2005, 04:48:32 pm
And then there's the software side......
Program whatever softwae that is responding to the button press to do this delay in software.

Title: Re: button-qustion
Post by: Trimoor on March 07, 2005, 08:38:12 pm
I think the one-shot is really more of a debouncer than what Felice was thinking.

I found a circuit for a 555 monostable multivibrator, which looks like it will work.
(http://www.uoguelph.ca/~antoon/circ/monostbl.gif)
Title: Re: button-qustion
Post by: Felice on March 08, 2005, 06:34:54 am
Thanks for the answers. Can I build the LM555 in my X-Arcade-unit and connect it with a pushbutton? How should I do this. (PS I'm a newbie in electronics).
Title: Re: button-qustion
Post by: RayB on March 08, 2005, 08:39:50 am
Can you explain to us the purpose of this? Maybe someone can come up with a simpler solution?
Title: Re: button-qustion
Post by: Witchboard on March 08, 2005, 08:54:44 am
Sounds like you're wanting an autofire button like on the old console controllers.  Maybe you could hack one of those apart and see what makes it tick?
Title: Re: button-qustion
Post by: tetsujin on March 08, 2005, 11:18:46 am
I think the one-shot is really more of a debouncer than what Felice was thinking.

I found a circuit for a 555 monostable multivibrator, which looks like it will work.

I found that same circuit when I was digging around...  (It was also referred to as a one-shot) But I'm not sure if it'll do exactly what he was looking for.  It says it'll give a pulse for a "momentary" press of the switch - doesn't say anything about if the switch is held down.  And what's that about having to bring the reset pin low?  (I don't know the 555 well enough to eyeball it and see what it'll do...  I haven't used 555's in years.)
Title: Re: button-qustion
Post by: Trimoor on March 08, 2005, 04:17:19 pm
SW1 is where to connect the microswitch, and the arrow from pin3 connects to the encoder.  My curiosity is telling me to ask: What do you want this for?

Quote
It says it'll give a pulse for a "momentary" press of the switch - doesn't say anything about if the switch is held down.
Neither did Felice.  From what I read, s/he wants a definite 1 second pulse regardless of how long the switch is pressed.

The reset pin stays high.  It's only used for a hard reset, which isn't needed when it only pulses after a buttonpress.
Title: Re: button-qustion
Post by: tetsujin on March 08, 2005, 05:11:15 pm
Quote
It says it'll give a pulse for a "momentary" press of the switch - doesn't say anything about if the switch is held down.
Neither did Felice.  From what I read, s/he wants a definite 1 second pulse regardless of how long the switch is pressed.

Meaning the circuit is to deliver a 1 second pulse if the button is tapped, and also a single 1 second pulse if the button is held down for ten seconds.  The circuit you listed doesn't say how it behaves in cases like the latter (as far as I could tell.)