The following information will help you to understand the pinouts on the parallel port of a PC.
Download this
.dxf file or view it as an Acrobat file View .pdf version for connecting Camtronics controller to parallel
port using DeskNC as the interpreter. (*Note, X axis home switch
is connected to an inverted line and needs to be changed to a
NC switch)
--Hookup file borrowed from DanCad3D by Daniel Hudgins
To connect to a DB25 instead of the Centronics shown in the .dxf
file study the picture and chart below
The original IBM-PC's Parallel Printer Port had a total of
12 digital outputs and 5 digital inputs accessed via 3 consecutive
8-bit ports in the processor's I/O space.
8 output pins accessed via the DATA Port
5 input pins (one inverted, indicated by line over number) accessed
via the STATUS Port
4 output pins (three inverted, indicated by line over number)
accessed via the CONTROL Port
The remaining 8 pins are grounded

25-way Female D-Type Connector
| DB25 pin# | Centronics pin# |
|
|
| 1 | 1 | Aux C device | Motor 4 direction |
| 2 | 2 | X clock | X direction |
| 3 | 3 | Y clock | X step |
| 4 | 4 | Z clock | Y direction |
| 5 | 5 | Aux A device | Y step |
| 6 | 6 | X direction | Z direction |
| 7 | 7 | Y direction | Z step |
| 8 | 8 | Z direction | Motor 3 direction |
| 9 | 9 | Aux B device | Motor 3 step |
| 10 | 10 | X / Y / Z limit | |
| 11 | 11 | X home | |
| 12 | 12 | Y home | X / Y / Z home |
| 13 | 13 | Z home | X / Y / Z limit - |
| 14 | 14 | Motor 4 step | |
| 15 | 32 | Aux in | X / Y / Z limit + |
| 16 | 31 | Aux D device | Motor 5 direction |
| 17 | 36 | Motor 5 step | |
| 18-25 | 19-30 | Common +33(centronics) | Ground |
DanCam/Plot column from .dxf copyright (c)
1998 by Daniel Hudgins
3 axis EMC signals column from http://www.isd.cme.nist.gov/projects/emc/emcsoft.html
EMC axis 3, 4, 5 signals from Till by way of Doug Fortune

Dave, if I understand correctly, you are applying a permanent
ground to the relay and the positive is being produced by a parallel
port pin. This did not work so you provided the positive from
the logic 5v and it was OK.
The problem is that the parallel ports "high"output
is from what is known as an open collector with high pull up.
What this means is that the output chip on the parallel port does
not connect its output between the 5v rail and the 0v rail to
represent a high and low - instead it will connect the output
to the 0v rail for a "low" but for a "high"
it will switch its output off or open circuit.
This does not give you a 5v output for "high". There
is a resistor of between 4.7k ohm to 10kohm between the output
and the 5v rail so that when the output turns off the resistor
allows external circuitry to "see" the 5V rail but draw
very little current from it. Therefore you may get as little as
1/2 ma thru the resistor.
The proper way to use the weak current 5v signal to drive a higher
current device that does not need much current to switch it -
e.g a transistor.
You may be able to do things backwards if you can configure your
software to send a low instead of a high to signal an O2 start,
you can take a permanent 5v logic supply to the relay and switch
the Ov - the parallel port can "sink" more current than
it can supply.
Courtesy of Mo
OK, I assume the 'output on' signal is a logic 1 (5 V)? What
you need is an NPN transistor. A 2N2222 would be fine, but any
NPN transistor with a current rating of, say, 50 mA, and a voltage
rating of 50 V will do.
Now, connect a 10K Ohm resistor
from the port bit to the Base of the transistor. Connect the Emitter
of the transistor to ground. Connect the Collector of the transistor
to the relay. Connect the other side of the relay to +5 Volts.
Finally, you need to protect the transistor from the inductance
of the relay coil. Connect a diode, such as 1N4148 or 1N4002 across
the relay coil. Connect the cathode (banded end) to the +5 volt
end. Connect the anode (other end) to the transistor-collector
end of the relay coil. This diode will only conduct when the transistor
turns off, shunting the inductive current around the coil until
the current dies out. The diode is to protect the transistor from
the inductive voltage spike caused by turning off an electro-mechanical
relay. No need for it if you use a solid state relay.
You may also need to connect a 1 K ohm resistor from the parallel
port bit to +5 Volts, if the port's pull-up is weak.
Courtesy of Jon Elson