Re: [PARPORT] simple par port question

From: Robert Heller (
Date: Wed Aug 13 2003 - 15:51:53 EDT

  • Next message: Norbert Preining: "Re: [PARPORT] NetMos parallel port lost after unplugging of another PCI card"

    In message <>, Blaise Gassend writes:
    >If I understand you correctly, you have done all the schematic at
    > for except that there
    >is no relay. In that case it is normal that you are not getting any
    >signal on the collector of the transistor. Your circuit can be modelled
    >like this:
    > Vcc
    > |
    > +------+
    > | __|__
    > /^\ Diode 1N4002
    > /---\
    > | |
    > +------+
    > |
    > |
    > 4.7K |C
    >parallel port >-\/\/\/\/ B |
    >data pi |E
    > |
    > |
    >parallel port >---------------+
    >ground pin |
    > Ground
    >That is, the transistor is acting just like a wire, and the relay isn't
    >there yet.
    >As you can see, in this circuit you should be reading 0V on the
    >collector of the transistor, but the transistor is ready to conduct
    >current coming through your relay.

    To put in in real *simple* terms, the transister is like a plain
    switch. The voltage drop (what Peter [below] is measuring) across the
    NPN juctions from C to E should be close to zero. which is *exactly*
    what he is reading. So far, so good. Almost all of the voltage drop
    will be across the relay, just as soon as the relay is installed. That
    is, from vcc (red cable) to C (black cable). Actually, he should be
    reading about vcc volts right now (with the meter itself acting as a
    very small load) between C and VCC, when the data pin is '1' (high) and
    almost zero volts when the data pin is '0' (low). With the relay in
    place, the voltage will be slightly less when on and more when off,
    due to the heavier load of the relay vs. the meter.

    Note: the voltage reading across the C-E connection in a 'off' state,
    *without a load* from C to Vcc will also be zero, since this is just
    the same reading you will get if you hold the red probe up in the air
    (connected to nothing). This is due to the meter having a sort of
    non-linearity in that an open circuit does not have infinite voltage
    across it, even though a short circuit has zero volts across it. This
    is probably what is confusing Peter. Electrical circuits need a
    'return' path, in this case some sort of "load" between the C and Vcc
    supply (the relay). Without such a load, the voltage across the NPN
    junction of the transistor is not meaningful. Leaving out the relay is
    like writing a Hello World program withOUT any sort of output
    statement: the program runs, but nothing *appears* to happen.

    >Quoted from Peter on Thu, Aug 14, 2003 at 12:05:12AM +1000.
    >> Hello,
    >> I am trying to build a very basic parallel port interface to control a relay
    >. (I've copied the basic schematic, that I found elsewhere on the web, to: htt
    >p:// for your reference.)
    >> The problem I'm having is simple: it just won't work! : )
    >> I've connected the 5v+ pin of my parallel port to the 4.7k resistor. (It doe
    >sn't matter which direction the resistor goes does it?) I've then connected th
    >e resistor to the base pin (B) of my transistor (an NPN 2N2222A). I've connect
    >ed the ground pin of my parallel port to the emitter pin (E) of my transistor.
    > This is as much as I've built for now as I'm not even getting a signal from m
    >y transistor! (The signal from my transistor is supposed to trigger the relay.
    >> I then send 5v+ out my parallel port (or just under 5 volts, maybe 4.8 volts
    >). I've measured it with my multimeter. Then I put the red cable of my multime
    >ter on the collector pin (C) of my transistor and the black cable of my multim
    >eter on the emitter pin of my transistor and I get nothing! However, when I pu
    >t the red cable of my mulitmeter on the other side of the resistor (after resi
    >stance) I get between 2 and 3 volts (I think, that's from memory). Then if I p
    >ut the red cable of my multimeter on before the resistor I get just under 5vol
    >ts (probably about 4.8 volts, but my multimeter is one of those analogue ones
    >with the needle so I can't be sure, it may be a little more or a little less).
    >> It seems everything works fine until the transistor. I would really apprecia
    >te any help... as you can probably see from my I-put-the-red-cable-there langu
    >age, I'm very new when it comes to electronics, but I am a great java programm
    >er : D
    >> Kind regards,
    >> Pete
    >> ____________________________________________________________
    >> Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
    >> -- To unsubscribe, send mail to: --
    >> -- with the single word "unsubscribe" in the body of the message. --
    >-- To unsubscribe, send mail to: --
    >-- with the single word "unsubscribe" in the body of the message. --
    Robert Heller ||InterNet: || /\FidoNet: 1:321/153

    -- To unsubscribe, send mail to: --
    -- with the single word "unsubscribe" in the body of the message. --

    This archive was generated by hypermail 2b29 : Wed Aug 13 2003 - 15:56:20 EDT