Connect with us

74LS05 driving Relay

Discussion in 'Electronic Design' started by Kyle Winters, Jan 26, 2005.

Scroll to continue with content
  1. Kyle Winters

    Kyle Winters Guest

    Hello everyone,
    I apologise in advance for my lack of knowledge. I am completely
    self-taught in electronics so might be missing a basic concept here...
    I have a 74LS05 IC (Hex Open Collector Inverter) that I want to use to drive
    a motor (via a relay). I tested it first with a LED and it worked fine
    (after I realised I needed to put a 3K9 (pull-up?) resistor to the +5V line
    to get it going).
    Now when I attach the relay in place of the LED, I don't get enough voltage
    to fire the 5V relay.
    I will try a diagram for when it worked with the LED...


    Output of 74LS05
    ????????????????>??????
    ?Vx LED ?
    ? ?
    < 3K9(R1) ?
    ?
    ?
    ????
    +5V


    Now, when I try it with the relay in place of the LED, I don't get enough
    voltage. I tried various values for R1 - the results were:
    R1 Vx
    100R 2.90 V
    820R 0.70 V
    3K9 0.16 V
    22K 0.03 V

    Now, I'm thinking if I go any lower than 100R, the voltage at Vx will
    permanently be enough to switch the relay, so I'm a bit lost - I don't think
    my theory is correct.
    In case you need it, the resistance across the relay coil is 120R.
    If anyone can point me in the right direction, I would very much appreciate
    it. Even better, if someone can tell me why the LS05 needs this resistor at
    all, maybe I would understand it a bit better.
    By the way, I am testing this with nothing attached to the relay - I just
    wanted to see it switch before I loaded it. Will I need to allow for the
    load on the relay in the solution to this problem? I'm thinking not because
    they are seperate circuits anyway, aren't they?

    Thanks in advance,
    Kyle.
     
  2. Paul Burke

    Paul Burke Guest

    I haven't got any TTL data books any more, so I don't know the figures,
    but I suspect that a 7405 won't sink enough current to drive a relay.
    Guessing at about 5mA sink current, if the resistance of your coil is
    less than (order of) 1kohm, you're sunk.

    Replace it with a ULN2003 or similar (different pinout!).

    Paul
     
  3. Robert Baer

    Robert Baer Guest

    Incorrect.
    They will reliably drive a 12V 900ohm relay coil.
    TI data book sez SN74LS05 will sink 8mA max. Admittedly, that does not
    compute; the relay would seem to require 13mA for full drive.
    I have not made any measurements of my relay drive voltages; i put a
    100 ohm resistor in series with the relay coil, and then a "snubber"
    diode from the '05 collector to the +12V.
    The relays i use seem to close in 1mSec with random bounce for another
    1mSec; dropout seems to be about 5mSec (if i remember correctly).
     
  4. Andrew Holme

    Andrew Holme Guest

    http://www.tech-chat.de/download.html next time) and your description,
    it sounds like you had the LED connected from the LS05 output to
    ground. That's wrong. Connect the LED and resistor in series between
    +5V and the LS05 output.

    The relay should be connected between +5V and the LS05 output; you
    don't need a series resistor for a 5V relay. What you do need,
    however, is a back emf diode connected backwards across the relay coil
    - you could destroy the LS05 if you omit this.
     
  5. Paul Burke wrote...
    Here are the datasheet ratings. If a specific part has a saturation
    voltage of 200mV at 16mA, it can probably sink say 40mA successfully
    (0.5V, 20mW), but you'd be breaking rules and using it beyond spec.

    .. part Iol(max) Vol(typ) (max) Voh(max)
    .. ---- ---- ----- ----- -----
    .. 74LS05 8mA 0.25V 0.40V 7V
    .. 7405 16mA 0.20V 0.40V 7V
    .. 7406 16mA - 0.40V 30V
    .. " 40mA - 0.70V 30V
    .. 7416 16mA - 0.40V 15V
    .. " 40mA - 0.70V 15V

    These four parts all have the same TTL 7404 inverter pinout.
     
  6. CBarn24050

    CBarn24050 Guest

    Subject: Re: 74LS05 driving Relay
    Change to the 7405 (16mA) or 74s05 (20mA)
     
  7. Fred Bloggs

    Fred Bloggs Guest

    View in a fixed-width font such as Courier.




    5V
    | 1N914
    +-------+---------------+--|<|--+
    | | | |
    | | | |
    | / K|| /
    | 1K K|| 120
    | / K|| /
    | \ | \
    | | | |
    | | +-------+
    OFF | | |
    ----+ | | c
    | |\ | 1N914 |/
    | >----| o------+--|>|----+---| 2N2222A
    | |/ | |\
    +---- | 74LS05 / e
    ON | 1K |
    | / |
    | \ |
    | | |
    GND----+-----------------+-----+
     
  8. The other part of the answer, which is missed in this, is that the 74LS05,
    cannot sink enough current to drive this relay. The relay expects to be
    driven of 5v presumably. As such, it requires just over 41mA to drive it
    (5/120). The LS05, can only sink up to about 20mA (varies with the
    version). Hence the ciruit above, is using the transistor to sink the
    current, and the LS05 to drive this.
    The reason the LED worked, is that most only require a couple of mA, to
    give a reasonable output....

    Best Wishes
     
  9. You will need 5v/120 A to drive the relay = 42 mA

    A 74LS05 can only sink 20mA.

    Connect 3 '05 gates in parallel: all inputs tied together,
    all outputs tied together.

    Connect the relay between 5V and the output of the '05s.
    Connect a diode across the relay coil: Stripe (cathode)
    to 5V; the other end to the outputs of the '05.
     
  10. Fred Bloggs

    Fred Bloggs Guest

    View in a fixed-width font such as Courier.





    5V
    |
    +--------+
    | |
    |\ / |
    +------| o----+ 82 |
    | |/ | / |
    | | \ |
    | | | |
    | |\ | +----+ |
    -----+------| o----+ 100u| | |
    | |/ | === K|| |
    | | | K|| |
    | | gnd K|| |
    | |\ | | |
    +------| o----+-----------+---|>|--+
    |/ 1n914
     
  11. Bob Stephens

    Bob Stephens Guest

    Or use a 74HC or 74ACT part. +/-60 mA IIRC.
    Or buffer it with a transistor or OPAMP.


    Bob
     
  12. Bradley1234

    Bradley1234 Guest

    Oh come on!

    tie the OC output to a 10k pullup resistor to 5v VCC. A relay is much
    slower than the OC line.

    connect the output to a general purpose transistor, an NPN should work, tie
    the collector to the side of the relay that would be grounded, the other
    side of the relay to the +12v

    the emitter to ground, the base to your output of the '05

    I would bet money the 0 to 4 volt swing of the '05 output will drive the
    transistor, which will drive the relay.

    You may need a diode to drain the relay when the coil wants to dump its
    energy when its off, so put a damper diode across the NPN collector/emitter,
    the same way a horizontal output transistor is arranged.

    You may also need series resistors to limit the current, no need for the
    relay coil to smoke, so +12v into a series resistor, into the relay + side,
    then connect the relay - side to the collector, then the emitter to ground

    When the relay is energized/released there will be voltage spikes
     
  13. <sigh> Korean for lunch it is, then.


    Best regards,
    Spehro Pefhany
     
  14. Rich Grise

    Rich Grise Guest

    I'm sorry, Fred, but this is an _awful_ circuit! :) What's the 120 ohm
    doing in parallel with the relay coil? Lose that entirely.[0]
    I'd also replace the NPN with a PNP, and put the relay from its
    collector to ground. That way, if the chip fails it doesn't fail
    with the relay energized.
    Otherwise, just replace the '05 with an '06 and put the relay
    from output to +5, as others have said.

    Cheers!
    Rich
    [0] while hacking Fred's art, I saw that the 120R was in series with
    the diode. I wouldn't have done that either. ;-)
     
  15. What advantage can you see to adding the resistor?


    Best regards,
    Spehro Pefhany
     
  16. Shorter turn-off times of the relay. Cheaper than a zener.
    Just pick a R with the same DC resistance as the coil.
    If you don't mind the double current, remove the diode.
     
  17. Fred Bloggs

    Fred Bloggs Guest

    You should have stopped after "sorry." The circuit is quite general and
    shows how to adapt the older TTL OC to NPN drive of high current loads
    that can be powered by voltages other than 5V.
    Who says? The '05 output cannot fail short?
    The OP wants to know how to adapt an '05, and, what is more, his
    original circuit description was for a load which would turn "off" when
    the '05 input went HIGH. The PNP makes the IN->RELAY STATE
    non-inverting using positive logic.

    This is a speed-up resistor used to put 2x Vcc across the relay
    magnetizing inductance at turn-off. The main advantage is more pull
    power to break the contact.
     
  18. Rich Grise

    Rich Grise Guest

    If you mean the resistor from the '05 output to the base of the
    PNP, it's so that there's some resistance in between a Vbe drop
    and a Vsat drop. ;-)

    The one from the base to Vcc is, of course, the '05's pullup,
    and makes sure that the PNP turns all the way off.

    And if you mean the resistor in series with the catch diode,
    Fred put that there and I took it out. ;-)

    Thanks,
    Rich
     

  19. Err... Unless it is an appropriately rated zener diode, the diode belongs
    antiparallel to the relay coil, not antiparallel to the transistor. If you
    place the diode antiparallel to the transistor a large voltage transient
    will still be produced and the transistor or "damper diode" you placed
    antiparallel to it (whichever has the lowest breakdown voltage) will still
    be vulnerable to avalanche breakdown and possible destruction. Don't be
    fooled by the numerous hobbiest schematics that can be found littering the
    internet that do this. They are doing it incorrectly and consequently their
    products' reliability suffers.

    In a TV the damper diode is needed to provide a conduction path for the yoke
    coil current which is kind of in parallel with the horizontal output
    transistor. In your standard transistor-drives-relay-coil circuit, the
    relay coil (inductive device) is in series with the transistor. This is an
    important topological difference.

    If the appropriate diode is placed antiparallel to the relay coil no voltage
    spikes during turn on or turn off will be produced by the relay coil.
    Depending upon the nature of the load and voltages on the relay contacts, it
    is possible that that part of the circuit could cause voltage transients and
    electrical noise both at turn on and off (IE: inductive load, when contacts
    close the contacts bounce and turn on-off several times causing inductive
    load to produce high voltage and electrical arcs across the relay contacts).
     
  20. Bradley1234

    Bradley1234 Guest

    Okay, so putting the damper across the relay is better? I stand corrected.
    I dont read hobbiest schematics on the internet.


    kind of in parallel? I thought it was one of 2 yokes and the flyback, in
    series and thats no yoke.




    But to really stop the spikes to make "no voltage" wont it also require a
    capacitive and resistive load?

    And when an arc takes place across a relay contact? Doesnt that mean
    thousands of volts?
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-