Maker Pro
Maker Pro

Parallel Port control

hussainb

Nov 2, 2011
7
Joined
Nov 2, 2011
Messages
7
Parallel Port controlled circuit

Hello respected members,
I wanted to control some electrical appliances using my pc parallel port...
so i looked up the net and got this simple circuit for my design...which i have uploaded
and i am using lalim parallel port control software to control the port.
I got the components and built it on a vero board...
I am using a 12v relay in this circuit..

I thought of using the pc +12v supply for the relay but it didnt work so i used an external wall mount adapter which provides 15.60 volts DC on no load condition and drops to 14.35 when directly connected to relay and when the relay gets activated... the thing happening is that as soon i powerup the ckt using the adapter the relay switches on.... there is no effect of the change being made from the parallel port...

I checked that the software works properly and the o/p of port changes from .17 volts to 4.something when the data pin is selected.

Verified the circuit many times for errors... i havent connected the relay directly to supply, and there is no other error in building the circuit
my only problem is that the relay switches on as soon as the external power supply is given..
pls help me understand the issue... thank you..
 

Attachments

  • imageview.gif
    imageview.gif
    4.2 KB · Views: 3,946
Last edited:

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
hi there
welcome to the forums :)

Your circuit is a bit difficult to read, but with what I can make out there doesnt seem to be too much of a problem.

what is the voltage being supplied to the relay ?
what currect is the relay drawing ?
these may be too much for the BC547, particularly the current, its max collector rating is 100mA. You may have zapped it into permanent conduction.

There's no reason why the +12V from the puter wouldnt work to supply the relay.

try lifting the 4k7 resistor from the base of the transistor if the relay still operates on powerup then the transistor is faulty

cheers
Dave
 
Last edited:

hussainb

Nov 2, 2011
7
Joined
Nov 2, 2011
Messages
7
hi there
welcome to the forums :)

Your circuit is a bit difficult to read, but with what I can make out there doesnt seem to be too much of a problem.

what is the voltage being supplied to the relay ?
what currect is the relay drawing ?
these may be too much for the BC547, particularly the current, its max collector rating is 100mA. You may have zapped it into permanent conduction.

There's no reason why the +12V from the puter wouldnt work to supply the relay.

try lifting the 4k7 resistor from the base of the transistor if the relay still operates on powerup then the transistor is faulty

cheers
Dave
I am sorry i should have given the link to the guide from which i have built the circuit..
http://www.hardwaresecrets.com/printpage/233
I can remove the resistor but i worry that will it cause an excessive load on the port and damage it?
and i have tested the transistor before using it in ckt and after operating the ckt...its not faulty its ok..
also i dont know how much current the relay is drawing... i dont know how to check it as i am a newbie...well, i can hookup a multimeter to it or i can tell you the relay is "sun hold ras-1210" and its data sheet is at
http://us.100y.com.tw/pdf_file/RAS-1215.PDF
thank you for your time..
 
Last edited:

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
I am sorry i should have given the link to the guide from which i have built the circuit..
http://www.hardwaresecrets.com/printpage/233
I can remove the resistor but i worry that will it cause an excessive load on the port and damage it?
and i have tested the transistor before using it in ckt and after operating the ckt...its not faulty its ok..
also i dont know how much current the relay is drawing... i dont know how to check it as i am a newbie...well, i can hookup a multimeter to it or i can tell you the relay is "sun hold ras-1210" and its data sheet is at
http://us.100y.com.tw/pdf_file/RAS-1215.PDF
thank you for your time..

when I said lift the resistor, I was inferring that you are disconnecting the output from the puter. If the relay still operates then the transistor MUST be faulty or inserted the wrong way around, its the ONLY choices.
As in that condition the relay will operate ONLY if the transistor is conducting...either intentionally conducting cuz of a short cct between the collector and emitter
...that infers that your testing of the transistor isnt correct.

I saw your post in that other forum and most there are telling you a similar thing, either the transistor is faulty or its not in circuit around the correct way
You seem to also be giving an incorrect reading for the relay resistance The resistance will be written on the relay say 280 Ohm 400 Ohm etc that is what you will measure on you multimeter in Ohms (resistance) mode. of course if you were getting 0 Ohms then you may have been measuring across the relay normally closed contact instead of the coil.
confirm your relay connections

