Main > Project Announcements
Rotating monitor construction *Project finished*
DaOld Man:
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..
DaOld Man:
I threw together a quick diagram of how the printer cord, interface board, the H drive, the power supply, and the limit switches will connect to each other.
This drawing is extremely crappy, but it was drawn in a hurry.
maybe later, after I get everything built, I can post some real pictures.
In this drawing I am using Happ pushbuttons as the CWL and CCWL switches.
This is what Koz319 is using, and I think it should be readily available to everyone, so why not use them?
Please dont laugh at the way I drew them, well, OK, go ahead and laugh....
:laugh2:
csa3d:
--- Quote from: DaOld Man on November 14, 2007, 11:47:53 am ---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.
--- End quote ---
For us dummies.. I assume there is a math formula in the event we can't find these same chips? Can you share if so? :)
Thanks again for your updates, and your drawings are great so far! I'm just amazed you are using Paint for anything.
-csa
DaOld Man:
Thanks CSA3D..
Yes, I really do need to loose the paint program..
I had a very long post typed out about how I figured for the resistors in my circuit, but I guess I timed out and it wouldnt let me post.
Note to self: Always copy the text before posting, so you can paste in new post, if necessary.
Anyway, I dont really want to retype it all, so i am going to make it short.
To get the resistance needed for the optos led, it is basically the same as with any led.
First you need to know the supply voltage, in my case it is two voltages, computer volts of 5 and H Drive power supply of 12.
Now you need to know the voltage drop across the led and the minimum current needed to light the led, and the maximum current that the led will handle before it destructs.
You can get this information from datasheets. Just search the net for a datasheet for the device you are using.
After you have this info, just use Ohms law.
E/I = R
or Volts (E) divided by current (I) equals resistance (R)
Current is amps. (1 milliamp = .001 amp)
Resistance is in ohms.
So, on my computer side, I subtract the volt drop on the led (from datasheet) from the 5 volts, or 5-1.5=3.5 (datasheet says volt drop on my optos is 1.5)
I then figure the current I want. (also min from datasheet).
Since the computer port can probably only supply up to 20 or 25 milliamp, I figure for 10 milliamp (ma), to be on the safe side.
So E/I=R or 3.5/.010 = 350 ohms. I had some 330 ohms, which figures to be .0107 amp, so they should work fine. (.0107 amp = 10.7 ma)
For 12 volts, I used 12-1.5=10.5
So I figured the resistance for that side the same as above, but using 10.5 for E instead of 3.5.
I usually dont have the exact resistor on hand, but you can usually go up or down a little.
I plan to test these optos on my breadboard when they come in. I may have to adjust the values of the resistors.
To figure for the transistor side of the opto, you need to know the transistors IF (Forwarding current) and IMax (maximum current).
These should be on the datasheet.
Using the above formula, you figure what you need to get the IF and not overload the transistor or the power supply.
If you would like me to figure all this for you, just give me the number of the device you are thinking of using, I will be glad to figure what you need.
But it aint rocket science. Im sure you can do it.
bfauska:
I remember reading in the past about the pins of a parallel port doing various things on boot. I don't remember what the application was, I think it was a masking system for a home theater screen or something. Anyway, my point is that I think it applies to enough computers that people should plan on working around it somehow. I think the delay on boot for that circuit would be the best bet, you could run the delay fairly long if you wanted to be safe, the monitor shouldn't have to rotate until you are in the menu and choose a game right? I haven't looked too close at your schematic, but I imagine you could drop a time delay relay into the power supply for your motor control circuit. Trigger the relay from the 5v or 12v in your computer and your good to go.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version