Current limiting resistor for led on 7408 gate output

Discussion in 'General Electronics Chat' started by laguna92651, Sep 11, 2008.

  1. laguna92651

    Thread Starter Active Member

    Mar 29, 2008
    101
    0
    I am building a 2 to 4 decoder with 7408 And gates and need to put LED's on the output as indicators, active high. 2 questions

    1. Would I put a current limiting resistor in series with the LED to ground or put the resistor and LED from the gate output to Vcc?

    2. The LED draws 30mA at 2V, would I use the worst case Vo of the gate to calculate the required R value?

    Thanks
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    A 7408 IC can source a maximum of -0.8mA when the output is high. That's not going to be enough to drive your LEDs.

    You could use an NPN transistor, one per gate, to drive your LEDs. See the attached schematic. When the gate output is high, the transistor will turn on and enable current flow through the LED.

    For a more compact solution, you could use a ULN2003 or ULN2803, which are respectively 7 and 8 Darlington drivers in a single IC. These handy interface ICs are inexpensive and can be directly driven by TTL and 5v CMOS.
     
  3. laguna92651

    Thread Starter Active Member

    Mar 29, 2008
    101
    0
    Thanks for the reply and diagram. It makes sense to me.
    What concerns me is that we were told to use a resistor and led in the design, no mention of a transistor, which we haven't even studied yet. What do you think?

    Thanks
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I then suggest that you find and download a datasheet for a 7408 IC, and locate the IOH (Current when the output is high) specification, highlight it, show it to your instructor, and ask them how can you light up a LED that requires 30mA when the maximum current output of a 7408 TTL IC is ... and point to the specification that you highlighted.

    If the problem were reversed, and the output were considered active low, then you would be able to SINK about 16mA through an LED. However, this is not the problem that you were given.

    There ARE alternatives in TTL. You could use an inverting buffer with open-collector outputs, a 7406. This IC can sink up to 40mA current. It would basically perform the same function as individual transistors or the ULN2803/ULN2003.

    Since the output of the 7408 is active high, the 7406 inverts that (as the transistor does) and provides an active low output capable of sinking your required current.

    Your problem now is to calculate the current limiting resistor that goes between the LED and Vcc.
    Vf(LED) is the typical forward voltage of the LED at the desired current through it.
    Rlimit = (Vcc - Vf(LED) - VOL) / DesiredLEDCurrent
    VOL (Voltage when the output is low) is given in the datasheet. For 16mA, 0.4v is maximum; for max current, 0.7v is maximum. You would probably get around 0.5v for 30mA.
     
  5. laguna92651

    Thread Starter Active Member

    Mar 29, 2008
    101
    0
    Actually that is what I already did. I downloaded a copy of the datasheet and emailed that question to her. Thanks again for the help.
     
  6. laguna92651

    Thread Starter Active Member

    Mar 29, 2008
    101
    0
    [​IMG][​IMG]It turns out to further confuse things I have to have active high outputs.

    I only have available a 7410 Nand (I need 3 inputs) I was going to place a 7404 inverter (all I have available) on the output to get active high output.

    I would like the LED to light up when output is High. Circuits are a 2 to 4 and 3 to 8 decoder.

    How will the inverter change anything in terms of driving the led's?

    How further investigation the LEDs will draw 10mA at 2Vs.

    Thanks for your help.
     
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You cannot post photos that way. YOU can see the image, but nobody else can.
    Below the text reply box, click the "Go Advanced" button.
    On the next screen that comes up, go under the "Additional Options" part, and click the "Manage Attachments" button. Click on of the "Browse" buttons. Navigate to the image or file you wish to attach, and click on it.
    .png files are recommended over .jpg files, as they won't lose quality like .jpg compressed files.

    If you have to drive LEDs from an active high output, then you are in trouble.
    A 7410 can source up to 0.4mA from it's output. However, it can sink up to 16mA.
    You would like for it to light up when the output is high, but that's not going to happen.
    The 7404 inverter has the same source/sink capability that the 7410 does.
    That changes the LED current limit resistor requirements.

    Rlimit=(5-2-0.2)/10mA = 3/0.01= 280 Ohms.
    (The 0.2v is the Vce of the output transistor when sinking current)
    The closest standard value >= 280 is 300 Ohms.
    Ignore the 330 in the attached schematic; it's a typo and I don't feel like fixing it. :)

    The output from the 7410 3-input NAND drives the LED, and also the input of the 7404 inverter. The inverter changes the logic of the combined gates to AND from NAND. So, you have both an LED coming on at the right time being driven by an active low output, and the inverter provides an active high output.

    You're just not going to be able to source enough current to power the LEDs properly from either of those TTL IC's.
     
Loading...