Dave
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
Ok looking at the relay info you linked to

its a 12V 400 Ohm coil and 30mA current the switched contacts can handle a maximum of 10 Amps at 240V

Please tell me you are testing this without mains power connected ?? !! you could easily zap yourself.

look at the bottom images of the relay info link you can see on one end of the relay there are 2 contacts they should be the coil. The 3 contacts on the other end should be the NO COM and NC contacts
(NO = Normally Open, COM = Common, NC = Normally Closed)

cheers
Dave
 

hussainb

Nov 2, 2011
7
Joined
Nov 2, 2011
Messages
7
Ok looking at the relay info you linked to

its a 12V 400 Ohm coil and 30mA current the switched contacts can handle a maximum of 10 Amps at 240V

Please tell me you are testing this without mains power connected ?? !! you could easily zap yourself.

look at the bottom images of the relay info link you can see on one end of the relay there are 2 contacts they should be the coil. The 3 contacts on the other end should be the NO COM and NC contacts
(NO = Normally Open, COM = Common, NC = Normally Closed)

cheers
Dave

He he.. thank you for the concern but no, i thought its better to do the testing without mains until the thing works... yes... i checked the relay contacts and identified them correctly by using a multimeter then i supplied 12 volts using the adapter and confirmed again by the clicking sound and by performing the continuity tests on the NO and NC contacts..
I will be redoing the ckt again with new components..
 

Attachments

  • relay contacts.GIF
    relay contacts.GIF
    2 KB · Views: 4,856

hussainb

Nov 2, 2011
7
Joined
Nov 2, 2011
Messages
7
I finally am able to SWITCH ON THE RELAY ON DEMAND BY THE SOFTWARE...

First of all, the relay is rated at 12v dc for the coil to energize but it gets activated on 8v dc...so this was the reason why the relay used to get activated as soon the circuit was connected to 15 v dc supply...the transistor even in off state used to output some volts to the relay...say for example for 15v input during off state it would still be giving more than 8 volts to the relay contacts....
for the above problem I set the wall adapter to 10 volts by trial and error and the automatic switching problem was solved.
Next problem was that after switching the port to ON state...the relay wouldnt turn on...I figured out that the 3.18 volts from the ON state wasnt providing enough volts to the relay (8v to relay) so i increased the port volts by connecting a battery pack between the input and port increasing its voltage to 5+ volts.
So now the relay switches on when the activate button is pressed in the software...because the relay is getting 8++ volts.

Now a new problem arised.... after pressing deactivate on the software.. the relay wouldnt switch off...
the transistor doesnt reduce the collector to emitter voltage....it just stays there at 8+ volts...even when physically disconnecting the wire from the port...the only way the relay would turn off is when the external power is removed.

so is there any way to tell the transistor to reduce its collector emitter voltage to less than 8 volts after removing the base voltage?
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
hi there

I finally am able to SWITCH ON THE RELAY ON DEMAND BY THE SOFTWARE...

First of all, the relay is rated at 12v dc for the coil to energize but it gets activated on 8v dc...so this was the reason why the relay used to get activated as soon the circuit was connected to 15 v dc supply...the transistor even in off state used to output some volts to the relay...say for example for 15v input during off state it would still be giving more than 8 volts to the relay contacts....


it still sounds as tho the transistor is a bit suspect. Also you need to understand how the transistor works.
The transistor is just acting as an on/off switch. it doesnt output voltage to anywhere
If the transistor is not faulty, when it is turned off ( no current flowing between the base and emitter) there will be NO current flow between the collector and emitter and the relay will not operate.

The transistor gets turned on my a small voltage to and a small current flow through the base leg. When there is a approx ( depending on the transistor) 0.7V across the base and emitter, the transistor will be turned on.
That is... with a small current flowing from the base to the emitter, that will open the path between the collector and the emitter.


