Tying unused IC leads to ground or pulldown

Discussion in 'General Electronics Chat' started by SPQR, Dec 28, 2012.

  1. SPQR

    Thread Starter Member

    Nov 4, 2011
    379
    48
    Hello again,
    Simple question.

    On this forum, and on other sites, I've read that whenever possible one should tie unused IC leads to ground.

    My specific question:
    I'm using only 1/2 of an LM393 comparator. The diagram below shows what I've done on the left - tied all of the first comparator leads to ground - directly. But I'm not sure whether it should be directly to ground, or through a pulldown resistor (example on the right).
    Which is the correct way?
    [​IMG]


    My general question.
    With other ICs, on those pins that I don't use, should I tie them to ground, or tie them to a pulldown resistor?

    As usual, thanks very much.
     
  2. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    It depends, be dang sure it isn't an active output, and some inputs work better with resistors (as in TTL, though I don't normally do it).

    A LM393 comparator I usually do exactly what you show however, it also simplifies the PCB to some extent. DO NOT CONNECT the output to Vcc though, you will short out the chip. Generally I ground pins 1-4.
     
  3. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
    Tie only inputs to GND. Leave outputs unconnected.
    In this case, LM393 comparator has open collector outputs. There is no harm in wiring the unused output to GND.
     
  4. SPQR

    Thread Starter Member

    Nov 4, 2011
    379
    48
    Excellent! Thank you both.

    What do you mean by "active outputs"?
    Based on MrChips comments below, I would assume that an open collector output is "inactive", right?

     
  5. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Not really, connect a open collector to Vcc and you could get smoke if the chip tries to go low, and the output transistor shorts to ground.

    Any output should be considered active, as when it goes to the opposite polarity than it is connected to smoke is the likely result. Open collectors do let you get by with more though, they will make a NOR gate just connecting them together, for example.
     
  6. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
    Open collector means than it can only sink current from a +ve source. It cannot supply current.
    Hence connecting open collector output to GND has zero effect.

    Normally, one would leave outputs unconnected.
    In this particular case, because pins 1, 2, 3 are on the same side as pin 4, GND, it is just so easy to connect pins 1, 2, 3, 4 together.
     
  7. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Isn´t it better with comparators and opamps to tie one input to +Ve and the other to ground, so that the state of it more sure?
     
  8. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Is this wrong?
     
  9. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Nope, just extra parts. Tying them both to ground will prevent oscillation, which is why we do it. The exact state of the output doesn't matter.

    It does make a dandy virtual ground though.
     
  10. tubeguy

    Well-Known Member

    Nov 3, 2012
    1,157
    197
    I was wondering the same thing for comparators.
     
  11. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    That is what I do. Then there is no chance for oscillation to occur.
     
  12. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    It is VERY WRONG to connect negative feedback to a comparator. It oscillates. It is OK for some (but not all) opamps.
     
  13. SPQR

    Thread Starter Member

    Nov 4, 2011
    379
    48
    Outstanding discussion!

    So let's see if I can generalize a few things from this.

    1. It is generally better to tie unused pins on ICs to some "voltage state".
    2. a - Input pins can all be tied directly to ground.
    __b - Input pins to op amps can be both to ground or the "+" to Vcc and the "-" to ground, leaving the output floating
    3. Output pins (non-op amp) should be left floating, or tied to ground, depending on the type of output circuit that exists on the pin.

    Reasonable generalization?
     
  14. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    No, they absolutely have to be tied to something, unless the datasheet specifically says they can be left floating. Even then it is better to connect them to something if possible. Floating input pin acts as an antenna and you never know what kind of interference will come and upset your circuit. Also CMOS technology tends to draw a lot more current if the input happens to be in the middle between low and high state.
    Unused outputs should be left floating, period. Connecting them to anything else is just asking for trouble.
     
  15. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    The inputs of an LM339 quad or LM393 dual comparator are still active when they are connected to ground. A comparator usually oscillates when both inputs have the same voltage. So you do not want both inputs connected to ground.

    Connect the (-) input to ground and connect the (+) input to a positive voltage to set the output high (no current at the output).
     
  16. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    To add another IC into the mix...micro-controllers. Unless you can be absolutely sure (Can you ever be?) that your program will not change an input pin to an output, tie unused pins to Vdd or ground through a resistor.

    Ken
     
  17. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Or you can use the inner pullups, if the microcontroller has them. But these are typically not active until the micro boots, so don´t rely on them for example on lines controlling an external mosfet.
     
  18. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
    You are mixing chips and technology here, guys. You cannot use the same rules for all chips. It depends on the specific chip and application.
    You have gone waaay past discussing an LM393 comparator.
     
  19. SPQR

    Thread Starter Member

    Nov 4, 2011
    379
    48
    Ok, so it's clear that this is another one of those "It depends on the chip and situation".

    So perhaps the most general statement is
    "Every pin, on every IC, needs to be evaluated carefully to determine if it should be (1) floating (2) tied high or (3) tied low".


    Reasonable?
     
  20. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Well put! :)

    Ken
     
Loading...