Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Activate a relay using laptop's parallel port

Status
Not open for further replies.

getfree

Newbie level 3
Newbie level 3
Joined
Apr 13, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,304
Hi, guys. I'm new here. Forgiveme if this is too newbie.

I have a relay that I want to switch on using one of the output pins on the parallel port.

This is what I've got:
**broken link removed**

The relay is powered by a 5V DC adapter and the transistor should act as a switch.
But i dont know where to connect the parallel port's ground pin.

If I just connect the 5V pin to the transistor's base (like the diagram shows), it doesn't work.
 

hmmm connect the ground to the negative terminal of that 5V. i.e, connect the negative of the 5V and emitter of the transistor together to the ground. see the figure
 

Attachments

  • parallelport.png
    parallelport.png
    7.7 KB · Views: 148
the parallel port has several ground pins (from pin 18 to 25)

just connect the ground to any of them
 

hmmm connect the ground to the negative terminal of that 5V. i.e, connect the negative of the 5V and emitter of the transistor together to the ground. see the figure

I thought of doing that but I was afraid. Wouldn't that burn my port if for example I use a larger relay which needs to be powered by say a 12V supply?
 

anyways it gets the closed path through the ground. it just gives path to current and its a ground so should not be a problem,try doing this for the 5V relay, if it works then try for 12V
 

anyways it gets the closed path through the ground. it just gives path to current and its a ground so should not be a problem,try doing this for the 5V relay, if it works then try for 12V

It works with 5V. Thanks.
Now I dont know if I want to try with 12V.
 

Another suggestion is to put a resistor from your parallel port output pin to the base of the transistor since right now a very large base current will be flowing when the transistor goes into saturation. You should limit that using a resistor.
 

adding a series resistor is necessary to limit the max current drawn from the port and it will work 12v relay..
but if you are still not satisfied you can add a optocoupler between the port and transistor...
 

When you use 12 volts, use a MCT2E Optocoupler for safety. Parellel port Pin 2 > 470E resistor> Pin 1 of MCT2E, Pin 2 Gnd (18 to 25 all pins shorted). PIN5 > 2K2> +12Volts. Pin 4 > Transistor base. transistor base >10K to 12volts Negetive.
Cheers
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top