Connect with us

TTL input circuit to drive diode

Discussion in 'Electronic Basics' started by Gary H, Nov 23, 2006.

Scroll to continue with content
  1. Gary H

    Gary H Guest

    Hi. I need a little help with something that should be pretty basic. I
    have a control board that has a TTL output to turn on and off a laser. The
    laser is nothing more than a diode that consumes about 60mA. So, I want to
    be able to turn the diode on or off with the TTL output. I don't really
    know much about TTL requirements. But, would a NPN transistor with resistor
    between the base and the TTL Output work? (Collector to + side of diode,
    emitter to GND.)? If not, what would be the best thing to do?

  2. DJ Delorie

    DJ Delorie Guest

    That's what I do. Or an N-channel MOSFET, which requires less math.

    For a BJT (NPN) transistor, the math goes like this:

    Consider the NPN with Rb between its base and the TTL output, and Rc
    in series with the diode load, between Vcc and the collector. The
    emitter is simply grounded.

    The goal current is Ic. There will be a voltage drop across the
    transistor (Vce) and across the diode (Vf) at current Ic. Subtract
    those from Vcc to get the voltage across Rc (Vrc). Compute R given Ic
    and Vrc (V=IR R=V/I, so Rc = Vrc/Ic).

    Now, look up Hfe for the transitor. This is the "gain" of the
    transistor. Divide Ic by Hfe to get Ib. This is a minimum Ib, of
    course. Now, there will be a voltage drop across the transistor again
    - Vbe. Subtract that from the TTL Voh to get the voltage drop across
    Rb, and calculate Rb from Vrb and Ib. This resistance is a maximum,
    you can use smaller values if you want.

    For a MOSFET, the math is easier. The voltage drop across the MOSFET
    (Vds) is negligible, you can just calculate Rc (er, Rd now) by (Vcc -
    Vf)/Ic. As for the base, any medium resistor is sufficient, since the
    gate is capacitive. You probably could omit the resistor completely.
  3. Chris

    Chris Guest

    Hi, Gary. If you actually have a TTL output, you might not know that
    they sink a lot more current than they can source. That means you
    might want to use a PNP transistor, with the output active low (the
    diode goes on when the TTL output is low) like this (view in fixed font
    or M$ Notepad):

    | VCC
    | +
    | |
    | .-. VCC
    | | | +
    | | | |
    | '-' |
    | |\ ___ | |<
    | -| >O--|___|-o-|
    | |/ |\
    | |
    | .-.
    | | |
    | | |
    | '-'
    | |
    | V ~
    | - ~
    | |
    | ===
    | GND
    (created by AACircuit v1.28.6 beta 04/19/05

    Thus was it done in days of yore when TTL ruled the earth.

    As is mentioned in a prior post, if you're stuck with an active high
    output (diode must go on when the TTL output is high), you might want
    to go with a logic level MOSFET. If you do, make sure to use a pullup
    at the TTL output to ensure the high voltage goes over the typical 3.5V
    you'll see as a TTL high. That might not fully turn on your MOSFET.

    Good luck
  4. Gary H

    Gary H Guest

    Thanks. I appreciate you taking time to show the equations and how they
    work. It makes sense.

  5. Robin

    Robin Guest

    If you need to switch the diode fast, a transistor arrangement might be
    too slow for you.

    If your TTL output comes from a package that has other unused gates,
    you could parallel them together to provide the extra drive?

  6. Martin

    Martin Guest

    I suspect we are in violent agreement since you say:
    "you can use smaller values if you want"
    But I think that is not quite strong enough ...

    Good design practice is to ensure the transistor is well saturated.
    Do this by dividing the Rb above by 10
    (thus increasing the base current by a factor of 10)


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