Software Support > Automated Projects
MRotate5 (Bug fixed. Download V 1.0.1)
<< < (6/14) > >>
danny_galaga:

--- Quote from: DaOld Man on March 22, 2011, 07:11:47 pm ---I threw together this circuit.
It is using the RS232 pin 7 (RTS) to turn on a small motor.
Opening the comm port causes RTS to go high, which turns on Q1 (a small power transistor) which turns on the motor.

Closing the comm port causes RTS to go low, which turns off the motor.

I have bread boarded this and it seems to be working fine. The only problem I can see right away is that if another program attempts to open the same comm port, may turn on the motor.

This could be your answer to using one relay to switch your motor the same way your DPDT switch is doing now.
Just substitute teh motor in the drawing with a relay coil.



--- End quote ---

Cool! Now, just to be sure, the rs232 port is the one that looks like the monitor port, and is commonly next to the monitor port? I might have to download the mrotate thingo and have a fiddle (",)
DaOld Man:
Yes, the RS232 comm port kinda looks like the monitor port, EXCEPT, the monitor port has 15 pins and is a female port, whereas the comm port has 9 pins and is a male port.

Mrotate will not work with the comm port, printer port only (until I finish the USB version).
But I think I can throw you together a comm port version, if you want.
DaOld Man:
Here is a simple circuit I have come up with using the RS232.
This circuit is "dumb", which means the computer simply sends out signals to relays, it gets no feedback from your rig.
 A quick description:
CRM is a relay that can handle the current of your motor. It must be a 3PDT (two DT contacts take the place of your toggle switch, the remaining DT contact serves as a normally open contact to latch the relay on).
CRS is a smaller relay (or it can be the same as CRM), it only needs one normally closed contact.
CRS is used to turn off CRM.
Q1 and Q2 are TIP120 NPN transistors. R1 and R2 are 1 K ohm resistors. D1 and D2 are 1 amp diodes.
Q1's base connects to pin 4 of the 9 pin Rs232 comm port. (through the r1)
Q2's base connects to pin 7 of the port (through r2)
Pin 5 of the port connects to both transistors emitters and to the power supply's ground.

Here's how it works:
A high on pin 4 turns on Q1, which turns on CRM. The normally open contact of CRM N.O. closes, which then bypasses Q1, holding CRM on (this is called latching or sealing).
When pin4 goes low, CRM remains on.

When pin 7 goes high, Q2 is turned on, which turns on CRS. When CRS turns on, it's contact, CRS N.C. opens, which un-latches CRM. CRM turns off.

If both pin 4 and pin 7 are high, CRM is off.

I can write you a quick program that can do this using the same command arguments that MRotate would used.

There is a major concern about rotating your monitor like this, and it may not concern you at all.
CRM always turns off when you turn off your arcade.

Say for instance when CRM is turned on your monitor turns to horizontal.
Now whenever you power up your arcade, CRM will be off, so your monitor will immediately turn to vertical.
Your front end wont know this and it may already be orientated for horizontal, so your screen will look funny.
There are ways around this, but if you keep going, you may as well break down and use a H drive on the printer port.
:)

EDIT: I changed the drawing to show two additional diodes, D3 and D4.
Pin 4 when high is +12 VDC to ground. When it goes low it is -12 VDC to ground.
Pin 7 is +7-10 VDC when high and -7-10 VDC when low.
D3 and D4 keep the negative currents from the transistors. The transistors that I used dont mind this, but some may.
Pay close attention to this if you are using an electronic drive.
An easy fix for this would be to change the transistors to opto isolators, or solid state relays.
danny_galaga:

I think I'll wait for your usb version  :)
DaOld Man:

--- Quote from: danny_galaga on March 27, 2011, 01:06:46 am ---
I think I'll wait for your usb version  :)

--- End quote ---

Awww, I already had a MRotateDG version just about finished!
:)
I think you will be happier with the ability to fully control the motor from the software.
But if anyone wants to use the comm port instead of USB or printer port, just know that it can be done.
And by using the PWM module that DNA Dan came up with, it can be done with relays and also still have speed control.
I cut my teeth on relays way back in the 70's, so I have a special place for them in my heart.
But solid state devices such as transistors are much cheaper, more versatile, and more efficient than relays.
They just aint as simple.
Navigation
Message Index
Next page
Previous page

Go to full version