Build Your Own Arcade Controls Forum

Main => Main Forum => Topic started by: BC_Jeffro on January 12, 2013, 12:27:32 am

Title: why is there a capacitor in my player 1 coin mech micro switch?
Post by: BC_Jeffro on January 12, 2013, 12:27:32 am
hi i was going to trade coin doors on my Bosconian mini with my super pac and noticed this on my super pac coin door mirco switch
 why is there a cap there?
Title: Re: whats this about ?
Post by: matsadona on January 12, 2013, 09:09:37 am
Not sure... but maybe to eliminate contact bounce? Or is it the opposite - i.e. that the coin signal will last longer so that the game has a better change noticing it maybe?
Title: Re: whats this about ?
Post by: Gray_Area on January 12, 2013, 04:26:03 pm
I recommend titling your thread "why is there a capacitor in my coin mech?".  Or, shortly, "Capacitor in my coin mech?"
Title: Re: whats this about ?
Post by: BC_Jeffro on January 12, 2013, 10:34:51 pm
ok
Title: Re: why is there a capacitor in my coin mech?
Post by: paigeoliver on January 12, 2013, 10:49:28 pm
That is actually the switch, the mech is the the tan plastic jobby above that.

Game probably wasn't triggering coin drops every time for some reason and that somehow fixed it.
Title: Re: why is there a capacitor in my player 1 coin mech micro switch?
Post by: BC_Jeffro on January 12, 2013, 10:52:43 pm
ya i know its not on mech but on micro-switch (will change post title)

so its not a huge mystery there are reasons for doing this
thanks
Title: Re: why is there a capacitor in my player 1 coin mech micro switch?
Post by: WindDrake on January 13, 2013, 10:04:46 pm
Contact debounce & contact noise filtering.
Title: Re: why is there a capacitor in my player 1 coin mech micro switch?
Post by: BC_Jeffro on January 15, 2013, 01:02:17 am
 :applaud:
thanks
Title: Re: why is there a capacitor in my player 1 coin mech micro switch?
Post by: rCadeGaming on January 17, 2013, 01:05:03 pm
That's interesting.  How many microfarads (uF, should say on the side)?
Title: Re: why is there a capacitor in my player 1 coin mech micro switch?
Post by: brad808 on January 17, 2013, 08:05:50 pm
For some reason this isn't sinking into my head. Can someone explain the dumb dumb version as to how this is doing something useful?
Title: Re: why is there a capacitor in my player 1 coin mech micro switch?
Post by: PL1 on January 17, 2013, 08:50:29 pm
For some reason this isn't sinking into my head. Can someone explain the dumb dumb version as to how this is doing something useful?

The Ikalogic website de-bounce page (http://www.ikalogic.com/de-bouncing-circuits/) explains that pressing and releasing a button can cause spring-loaded contacts to bounce (picture dropped silverware) resulting in voltage spikes like this at the encoder input:
(http://ikalogic.cluster006.ovh.net/wp-content/uploads/problem.jpg)

The discharge and re-charge of the capacitor during the press and release smooths the voltage like this:
(http://ikalogic.cluster006.ovh.net/wp-content/uploads/problem2.jpg)

By choosing a capacitor that charges and discharges at the right rate, you allow the encoder to record legitimate credits and block false ones.

Software or firmware filters out any remaining ripples -- "Source of error" in second pic.


Scott
Title: Re: why is there a capacitor in my player 1 coin mech micro switch?
Post by: brad808 on January 17, 2013, 09:18:29 pm
Awesome, that makes good sense. Thank you.

Sent from my Galaxy Nexus

Title: Re: why is there a capacitor in my player 1 coin mech micro switch?
Post by: rCadeGaming on January 17, 2013, 10:52:12 pm
By choosing a capacitor that charges and discharges at the right rate

What's the math in choosing the right capacitor?
Title: Re: why is there a capacitor in my player 1 coin mech micro switch?
Post by: WindDrake on January 17, 2013, 11:49:07 pm
Picking the right cap is part voodoo, part conventional wisdom for debouncing via noise suppression.

Voltage isn't important. Just pick a cap rated to (typically) 25-33% higher then your operating voltage. This is just headroom over-speccing.

Value is handled by our friend the RC Time Constant.

"But WD!" you'll say. "That takes a pullup resistor!"

Then I remind you that the input is either internally pulled up (90's and onwards) or has a pullup at the board. :)

http://www.ganssle.com/debouncing-pt2.htm (http://www.ganssle.com/debouncing-pt2.htm)

Math is there. Here's the short of it: Most switch bounce lasts less then 10-20msec. Most debounce caps you'll ever see are 0.1 or 1uF.

Larger caps put a big honking delay on the line, which can cause the board to ignore a coin drop that's quick behind the last one.

My guess is that's why that cap is there. That, or that cab's original board had some serious gremlins.