Build Your Own Arcade Controls Forum

Main => Lightguns => Topic started by: ids on March 22, 2011, 02:22:04 pm

Title: Custom Light Gun Recoil - help needed
Post by: ids on March 22, 2011, 02:22:04 pm
Inspired by several threads here (and not wanting to hijack), I've decided to create my own gun recoil circuit (and thread).  These will be going into Andy's Aim Track gun housing.

I stumbled upon these at fleabay, and got two lots of 4 (8 total):

http://cgi.ebay.ca/ws/eBayISAPI.dll?ViewItem&item=300538603887#ht_5358wt_1139 (http://cgi.ebay.ca/ws/eBayISAPI.dll?ViewItem&item=300538603887#ht_5358wt_1139)
(http://i.ebayimg.com/22/!CF7S9ZQBmk~$(KGrHqJ,!jYE1JUCsPlRBNWyb2!Q2w~~0_12.JPG)


I haven't tried to jam them into the gun housing yet, but I think they should fit - might need a little encouragement in spots, but should be ok.

So, the next part is getting them to fire.  As you can see, the coil expects 18V.  No problems, just need a wall-wart or something to provide that.  However, we'll also need to isolate the 5V gun trigger from the 18V circuit (don't want to be taking any unnecessary chances here).  Based on other threads here, I've learned quite a bit more and have started to cobble together a circuit for this.  Some of my sources are shown in the following diagram, and also listed below.

Any kind of feedback, validation, etc, would be hugely helpful - I really have no idea what I'm doing when it comes to electronics.  Also, as mentioned I have 8 solenoids - but only two guns; if I figure this out properly, I could easily be encouraged to make a few extra and offer them up cheap.

Please help (click on image for bigger pic).  In particular R6 is a wild-ass guess.
* Edit: The schematic below is crap, see follow-up posting for fix *
(http://ids.ca/~steve/mame/images/recoil/Recoil.png) (http://ids.ca/~steve/mame/images/recoil/Recoil.png)

TIP121 chosen because the local shop had a pile of them.
LTV-816 chosen because I had several lying around.
Caps chosen based on what I had, some guesswork, and some math (wrt 555 monostable)


Sources, as shown in diagram - but clickable:

1) http://www.kpsec.freeuk.com/555timer.htm (http://www.kpsec.freeuk.com/555timer.htm)
2) http://www.technologystudent.com/elec1/5554.htm (http://www.technologystudent.com/elec1/5554.htm)
3) http://doyle.wcdsb.ca/ICE3MI/Logic%20Gates/555%20monostable%20lesson.htm (http://doyle.wcdsb.ca/ICE3MI/Logic%20Gates/555%20monostable%20lesson.htm)
4) http://www.fairchildsemi.com/ds/LM/LM555.pdf (http://www.fairchildsemi.com/ds/LM/LM555.pdf)
5) http://www.national.com/ds/LM/LM555.pdf (http://www.national.com/ds/LM/LM555.pdf)
6) http://forum.arcadecontrols.com/index.php?topic=108256.0 (http://forum.arcadecontrols.com/index.php?topic=108256.0)  (Nerf Maverick ...Solenoid Recoil)
7) http://forum.arcadecontrols.com/index.php?topic=109029.0 (http://forum.arcadecontrols.com/index.php?topic=109029.0) (Q*Bert + MAME + Knockers)
8 ) http://www.epanorama.net/documents/wiring/wire_resistance.html (http://www.epanorama.net/documents/wiring/wire_resistance.html)


Also, I suspect I could use the pc's 12V to fire this.  This might also simplify things by allowing a common ground.  If anyone wants to illustrate such a set-up, please do, it'd be great to show alternatives.  However, I'm looking to cover all my bases with this, and not necessarily take the easy route.  A selection of alternatives, simplifications, discussion on how to pick resistors/caps based on...??... etc would be a great and welcome addition to the thread.  As does anything that helps while the above circuit is still on the breadboard and not soldered yet.

Many huge thanks in advance.
Title: Re: Custom Light Gun Recoil - help needed
Post by: ids on March 22, 2011, 10:32:44 pm
Slapped together what's showing in above diagram - blew a fuse - some minor adjustments and all is well.  I'll update diagram when I get a chance.

