CAD CAM EDM DRO - Yahoo Group Archive

Parallel Port Relay

Posted by David Johnson
on 1999-07-04 09:39:04 UTC
You are correct in what I am trying to accomplish. I will give this a try
on Monday and see what happens. Will I still need the diode with a solid
state relay?

Dave Johnson
Denver, Colorado

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.

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.

Jon

Discussion Thread

David Johnson 1999-07-04 09:39:04 UTC Parallel Port Relay Jon Elson 1999-07-04 15:49:01 UTC Re: Parallel Port Relay David Johnson 1999-07-05 09:15:21 UTC Re: Parallel Port Relay