Software Support > Automated Projects

Using parallel port and mamehooker for gun recoils

<< < (4/8) > >>

charlieram:
So I have built the circuit and it works! :applaud: sort of  ???, I first tested the inputs using a couple of 1.5v AA batteries and they triggered fine so the next step was to try it on an old donor PC. I plugged it in and switched it on and the solenoids engaged. Oops, back to the drawing board I thought.
 I decided to check the voltages on all the pins during boot and i found that Pins 2,3,6 and 8 were high during boot while Pins 1,4,5 and 7 were low and seeing as Pin 4 is the disable pin it needs to be high during boot time. All pins are high once windows loads.
I switched Pin 2 to the disable line and pins 3 and 4 as P1 and P2 recoils and it boots fine with just one short activation just as windows loads, I can live with that. I also notice that if I open 'My Computer' it also briefly activates the solenoids???.
I loaded up Mamehooker and tested the script lpe 1 3 1,lpe 1 2 0,wat50,lpe 1 3 0,lpe 1 2 1 and it works fine, I tried to run Terminator 2 in MAME but the donor PC is just not up to the job so I think I'm going to have to start ripping my cab apart to fully test it, Obviously I will have to check which pins are high on my MAME cab to find out which ones I should use.
Anyway, it seems to work and although it isn't going to be a one shoe fits all it is still possible for anybody to use this circuit as long as they have one pin that stays high during the boot process and once windows loads.
Thanks for the help, Once I get it running in MAME I will try and get a video of the solenoids in action. My soldering isn't the best but it does the job.

charlieram:
Back for more help, So I have finally ripped my cab apart and found which pins to use, for this one, pin 8 is disable and pins 5 and 6 are p1 and p2 trigger. I installed mamehooker and a new mame for testing purposes and the solenoids are activated fine but I tried it in terminator 2 and if you hold your finger on the trigger for the automatic gun all you can feel is the solenoid fire initially and then it has a really feint release before it is triggered again resulting in a really feint pulse, obviously this is no good for the solenoid as it is almost constantly on.
Would the switch off time be quicker if I increased the 10k resistor and if so would I go for the highest I could get? also would it be safe/advisable to reduce the 4.7k on the gate to increase switch on time although I am not sure that is the issue? Thanks in advance again :angel:

charlieram:
Anyone? ???

DaOld Man:
Sorry for the delay.
Looks like you are doing some good electrical work there.
Im not sure what is triggering the printer port output to do what you are suggesting, but I doubt that changing the resistors you mentioned will help, but for grins and giggles, you can try changing the 10 K to maybe a 5K and the base resistor to a 1 K?
Also, looks like your 1 k resistors on the inputs of the opto-isolators might be a little large, although I dont think it would cause what you are seeing. a 500 ohm might produce better results (think of the opto-isolator input as being an led).
It appears to me that the software firing the solenoid (through the printer port outputs) might be firing too fast. A solenoid is a mechanical device and it will take time to completely engage and disengage.
So before I changed anything electrical (since your circuit does appear to be working), I would see if you can go into the games software and adjust the pulse times on the machine gun. (Maybe an ini, cfg, or settings file?) Looks to me like the pulses need to be on longer and off longer.
Im not sure if you can do that, I know nothing about that game or how it works.
If you cant do this, then you may have to use a timer circuit to get the machine gun fire. (I think this was discussed earlier?)
Good luck and let us know what you find. This is a very interesting project.

DaOld Man:
Also I need to add that whichever pin you use to enable the circuit, make sure it is not being turned on or off in a weird way while the game is being played.
You can easily test this by disconnecting from the disable p-port output pin and connect to pin 18-25 (p-port ground). (Optoislotors led commons to ground.)
This will turn on the enable all the time so you can see how the gun acts when it should be firing like a machine gun.
CAUTION! DISCONNECT FROM YOUR DISABLE PIN FIRST! CONNECTING ANY P-PORT OUTPUT PIN DIRECTLY TO P-PORT GROUND WILL DAMAGE THE P-PORT OR COMPUTER IF THE DISABLE PIN GOES HIGH!
In other words, it will short the printer port output and quite possible fry your computer.

EDIT:
Also, the 1 k resistor on the optoisolator leds could be making the leds "flash" because of low current. You might want to try 500 ohm resistors. (You can solder another 1 k resistor across the current 1k and it will give you 500 ohms.)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version