There might be a better way, but this seems to do what i need:
1) If trigger is held, only a pulse is sent
2) Pulse is of a given time, regardless if trigger is released or pulsed for the duration
3) Solenoid circuit is isolated from the 5V triggering circuitry

Next step, install in gun - details to follow
Title: Re: Custom Light Gun Recoil - help needed
Post by: mytymaus007 on March 22, 2011, 11:08:45 pm
if you get this to work ill take one Let me no when your all done i  have no clue what the hell your doing but it sounds Awsome :laugh2:
Title: Re: Custom Light Gun Recoil - help needed
Post by: ids on March 23, 2011, 09:36:01 am
Thanks - I haven't much of a clue about what I'm doing either.  I'll update schematic a bit later...damn work getting in the way  ;D
So far, however, with a pile of testing, none of the components is getting hot - I'll take that as a good sign.
Title: Re: Custom Light Gun Recoil - help needed
Post by: ids on March 23, 2011, 04:02:26 pm
Ok, here I've got the corrected schematic - this resembles what I have actually wired on a breadboard and have tested:

(http://ids.ca/~steve/mame/images/recoil/Recoil2-tn.png) (http://ids.ca/~steve/mame/images/recoil/Recoil2.png)

You can click to zoom.

If anyone knows anything about electronics, I'd love to hear from you (good, bad, indifferent, troll, random insult, validation, improvements, whatever you've got).

I will follow this up with an attempt to get it all going in the Ultimarc gun shell.
Title: Re: Custom Light Gun Recoil - help needed
Post by: trevski on March 23, 2011, 06:01:50 pm