for the above problem I set the wall adapter to 10 volts by trial and error and the automatic switching problem was solved.
Next problem was that after switching the port to ON state...the relay wouldnt turn on...I figured out that the 3.18 volts from the ON state wasnt providing enough volts to the relay (8v to relay) so i increased the port volts by connecting a battery pack between the input and port increasing its voltage to 5+ volts.
So now the relay switches on when the activate button is pressed in the software...because the relay is getting 8++ volts.
Now a new problem arised.... after pressing deactivate on the software.. the relay wouldnt switch off...
the transistor doesnt reduce the collector to emitter voltage....it just stays there at 8+ volts...even when physically disconnecting the wire from the port...the only way the relay would turn off is when the external power is removed.
so is there any way to tell the transistor to reduce its collector emitter voltage to less than 8 volts after removing the base voltage?

Putting the extra voltage supply onto the base of the transistor will only turn it on permanently and could damage the i/o port of the computer... remove it :)
This not the way to achieve success and you discovered.
There is plenty of voltage and current out of the printer port to successfully turn the transistor on.

If the transistor is keeping the relay on after the the base is disconnected from the puter port, then there must either still be a voltage connected to the base, the transistor is faulty, or it isnt in the circuit with the correct orientation.

It would be nice to be able to be there in person... we would probably have the circuit working in minutes :)

Dave
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
He he.. thank you for the concern but no, i thought its better to do the testing without mains until the thing works... yes... i checked the relay contacts and identified them correctly by using a multimeter then i supplied 12 volts using the adapter and confirmed again by the clicking sound and by performing the continuity tests on the NO and NC contacts..
I will be redoing the ckt again with new components..

Thats cool .. I would have hoped thats what your were doing, but I just wanted to check ;)

ok on the relay contacts... I couldnt believe that they didnt give the pin connections for the relay in that data pdf file crazy huh!!

D
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
Hi again :)

OK been doing a bit of circuit drawing....

A thought has struck me after conversations in another thread on this forum that has similar ideas.
its possible that the printer port output on your puter is an open collector type. This makes a big difference in how the circuit is going to operate.
If it is an open collector output then this is how your circuit should be wired.....

attachment.php


if its not, then the resistor that you see going from the base to the +12V line should be removed and placed in series between the output pin of the port ( the collector) and the base of your switching transistor (the BC457).

A little on the operation of the circuit.....
When the printer port transistor is turned off, current flows down through the 4k7 resistor and through the base and emitter of the BC547 to the 0V (GND) rail. The BC547 will be turned on and the relay will activate.

When the printer port transistor is turned on, that current will instead flow the easier path down through the collector of the printer port transistor to the 0V rail. Without the base current, the BC547 will turn off and the relay will deactivate.

You can imagine that transistor to the left of the dotted line is one of a number of transistors in several IC's controlling the printer port operations. I have just drawn 1 transistor for clarity.

Again ... there should be no reason why you cant use the 12V from the puter to supply the relay.

Ohh and almost forgot NOTICE there is NO diode in series with the puter output !! :)

cheers
Dave
 

Attachments

  • Open Collector Output.GIF
    Open Collector Output.GIF
    3.7 KB · Views: 6,341
Last edited:

hussainb

Nov 2, 2011
7
Joined
Nov 2, 2011
Messages
7
Working circuit made

mr.davenn,
I made a working circuit by looking at and modifiying your circuit...
 

Attachments

  • parallel port circuit.JPG
    parallel port circuit.JPG
    119.2 KB · Views: 650

davelectronic

Dec 13, 2010
1,087
Joined
Dec 13, 2010
Messages
1,087
Hi there. i found something interesting on line last night, i found a site with good trusted circuits, and there is a project for parallel port interface control, i cant post it this morning as i am on my phone, and that wont post the info, but on the pc later i will post the link, it looks very interesting.
Dave.
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
mr.davenn,
I made a working circuit by looking at and modifiying your circuit...

yup I saw that in the other forum well done :)

Appreciate your response

cheers
Dave
 

hussainb

Nov 2, 2011
7
Joined
Nov 2, 2011
Messages
7
Hi there. i found something interesting on line last night, i found a site with good trusted circuits, and there is a project for parallel port interface control, i cant post it this morning as i am on my phone, and that wont post the info, but on the pc later i will post the link, it looks very interesting.
Dave.

yes.. trusted is needed...
I feel a setback when a circuit doesn't work, it makes me think that i am wrong somewhere..
 
Top