Parallel Port Relay Control Circuit

This is a group to discuss all details on home automation, home security technology and related technologies.

Parallel Port Relay Control Circuit

Postby matt on Sat Oct 07, 2006 2:32 pm

I am looking to control a relay from the parallel port. I have tested the circuit about half way down the following page, titled “safer new design”.

http://www.epanorama.net/circuits/parallel_output.html


The only concern I have is that the parallel ground may be sinking too much current.

As an extra precaution could I just put a resister before the parallel port ground connection to limit the current???

Thanks Matt
matt
 
Posts: 5
Joined: Fri Oct 06, 2006 8:09 pm

Parallel Port Relay Control Circuit

Postby Tomi Engdahl on Sun Oct 08, 2006 11:26 am

You must be referiing to this circuit:

Code: Select all
                             Vcc
                              |
                              +------+
                              |    __|__
                            Relay   /^\  Diode 1N4002
                             Coil  /---\
                              |      |
                              +------+
                              |
          Diode            | /
          1N4148  4.7K   B |/  C
parallel  >-|>|-+--\/\/\/--|        NPN Transistor: BC547A or 2N2222A
port data       |          |\  E
pin             +-|<|-+      | V
            1N4148    |      |
parallel  >-----------+------+
port ground                  |
                          Ground



[/quote]
Tomi Engdahl
Site Admin
 
Posts: 1839
Joined: Mon Oct 20, 2003 6:15 pm
Location: Espoo, Finland

Postby matt on Sun Oct 08, 2006 11:32 am

Yes that's the circuit I was looking at.

My relay will be drawing 50 mAh at 5volts if that's any help?

Thanks Matt
matt
 
Posts: 5
Joined: Fri Oct 06, 2006 8:09 pm

Parallel port ground

Postby Tomi Engdahl on Sun Oct 08, 2006 3:45 pm

Parallel port ground pin is not so limited in allowed current as the data pins are on the parallel port.

The practical parallel ports in PCs the ground pins are directly wired to the parallel port card ground plane which is pretty much in direct connection to PC system ground. The parallel port ground pins in the cards I have seen can handle quite considerable current, I quess several ampreres easily.

So I would no worry on the current limiting on the parallel port ground connection.
Last edited by Tomi Engdahl on Tue Oct 10, 2006 8:21 am, edited 1 time in total.
Tomi Engdahl
Site Admin
 
Posts: 1839
Joined: Mon Oct 20, 2003 6:15 pm
Location: Espoo, Finland

Postby matt on Mon Oct 09, 2006 3:50 pm

Thanks for the reply Tomi. :D

No need to worry about a few mA then!

Matt
Last edited by matt on Fri Oct 13, 2006 2:23 pm, edited 1 time in total.
matt
 
Posts: 5
Joined: Fri Oct 06, 2006 8:09 pm

Inputs

Postby matt on Fri Oct 13, 2006 2:22 pm

I have tried the below circuit but I cannot get it to work with the 330 resister?

Image

With the 330 resister the current measured between the parallel input pin and the 330 resister is around 3.5mA, which doesn't register as an input on the PC.
The PC will not recognise an input until the current is allowed to reach at least 4.6mA.

I have read that the parallel ports data pins can only source 2.6mA so how can I safely use the inputs???

Thanks

Matt
Last edited by matt on Mon Oct 16, 2006 7:13 pm, edited 1 time in total.
matt
 
Posts: 5
Joined: Fri Oct 06, 2006 8:09 pm

Postby matt on Mon Oct 16, 2006 7:11 pm

Sorry for posting again! I have been doing some more testing

It seems that without a current limiting resister directly connected to the input pin the current flowing to the input pin is always 4.6mA

When connecting an input directly to the ground the current is 4.6mA.

When using variants of the following circuit the current is 4.6mA.

'''''''''''''''''''''''''4.7K/10k
Input -------+-^^^^^--- (+5 v)
'''''''''''''''''''''''''|
'''''''''''''''''''switch
''''''''''''''''''''''''''|
Ground ------+---------- (gnd)

Is it possible that my parallel port just needs this current to function properly and is therefore perfectly safe to do so?

Comments welcome!

Thanks

Matt
matt
 
Posts: 5
Joined: Fri Oct 06, 2006 8:09 pm

Parallel port inputs

Postby Tomi Engdahl on Tue Oct 17, 2006 7:28 am

Is it possible that my parallel port just needs this current to function properly and is therefore perfectly safe to do so?


Yes it is possible.
Tomi Engdahl
Site Admin
 
Posts: 1839
Joined: Mon Oct 20, 2003 6:15 pm
Location: Espoo, Finland

Postby r0t1prata on Mon Oct 30, 2006 2:51 am

i would like to know how to connect the relay coil, 'cos mine has 5 pins and i don't know which pins to connect to Vcc and to collector.
r0t1prata
 
Posts: 6
Joined: Mon Oct 30, 2006 1:30 am

Relay connections

Postby Tomi Engdahl on Mon Oct 30, 2006 8:47 am

You must be talking that you have a relay that has five pins and you don't know which one is which.

The first idea is to check if the relay has markings on it telling which pin is which. Some relays have the pinout printed on their case.
Then other option is to try to find technical data for the relay and look at the pinout information in it (relay data sheet, information on component catalogue etc..)

If the relay is in transparent case then it could be propably possible to see which pins go to wires that go to the relay coil.

Then there is always multimeter method:
Measure the resistance in the relay between different pins.
The relay coil has typically resistance from tens of ohms to few hundred ohms on low voltage relays (coil voltage 5V, 12V etc..). If you get this reading between two pins, they are the one that connect to the coil.
All the other measurements between diffent pins shoudl show either open circuit (most measurements) or short circuit (when you find a closed relay contact).

One note: Some relays can have built in protection diode in parallel with the relay coil. In this case you can get different reading when measuring the relay coil resistance on different directions. Typically the direction tht gives higher resistance value will be the right direction for the current to flow on the coil.
Tomi Engdahl
Site Admin
 
Posts: 1839
Joined: Mon Oct 20, 2003 6:15 pm
Location: Espoo, Finland

Re: Parallel Port Relay Control Circuit

Postby [email protected] on Fri Dec 19, 2008 9:27 am

Hi All,

I have something a little different, I found a high power relay that requires 24V on the coil (the resistance is 1.5K) which is about 16 mA? ... I want all of the power to switch the relay to come from the computer, so I am thinking I should use the +12V and -12V rails to get 24 volts.

I am not really sure how to wire this up.

Code: Select all
                             +12 V
                              |
                              +------+
                              |    __|__
                            Relay   /^\  Diode 1N4002
                             Coil  /---\
                              |      |
                              +------+
                              |
          Diode            | /
          1N4148  4.7K   B |/  C
parallel  >-|>|-+--\/\/\/--|        NPN Transistor: BC547A or 2N2222A
port data       |          |\  E
pin             +-|<|-+      | V
            1N4148    |      |
parallel  >-----------+ ???  +
port ground                  |
                            -12 V
[email protected]
 

Re: Parallel Port Relay Control Circuit

Postby Tomi Engdahl on Sun Dec 21, 2008 8:45 am

This wiring you showed on your message will not work.
If you wure the relay like that, the transistor will keep conducting all the time, because the voltage in the transistor base compared to emitter will be always so high that the transistor will be on (it will be almost 12V when parallel port output is at 0 and several v olts higher when it is 1).

You need something more complicated to drive your relay with +12V and -12V.

This is one idea to use (just change external circuit ground to -12V):
Code: Select all
                                                V+  (12V)
                                                 |
                                    +------------+
                                    |            +------+
Parallel                            |            |      |
Port                                |    D1     ---     |
                                    |   1N4001  / \    Relay coil
          R1    1  ----------- 5    |          /---\    |
D(x) ----1k------| Opto-     |-----+            |      |
                 | Isolator  |                  +------+
GND -------------|           |-+                |
                2  ----------- 4|                |
                   CNY 17 or    |   R2        | /
                   4N25         |   4.7K    B |/  C   T1
                                +--\/\/\/\/---|      BC547A or 2N2222A
                                              |\  E
                                              | V
                                                |
                                          external circuit ground
Tomi Engdahl
Site Admin
 
Posts: 1839
Joined: Mon Oct 20, 2003 6:15 pm
Location: Espoo, Finland

Re: Parallel Port Relay Control Circuit

Postby noel on Sat Jul 11, 2009 5:33 am

guys can you send me the schematic of this diagram thanks i really need it in my thesis
noel
 

Re: Parallel Port Relay Control Circuit

Postby Tomi Engdahl on Fri Jul 17, 2009 7:07 am

This ASCII presentation is the only schematic format I have drawn this design at.
The circuit design is not available in other formats.
If you need that drawing on other formats for your work, it should not be too much of the problem to redraw it yourself to the format you want to have at. It should not take too long.

If you plan to do the redrawing of the circuit so that you get a nicer looking schematic or one that you can use with some PCB design tools, it would be nice if you could send your version here to be put on-line.
Tomi Engdahl
Site Admin
 
Posts: 1839
Joined: Mon Oct 20, 2003 6:15 pm
Location: Espoo, Finland

Re: Parallel Port Relay Control Circuit

Postby interhen on Wed Dec 02, 2009 7:31 am

does the opto-isolator need external supply to power?
interhen
 

Next

Return to Home Automation

Who is online

Users browsing this forum: No registered users and 3 guests

cron