Not sure if you noticed this thread for a version of the Aimtrak firmware with recoil pulse output? (http://forum.arcadecontrols.com/index.php?topic=109142.0 (http://forum.arcadecontrols.com/index.php?topic=109142.0))

Most of the hard work is done for you using that method and only requires a simple circuit with a mosfet and diode, as pointed out by Andy.

However, as you said you would like to cover all the bases, and you're going ahead with a more compex solution - Wouldn't it be sweet to allow an extra input into that circuit to trigger a pulse to the solenoid. I'm thinking you could use the output from an LEDwiz that is hooked into Mame.
Title: Re: Custom Light Gun Recoil - help needed
Post by: GreatLamer on March 24, 2011, 06:07:19 am
shaking wont kill your aimtrak electronic?
Title: Re: Custom Light Gun Recoil - help needed
Post by: ids on March 24, 2011, 09:37:03 am
Not sure if you noticed this thread ...

Thanks for the link - I recall hearing of a pulse option from Andy, maybe from that thread.  Just seemed like a pita to request a custom firmware and hack around with "pin 5" which is a tiny pad on the aimtrack board.  All it would change is that R1 and C1 become irrelevant.

The Mosfet option might eliminate most of the rest of the circuit above, but it's beyond me without a circuit diagram.  I don't know how well a 40ms pulse would trigger the solenoid - presumably Andy chose the timing to do a good job of it.  For those more confident in their abilities, it's probably a good option.  If someone works it out, please provide details.

Quote
Wouldn't it be sweet to allow an extra input into that circuit to trigger a pulse to the solenoid. I'm thinking you could use the output from an LEDwiz that is hooked into Mame.

Good idea.  However, the LEDWiz signal is low/ground, and the above circuit is triggered by a high/+5.  To make the LEDWiz fire this thing, you'd need some kind of logic inverter, maybe one of these:
http://focus.ti.com/docs/prod/folders/print/cd4049ub.html (http://focus.ti.com/docs/prod/folders/print/cd4049ub.html)
http://focus.ti.com/lit/ds/symlink/sn74ls14.pdf (http://focus.ti.com/lit/ds/symlink/sn74ls14.pdf)

Updated diagram above to show where you could connect the LEDWiz. Also added a 1K resistor inline with gun trigger to control capacitor charging current.

I've used the second one before, having built the pinball plunger circuit shown here: http://www.johnsretroarcade.com/hardware_pinball.asp (http://www.johnsretroarcade.com/hardware_pinball.asp)
Otherwise, we are again beyond my abilities.

shaking wont kill your aimtrak electronic?

My assumption would be that, as the aimtrack is all solid state, no moving parts, a bit of shaking is easily tolerated.  But what do I know  :dunno

I test fit the solenoid - it's a tight squeeze.  The screws holding the case together will be put under a bit of stress unless I can shave a bit here and there (from case and/or solenoid).  More to follow as I progress.

Also, I've measured across the solenoid, usage of 350mA.  Therefore, I think I'll drop the fuse to 500mA (I'll update schematic later)updated.

Thanks.
Title: Re: Custom Light Gun Recoil - help needed
Post by: Howard_Casto on March 25, 2011, 11:38:41 pm
I just wanted to point out that unless you already have a ledwiz, it isn't necessary to hook up an output. 

In addition to the ledwiz and the other popular i/o controllers, mamehooker supports everything from directx force feedback to the parallel port.  The most popular route for hooking up outputs to 12v controls has been the parallel port so far.  Why?  Well if you are only dealing with a couple of outputs, the parallel port will do and aside from myabe 2 bucks for a db25 connector, the thing is free!

Using a 5-pin relay is the easiest route btw... they will have n/c and n/o pins so it doesn't matter if the signal is inverted. 
Title: Re: Custom Light Gun Recoil - help needed
Post by: Howard_Casto on March 26, 2011, 03:22:21 am
Actually..... what do the aim track buttons show up as?  Are they configurable?

The reason I ask is I recently added Keypress events to mamehooker.  In other words, you can set it up to where something happens when a particular key is pressed. 

Right now it supports keyboard keys and mice buttons but not multi-mice.  This isn't a problem though if aim tracks buttons are configurable as we can just set player 2's trigger to mouse button 2. 

Long story short, we could eliminate the need for most of your circuit, especially the 555 timer.  You would keep mamehooker running in the background at all times (as it's designed to be) and anytime you pressed the trigger we could send a pulse to fire the solenoid.  On those games in mame that support recoil, you are going to need mamehooker anyway and for those specific games we would override the key binding so that the gun would only respond to the in-game recoil. 


Now mamehooker won't support global bindings at the moment due to an oversight on my part, but a new version will be out within the next week or so and it will support such features.  If you are interested I would be glad to help with the mamehooker scripts and the circuit design.  Just PM me as I don't visit the main forum that often.
Title: Re: Custom Light Gun Recoil - help needed
Post by: AndyWarne on March 27, 2011, 04:59:50 pm
The schematic when using pin 5 with the recoil firmware is somewhat simpler!

(http://www.ultimarc.com/images/recoil.jpg)
Title: Re: Custom Light Gun Recoil - help needed
Post by: Howard_Casto on March 28, 2011, 04:12:24 am
The schematic when using pin 5 with the recoil firmware is somewhat simpler!

(http://www.ultimarc.com/images/recoil.jpg)

Yeah that's more along the line of what I was thinking. 

I'm intrigued now... what does the recoil firmware do exactly?
Title: Re: Custom Light Gun Recoil - help needed
Post by: AndyWarne on March 28, 2011, 07:52:13 am

It just issues a 40ms pulse when the trigger is pulled, but only when aimed at the screen.

Andy
Title: Re: Custom Light Gun Recoil - help needed
Post by: Howard_Casto on March 28, 2011, 10:57:56 am
That's pretty clever!  Can it be turned on/off programatically or do you have to reflash the firmware?  I'm about to release a fairly substancial new version of mamehooker so if there's a way that I can access the pin via HID interface let me know. 

I also noticed you've got a fancy new dll for your products after I went to the trouble of adding support the hard way a few years back.  Might as well add that in too.  ;)
Title: Re: Custom Light Gun Recoil - help needed
Post by: WindDrake on March 28, 2011, 11:07:12 pm
If you're really worried about that MOSFET shorting across source/gate and killing your AimTrak, you could also look into using a PPTC (Polyfuse, etc) at around 250-300ma to protect it. It'll just blow up rather then kill your $45 AimTrak.

I'm going to be building a cabinet myself soon, so this is of interest to me. Handling recoil is something I've been thus far unsuccessful in figuring out.

How do you plan on mounting the thing, or getting your Solenoid Plunger to return after it "Fires"? What's it going to knock against?
Title: Re: Custom Light Gun Recoil - help needed
Post by: ids on March 29, 2011, 11:51:30 am
I was planning to run MameHooker anyway, to drive the Q*Bert knocker - so I'll definitely consider this option.  With this, it would be possible to have the relay (or opto-isolator) outside the gun, and just run power wiring from cabinet to gun to solenoid.  This would save room inside the gun.

Andy - thanks for the circuit diagram.  I couldn't source parts locally, so now I'm waiting on Mouser.  I'l be trying this option too.

WindDrake - thanks for the pointer on PPTC's - knowing nothing about electronics, I've no idea how much I should be concerned about the source/gate shorting issue, but a~ $0.30 component for piece of mind seems quite reasonable.  For mounting - I've been scratching my head.  The solenoids I have need some room inside the gun housing, and there aren't many options.  If I may link to Andy's site for illustrative purposes:
(http://ultimarc.com/images/aimtrak_housing.jpg)
There is a perfect spot to the left and slightly lower than that red button.  However, the solenoid is pointing in the wrong direction, and the feel is all wrong when it fires.  Along the top is an option, but the IR Receiver board and USB cable are an issue, and other internals get in the way.  Anywhere in the lower ~2/3 doesn't have enough width (gun housing wont close properly).  I'll figure something out sooner or later - I just hope I don't destroy too many things along the way.

For this particular solenoid, the plunger is actually drawn in when it fires, striking the metal plate at the bottom (see pic way up at the top).  My current plan is to use a spring to hold it out.  It will likely need a stopper of sorts so it doesn't fly out all the way.  I am also trying to think of some way to add weight to the exposed end for greater impact.  There's also a metallic clicking sound on impact that I may attempt to dampen (small piece of rubber or something).

Sorry I don't have more updates.  However, the options from Andy and Howard are really great.  I believe my original circuit should provide a general purpose solution.  Andy's circuit is great for those with an aimtrack, and MameHooker sounds like another excellent general purpose solution.

Thanks
Title: Re: Custom Light Gun Recoil - help needed
Post by: Howard_Casto on March 29, 2011, 03:59:48 pm
I haven't done this on a gun, but I have used solenoids before. I think as dampener you need something a bit softer than rubber.  That strip insulation you get for doors and windows (the black foam stuff that sticks on with double-sided tape) works really well.  A piece of rubber underneath that wouldn't hurt though. 

I've got the spare parts so you've inspired me to do this mod myself.  I've already tested the "generic mode" I spoke of in the latest, unreleased version of mamehooker and it works really well.  Of course I tested it on win 7... I'll have to throw it on one of my xp-based mame cabs to make sure it still works well there. 
Title: Re: Custom Light Gun Recoil - help needed
Post by: JcProAm on May 08, 2011, 10:07:14 pm
Sorry hate to ask but does anyone know where to buy the 33n10 transistor in andy's diagram?  google has been less than useful.  Thanks so much!!! 
Title: Re: Custom Light Gun Recoil - help needed
Post by: nick3092 on May 08, 2011, 11:38:05 pm
Try Digikey.
Title: Re: Custom Light Gun Recoil - help needed
Post by: WindDrake on May 09, 2011, 12:24:48 pm
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=FQP33N10-ND (http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=FQP33N10-ND)

$1.28 each.
Title: Re: Custom Light Gun Recoil - help needed
Post by: JcProAm on May 09, 2011, 04:13:20 pm
Thanks both of you  ;D ;D ;D  I found it last night as i was falling asleep with my netbook on me while trying to get my plans for cabinet finalized.  One of the many conditions of building a cabinet imposed by the wife was that it have light guns.  And i though recoil would be a nice addition.
Title: Re: Custom Light Gun Recoil - help needed
Post by: BadMouth on July 22, 2011, 04:34:15 pm
The schematic when using pin 5 with the recoil firmware is somewhat simpler!

(http://www.ultimarc.com/images/recoil.jpg)

Is anyone using this setup?

I tried it last night on a Happ recoil gun using the mosfet listed, but the solenoid moves as soon as I turn the 24v on.
If I cut the voltage down to 12v, it will work until the mosfet gets hot, which only takes a few times (no heatsink).
I've checked and double checked my wiring and it matches this and every other diagram I've found.
I haven't hooked the aim-trak up to it yet.  I'm just tapping the resistor on the gate against the tab (drain) to fire.
(is that bad?)

Was just wondering if anyone else had it working with the transistor mentioned?
Advice?

EDIT: I was using wrong value resistor.  :banghead: