Parallel port relay module

Thread Starter

JBull

Joined Mar 18, 2006
3
Hello, I'm new to this forum and a novice in electronics. My project is a relay module that switches four 6VDC circuits using the output of the parallel cable from my computer. It works OK but I am asking advice on protecting my circuit, especially the computer. I'm also concerned about how much current the parallel cable may be sinking.

The relays operate two smalll DC motors that are powered by D-cell batteries (6V). I'm using four power leads from the parallel cable (5V) and a common ground lead from the same cable.

On the PCB I have soldered four SPST reed relays and one diode. It is wired very simple: The battery (+) terminal is wired to the positive terminal of the relay. The ground terminal of the relay is wired to the motor. Another wire from the motor to the (-) battery terminal. The relay is basically a switch in this circuit.

A parallel cable +5V pin is wired to one side of the relay coil. The other side of the coil is wired back to the ground pin on the parallel cable. I have placed a diode in the current path of this circuit.

I tried a 47K ohm resistor in the coil circuit. The relay would not operate so I took it out.

Everything is working properly but I worry that too much current is being drawn through the coil and back to my PC card. The relays say "250 ohm" on them. They are rated for up to 0.5A

Is this a safe circuit for my PC?
 

thingmaker3

Joined May 16, 2005
5,083
Five volts divided by 250 ohm yeilds 20 milliamps of current through your relay. This is being sourced by your parallel port. (The half amp markede on the relay is for the contacts, not the coil.)

If your port is the old IBM spec, then pins 1, 14, 16, and 17 will only source about half a milliamp each. The other pins will source 15 mA each.

Something about all this is bugging me: You say
I'm using four power leads from the parallel cable (5V) and a common ground lead from the same cable.
There is no such animal as 5v from a parallel cable - not if its IBM spec. Are you sure you're not on the joystick port? If you are on the parallel port, are you sure your voltage isn't 2.4 VDC?
 

windoze killa

Joined Feb 23, 2006
605
Originally posted by thingmaker3@Mar 19 2006, 06:53 AM
Five volts divided by 250 ohm yeilds 20 milliamps of current through your relay. This is being sourced by your parallel port. (The half amp markede on the relay is for the contacts, not the coil.)

If your port is the old IBM spec, then pins 1, 14, 16, and 17 will only source about half a milliamp each. The other pins will source 15 mA each.

Something about all this is bugging me: You say
There is no such animal as 5v from a parallel cable - not if its IBM spec. Are you sure you're not on the joystick port? If you are on the parallel port, are you sure your voltage isn't 2.4 VDC?
[post=15155]Quoted post[/post]​
I was of the impression that a parallel port data O/P was TTL. This is 5V for a 1 and 0V for a 0. There are many circuits on the net to do very similar things to what JBull is trying to do. I have done similar to control various household items. I will try and find the address for a site that has heaps of this sort of thing.
 

Thread Starter

JBull

Joined Mar 18, 2006
3
Originally posted by windoze killa@Mar 18 2006, 05:56 PM
I was of the impression that a parallel port data O/P was TTL. This is 5V for a 1 and 0V for a 0. There are many circuits on the net to do very similar things to what JBull is trying to do. I have done similar to control various household items. I will try and find the address for a site that has heaps of this sort of thing.
[post=15162]Quoted post[/post]​
I have a program that allows to send a data bit to each data pin for testing and diagnostics.

The parallel cable data pins I'm using are 4,5,6,7. Send a "1" to a data pin and I get about 4.8V according to my voltmeter. Send a "0" and you get 0V. I've read that the "standard" for the data pins is minimum 2.4V and max 5V.

I also read that the parallel port can sink up to 24mA from data pin to ground and that this cuold potentially damage the port if there is no resistance in the circuit.

I was hoping the 250 ohms printed on the relay was for the coil.
 

windoze killa

Joined Feb 23, 2006
605
Originally posted by JBull@Mar 19 2006, 11:25 AM
I have a program that allows to send a data bit to each data pin for testing and diagnostics.

The parallel cable data pins I'm using are 4,5,6,7. Send a "1" to a data pin and I get about 4.8V according to my voltmeter. Send a "0" and you get 0V. I've read that the "standard" for the data pins is minimum 2.4V and max 5V.

I also read that the parallel port can sink up to 24mA from data pin to ground and that this cuold potentially damage the port if there is no resistance in the circuit.

I was hoping the 250 ohms printed on the relay was for the coil.
[post=15169]Quoted post[/post]​
You are correct. The 250ohms is the coil resistance. This should give you a current of 20mA.

Also the "standard" that states minimum is 2.4V and max is 5V is the standard for TTL logic. They are the extremes of a logic "1".
 

Thread Starter

JBull

Joined Mar 18, 2006
3
Originally posted by windoze killa@Mar 19 2006, 02:49 AM
You are correct. The 250ohms is the coil resistance. This should give you a current of 20mA.

Also the "standard" that states minimum is 2.4V and max is 5V is the standard for TTL logic. They are the extremes of a logic "1".
[post=15175]Quoted post[/post]​
Will 20mA be a significant draw on the battaries in my laptop?

The circuit is used for controlling my telescope motors. So I'll be using this in the field where the only power source is the battary in my laptop. I can put a resistor in the circuit if will help extend the battary life.

I'm thinking 20mA is small compared to the LCD display, hard drive etc.
 

windoze killa

Joined Feb 23, 2006
605
Originally posted by JBull@Mar 24 2006, 04:08 PM
Will 20mA be a significant draw on the battaries in my laptop?

The circuit is used for controlling my telescope motors. So I'll be using this in the field where the only power source is the battary in my laptop. I can put a resistor in the circuit if will help extend the battary life.

I'm thinking 20mA is small compared to the LCD display, hard drive etc.
[post=15375]Quoted post[/post]​
You will not notice any difference in you battery life with 20mA extra current draw.
 

mikelynch

Joined Jun 30, 2007
23
I have been trying something similar without luck. I am a total novice.
I cannot get one relay to work from the 3 volt port.
I have hooked up a 9 volt battery and am trying to use a transistor as a switch.

The port turns the transistor on and I read 7 volts across the path which should turn on the relay. But when a relay is connected or even a LED the voltage across drops to 2.5 volts.

So if I just want to switch a led on, I have the transistor working fine. But I could do that without the transistor.

Sorry if this is so basic
 
Top