Software Support > Automated Projects
Using parallel port and mamehooker for gun recoils
charlieram:
Hi, I posted in the main forum but decided here was probably better seeing as I had no replies!
So what I have so far is Two aimtrak lightguns with recoil solenoids that trigger only when pointing at the screen, What I would like to do is use mamehooker to trigger the solenoids using games with the recoil outputs enabled in Mame and Model2 (if and when howard implements it). I have 2x 24V 5A ITE PSU's to drive the solenoids, Can i use Mosfets similar to the ones on the Aimtrak module to trigger the solenoid using the parallel port. I also understand that the parallel port outputs a voltage during PC startup so would this result in the solenoids being active until windows loads? if so could I use another pin as a Not gate and use mamehooker to enable and disable it when a game supports the recoil?
Any kind person want to draw me up a circuit with the ideal components or would this idea just not work? if so why not, Thanks
DaOld Man:
You should be able to drive the solenoids with mosfets.
You can use pin 4 (at least this is what i have found) to turn off the mosfets when it is high. (The NOT gate you mentioned).
I have found pin 4 comes on at boot and stays on after windows loads up, but you will need to test it to be sure it works on yours.
When you run your program to fire the solenoids, you can turn off pin 4.
I used a pnp transistor attached to pin 4. You can look at my rotating project thread to see how I did it. (Warning thread is long and may burn the eyes.)
charlieram:
Thanks for the reply, I'm thinking I could actually use the little pcb with mosfets that came with the aimtraks and put the standard trigger switch pcb back in the gun, then all I should need to do is a not gate like this? I also assume I would need transisters wired for each recoil output and control them both with pin 4 and pins 2 and 3 for the recoil pulse, need to work out resister values though.
Edit.
Just remembered in one of your posts about connecting all ground pins so Pin 20 should actually be pins 18-25.
DaOld Man:
I had to look twice at your diagram, but then I remembered that the out on this circuit is basically just doing the same thing as the trigger button on your gun is doing. (Solenoid load is being handled by a transistor not shown in your diagram.)
I dont see why this wouldnt work, but just keep in mind that the maximum current on a LPT port is 10 to 20 ma. I dont know how much load that the trigger circuit is putting on the pin 2 LPT, but keep in mind that when pin 4 is high, the current on pin 2 will amount to current across the pin 2 resistor. (If pin 2 is high).
Here is an extremely rough drawing of an alternate way to do this, using a PNP as a NOT and an NPN as the switch, if your trigger circuit requires too much current.
charlieram:
Thanks for your time, what do you think about this, the red is the existing aimtrak trigger circuit minus the trigger switch circuit and the black is what i'm hoping will trigger and disable from the LPT or will i still need the transistor from your previous diagram and if so, what would i use for the V+.
Cheers,
Charlie
Navigation
[0] Message Index
[#] Next page
Go to full version