Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to connect to parallel port?

Status
Not open for further replies.

chinsoon

New Member
Hi there,

I have a transmitter circuit, which i want to connect to the parallel port of a computer. The reason is to trigger the transmitter when the parallel port pin is set to high.

I am using the configuration that is shown in the attachment, but when i measure the voltage across the collector to the emitter, it seems like the drop is equals to 9V, which is the Vcc.

So any suggestion what to do? and is my approach correct? the original transmitter circuit is with a push switch, and now i am using the relay to short the loop when the parallel port pin is set to high..

very urgent. thanks in advance.
 

Attachments

  • parallel port.txt
    692 bytes · Views: 129

eng1

New Member
chinsoon said:
I am using the configuration that is shown in the attachment, but when i measure the voltage across the collector to the emitter, it seems like the drop is equals to 9V, which is the Vcc.
Do you mean that the realy is off even when the input signal is high?
In my opinion you need a resistor between the base of the transistor and ground, 10k or 22k ohms should be fine.
 

chinsoon

New Member
eng1 said:
Do you mean that the realy is off even when the input signal is high?
In my opinion you need a resistor between the base of the transistor and ground, 10k or 22k ohms should be fine.

ya.. thats the problem, and i have a resistor connected from the parallel port to the base of the transistor. I am using a BC567B. but it seems like the transistor is not on.
 

chinsoon

New Member
Gayan Soyza said:
Hi chinsoon you measured the voltages after giving inputs from the software or you just measured the voltages without giving any input from the software.

well, i was doing this in my college lab, where to computers are not equiped with the software i am using, but i assume that the 5V for all pins are the same. So i used the pin 1 and pin 25, which are Vcc and ground respectively (if i have not mistaken).

So once i am able to get the output, i should be able to get the samething with the software running
 

chinsoon

New Member
eng1 said:
Did you check if the input voltage is 5 V when it's supposed to be high?

i have measured the output for pin 1 that i am using. It shows 4.37V if i have not mistaken.
 

eng1

New Member
What is the collector current? I can't find the datasheet of your transistor, but the base current might be too low to switch the transistor on.
 

chinsoon

New Member
eng1 said:
What is the collector current? I can't find the datasheet of your transistor, but the base current might be too low to switch the transistor on.

sorry,,,, wrong info.... BC547B.... here is the datasheet...

by the way, i dont know hot to search from the datasheet for the minimum current for the base... can tell me where to refer to?
 

Attachments

  • datasheet.pdf
    51.8 KB · Views: 126

eng1

New Member
First you have to know the collector current (Icsat), then find what the gain of the transistor is in the datasheet and calculate Ibsat = Icsat / beta.
In order to ensure that the transistor is biased in the saturation region, you have to force a base current higher than Ibsat by a factor of 10 typically. Calculate the base resistance accordingly.

When the input signal is low, the base of your transistor is floating. You may add a resistor between the base and ground, as I said earlier.



P.S.: I don't know how much current you're going to get from the parallel port. You may also consider a mosfet, like the 2n7000? **broken link removed**
 

ericgibbs

Well-Known Member
Most Helpful Member
hi chinsoon,

You say you are using pin #1 as the signal and pin #25 as gnd.

Pin#1 is internally hardware inverted, so if your PC program sets it low there will be about +3v on pin #1.
[ after the PC power up initialise state pin #1 is high approx +3v.]

There are also internal pullup resistors on most of the port pins.

The diodes are not necessary, connect a 10K resistor from the transistor base to gnd,
leave the series 4K7 resistor connected as shown.

If you are using Win XP, you will most likely need the inpout32.dll in your windows/system directory,
else you will not be able to control the parallel port.

Eric
 
Last edited:

chinsoon

New Member
eng1 said:
First you have to know the collector current (Icsat), then find what the gain of the transistor is in the datasheet and calculate Ibsat = Icsat / beta.
In order to ensure that the transistor is biased in the saturation region, you have to force a base current higher than Ibsat by a factor of 10 typically. Calculate the base resistance accordingly.

When the input signal is low, the base of your transistor is floating. You may add a resistor between the base and ground, as I said earlier.



P.S.: I don't know how much current you're going to get from the parallel port. You may also consider a mosfet, like the 2n7000? **broken link removed**

but i think it has not been a problem using transistor to control relays right (except for my case), because i do not wish to use EMOSFET unless necessary. We were given 12 weeks to complete the project, and i have not done any research on EMOSFET.

by the way, how i see from the datasheet for the value of Beta?
 

chinsoon

New Member
ericgibbs said:
hi chinsoon,

You say you are using pin #1 as the signal and pin #25 as gnd.

Pin#1 is internally hardware inverted, so if your PC program sets it low there will be about +3v on pin #1.
[ after the PC power up initialise state pin #1 is high approx +3v.]

There are also internal pullup resistors on most of the port pins.

The diodes are not necessary, connect a 10K resistor from the transistor base to gnd,
leave the series 4K7 resistor connected as shown.

If you are using Win XP, you will most likely need the inpout32.dll in your windows/system directory,
else you will not be able to control the parallel port.

Eric

wow.. you sure know alot about this.

yes, i need the inpout32.dll, and the software is working. the problem now is to get the whole circuit working properly and to connect the transmitter to the parallel port.

SO if you connect the 10K resistor from the base to the ground, then isnt it reducing my base current? now i assumed that i do not have enough current to trigger my transistor. Right?
 

chinsoon

New Member
by the way, there is another question here.

when i buy a transistor, the seller did not ask me transistor from which manufacturer. So i came across this situation where when i try to look for datasheets, say my BC547, and i searched it online, i do not know which datasheets to look for. There are many datasheets from different manufacturer. So how can i solve this?
 

ericgibbs

Well-Known Member
Most Helpful Member
hi,
The typical output from a Prn port is around +3v, so if you use a series 4K7 to the transistor base, with a 10K0 from base to gnd, you would have +2v and the junction of the resistors[ without the transistor base connected] as the base forward switch on voltage is around +0.6/0.7v the transistor will conduct.

Not knowing the current the relay requires to operate, Ive assumed around 20ma and the gain of the transistor is say 50, then a base current of around 400uA should drive the transistor hard on.

Checking the transistor datasheet it shows a gain of about 200

If you find that the transistor needs a little more base current, reduce the 4K7 to say 3K3

Does this help?

Your last post re manufacturer, in this application, it dosn't matter.

Eric
 
Last edited:

eng1

New Member
chinsoon said:
but i think it has not been a problem using transistor to control relays right (except for my case), because i do not wish to use EMOSFET unless necessary. We were given 12 weeks to complete the project, and i have not done any research on EMOSFET.

The relay can be driven by a bjt of course, but it loads the parallel port. If you start to take few milliamperes (depending also on the port type) the high voltage will drop. You have to say how much current flows into the collector or people can only guess. After calculating the base current that switches the transistor on, ask yourself if the parallel port can source that current reliably.
 
Status
Not open for further replies.

Latest threads

Top