[SOLVED] Parallel Port controlled circuit

Status
Not open for further replies.
I think for a reason, unknown so far, your parallel output pin (before the diode 1N4148, that is at its anode) cannot be made low as you pointed out earlier:

the voltage at parallel out before connecting the supply is above 3 volts dc...

You did measure Vbe which is likely about 0.6 to 0.7V only when the port is high. In other words, any time you have Vbe not close to zero, it means the port voltage is higher than 1V2. You can easily check this point.

So to test your external circuit and force your relay to turn off, just short the output port to ground (don't worry, the port is weak and the short current will be relatively too small, a few mA only.

Kerim
 
Last edited:

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?
 

I think you should consider using a 74HC241/244 etc buffer between the parallel port and your circuit to have clear logic states in the output and in addition protect your parallel if something happens, direct connection in not a very good idea.

Alex
 
Sorry, on my side I give up

At each instant, you have just two nodes to measure assuming the port and your circuit have a common ground (the reference node).

The node at the transistor collector.
The node at the anode of the input diode (that is the port).

Also all signals are assumed being DC. Could the port pin, you are using, is delivering pulses?!

In fact, the collector voltage has to be the same as of the relay supply if the base current is zero (Ib=Ic=0). It is the case when V_base=0 that is V_port < ( V_diode + Vbe ) or less than 1V2.

Also the collector voltage should be made to saturate (Vc less than 1V) by a suitable base current. In your case I_base=0.34 mA seems enough. You can measure I_base by measuring the voltage (V_resistor, assumed DC) on the 4K7 resistor so I_base = V_resistor / 4.7 (V_resistor should be 0V when port is off)

So using 15V supply instead of 12V is not the cause of the malfunction.

I suggest you try being familiar first with your external very simple circuit far from the PC port. I mean to control it manually by driving the diode with a voltage divider (using two resistors, the lower could be 1K, the higher could be 3K9, for 15V supply this gives you about 3V at the diode). So when applying the divider voltage, the relay should be turned on then when the 1K is shorted (equivalent to port is off) the relay will turn off.

Kerim
 
Last edited:

yes the circuit and port have common ground..
the port isnt delivering pulses but surely the adapter voltage fluctuates a little...
and i will try the voltage divider also..
and thank you for the explanation,
 

It is okay if the adapter fluctuates. In this case it may be better to add a 22uF in parallel with the 1K resistor of the voltage divider.
 

If you are sure that you have no mistake with the pins and connection of your transistor and relay, try to add another diode of the same type in series with the existing diode.
 

Hi
I will post here what I posted to you on the other forum, it may also be of help to others here trying to understand the situation

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.....
]


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
    3.7 KB · Views: 98

ohh.....a deep research sir...thank you for this....
also kerim, above told me to stop using the printer port for the fear of blowing it, and advised a voltage divider to trigger the circuit instead...
so i did the same and built one...
adapter set to 15 volts...
divider providing 5.50 volts
observations were the same, the relay would switch on but wouldnt switch off after the trigger removed...
then i tried the same thing using a high power high brightness LED which runs on 9 volts... it switches on and off properly...
then i connected the ckt with LED to printer port and gave the software a try... the LED switched ON and OFF completely under control...
i would give your circuit a try....
 

The printer port is quite ok to use
people have been doing printer port interfacing to the outside world since the they were available.
As long as you dont put hi voltage into it you will be quite ok

cheers
Dave
 

Working circuit made

I finally made a working circuit....
A big thanks to Mr.davenn for posting the circuit...
Also thanks to kerimf and fvm for actively helping me out...
thank you all for banging you heads for me..
Even if the original circuit didn't work but i learnt a lot from you all... I never knew so many things about working of transistor...so many calculations..
I made a small change in his circuit..
I used a one bc547 transistor and a bc557 transistor...
I simulated the circuit in TINA circuit simulator and it worked..
then I finally made the physical circuit and now the relay switches on as well as switches off as per the commands given through the software.


 
Last edited:

Re: Working circuit made

Hi,

To be honest, I won't build, in order to control a relay by a data pin of the parallel port, the circuit 'exactly' as you have just posted.
But if it is okay for you then there is nothing to add I guess :smile:

Kerim

PS: at least, exchanging the connections of the BC557 emitter and collector will give a better result (collector to ground).
 
Re: Working circuit made


yes besh mohandes, there a lot number of ways of professionally doing it... using buffers, transistors arrays and what not..but this ok for me as i have some old electronics lying around for reuse..
If i ever need this type of interface in some serious application.. i will use something else..but this taught me good things..

and yes, you are right about that bc557 conn. exchange, i am not sure but does it provide lesser resistance?
thank you
 

Re: Working circuit made

you are right about that bc557 conn. exchange, i am not sure but does it provide lesser resistance?

Hi,

If collector is at ground, the transistor current gain should be higher hence the Vec saturation voltage will be smaller.
You can verify what I said by simply measuring Vec of BC557 in both configurations in the real circuit

Kerim

PS:
This is equivalent in letting the collector more positive than the emitter for npn transistors as BC547 for example.
For pnp, the emitter should be more positive than the collector for the current gain to be relatively high.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…