Ok, I have my computer interface plan. You can hook the Hdrive to the limits and computer just like Koz319 did his, but I am just a little scared that my computer might get harmed if something shorts or the H drives power supply goes berserk.
So I am going to isolate my computer from the rotate circuit with opto-isolators.
The opto-isolator is a very small DIP IC (chip), that has a led and a photo transistor.
It's easier for me to just think of it as a SPST normally open electronic switch.
Put current in one side, and the other side closes.
They have many applications, but the switch side can only handle a small amount of current, so the best applications are computer or electronics.
Ok, back to my circuit.
Attached is my drawing.
I bought a handfull of the Texas Instruments TIL119 optos off ebay. Hopefully they will work for me. I used the specs for this chip to get my resistor values. If you use a different chip, it may require different resistors for the LED side.
The left side of the print is going to the computer. The right side to the H Drives inputs, and 12 Volts DC. The opto-isolators split the drawing down the middle.
Ok, if the computer gives a signal to rotate ClockWise (CW), pin 2 of the printer plug (P-Plug) goes high.
Current flows from P-Plug ground (pins 18-25), through u1 LED, through R1 to pin 2.
u1 output then closes, current flows from H Drive input A through CWLS, through u1, back to + 12 VDC. The motor turns Clockwise until CWLS is reached.
When CWLS switches, the NC contact opens, and NO contact closes. This stops the motor by breaking the current flow through H Drive A.
But now the current flows from - 12 V through R7, through u2 LED, through CWLS, through u1, back to +12V.
This turns on the output of u2, current flows from pin12 through R2 back to P-Plug pin2, which is still high.
Pin 12 of P-plug is the input that tells computer that clockwise rotation end has been reached.
This pin is held LOW by R3 connecting it to P-Plug ground.
But when u2 is turned on, Pin 12 goes high.
Since R2 is a lot smaller value than R3, current flows from pin12 when u2 is on.
The same thing happens when the computer issues a rotate counter-clockwise command.
Pin 3 goes high, which turns on u3, which turns on H Drive B, which rotates motor counter clockwise.
When CCWLS is activated, u4 is turned on, which brings P-Plug pin 13 high.
I dont have the monitor on/off interface drawn here. I may use a solid state relay for that, which will elimanate the need for another opto-isolator. (Like Koz319 suggests).
I have seen a problem with using the printer port in this application.
On my test rig, when I turn on my computer, before Windows starts to load, all outputs from P_plug go high for about 1 second.
Then again, when Windows is loading, they all go high for about 3 seconds.
Im thinking that this is going to rotate the monitor off which ever limit switch is made.
This could mean a crooked monitor angle when ever the machine is turned on.
It will straighten when you play a game that issues a rotate command, but still, it may be embarrassing when you first power up your arcade with a bunch of friends watching.
So, we need to either come up with a way to disable all outputs if all are turned on,
or use another output as a disable, if it's on, then no drive outputs, or have a power on time delay.
Say, kill motor rotation until 10 seconds after computer is turned on.
This problem may be with my computer only, I need to test it on a few others I have.
Edited: Found a flaw in my first drawing. This drawing SHOULD be ok..