3
\$\begingroup\$

I have done an experiment that I cannot explain and would like some help.

I have a circuit that is used to generate a clock signal for multiple TLL-based D type flip flop registers (SN74LS173). There are 555 timers and also a push button to have an automatic clock or a manual clock, and a multiplexor (SN74LS157N) is used to select either the manual clock or the automatic clock that is fed to the rest of the circuit.

SN74LS157N recommended max output currents:

High (source) = 800uA

Low (sink) = 16mA

My issue is with the output of the SN74LS157N multiplexor. I wish to drive an 3mm 1.8V LED off the clock signal just for indication. With no resistor and LED connected to the clock signal the output voltage (marked Vx on the diagrams) is around 4.3V, a good high for TTL. But when I add the series resistor and LED, the voltage drops to around 3.5V. Here is the circuit below:

Basic circuit used

I first tried using a hex inverter (SN74HC04N) connected as in the diagram below and it worked perfect. Even with the LED illuminated, the clock signal voltage remains at 4.3V.

Hex inverter circuit

I also used a tri-state buffer (Toshiba 74HC245AP) connected like the diagram below and it behaved exactly like the inverter above. No problems here.

Buffer circuit

Finally I tried to use an NPN BJT (2N3904) to replace the ICs to drive the LED and it is connected like the diagram below. I worked out the 18K base resistor from taking beta as 100. Assuming a 5mA LED current, Ib = Ic / Beta, Ib = 5mA / 100 = 50uA. So Rb = (Vcc - Vbe) / Ib, Rb = (5 - 0.7) / 50uA = 86kohm. I have used 100Kohm in the experiment as shown.

The problem I have here is that the when the LED is illuminated, the voltage at Vx only gets up to 3.8V, and not the 4.3V like the inverter and buffer method. Why is this 2N3904 loading the 157 mux more so than the other methods? I have not got a current meter that can currently measure down to uA, but the voltage across Rb = 3.03V, so the base current must be around 30uA, which is under the max recommended current for the 157 mux.

NPN BJT circuit

\$\endgroup\$
12
  • 1
    \$\begingroup\$ The current through a 100K resistor @ 3 V is about 10 μA, an HC input is rated at ±1 μA. (Rb = (\$V_{OH}\$ - Vbe) \$\endgroup\$
    – greybeard
    Commented Jan 4, 2023 at 16:47
  • 1
    \$\begingroup\$ 3.8 volts is still a legal TTL High - in fact it is higher than I would expect. According to an article at Sparkfun.com, the minimum voltage for a TTL High output is 2.7 volts, and for a TTL High input is 2.0 volts, so you should have no problems with your 3.8 volts. \$\endgroup\$ Commented Jan 4, 2023 at 16:49
  • 1
    \$\begingroup\$ The high-level output voltage for this device is typically 3.4 volts. \$\endgroup\$
    – Andy aka
    Commented Jan 4, 2023 at 16:51
  • 1
    \$\begingroup\$ It's in the data sheet for the device \$\endgroup\$
    – Andy aka
    Commented Jan 4, 2023 at 16:53
  • 1
    \$\begingroup\$ (@PeterBennett \$V_{OH_{min}}\$   used to be 2.4 V, \$V_{IH}\$ of HC is more like \$V_{DD}/2\$ + .15 typical - worst case quite a bit higher.) \$\endgroup\$
    – greybeard
    Commented Jan 4, 2023 at 16:54

3 Answers 3

3
\$\begingroup\$

What you observe is perfectly normal in the case what you are doing.

The reason why the transistor loads down the TTL output and the HC chips don't is simply because the TTL has extremely weak output high current drive ability.

The BJT transistor base needs current just like you calculated.

The HC type chips are CMOS type chips so they consume virtually no current at all so they don't load the LS type output at all. With DC load, to be more exact.

Technically LS TTL type output is not even compatible HC CMOS type input and by connecting them directly is not guaranteed to even work.

In all cases, all you need to do is to provide a pull-up resistor to allow more high current and voltage closer to 5V, which also makes the LS output compatible with HC input.

\$\endgroup\$
3
\$\begingroup\$

Ideally, you should not be mixing 74LS and 74HC, the Voh for 74LS is 2.5V and Vih for 74HC is 3.5V so there is negative noise margin. And that's with a 400uA load (10 74LS input loads). 74HCT has TTL-level inputs. You can make it work (without speed guarantees) by adding a pullup resistor (and no other loading) on the LSTTL output, but you're doing the opposite.

Possible options- invert the LED indication so the output only has to sink current (and add that pullup in parallel with the LED + resistor, because the LED stops conducting at 2 or 3V). Use a MOSFET such as 2N7000/2N7002 rather than a BJT (and add that pullup).


Case 1 (inverted LED indication)

schematic

simulate this circuit – Schematic created using CircuitLab


Case 2 (MOSFET)

schematic

simulate this circuit

\$\endgroup\$
12
  • 1
    \$\begingroup\$ @greybeard I think I'd still add a Schottky to +3.3 on the input. \$\endgroup\$ Commented Jan 4, 2023 at 17:09
  • 3
    \$\begingroup\$ @greybeard Mixing 5V TTL with 5V CMOS is perfectly acceptable. Provided that you remember to make them compatible by simply adding a pull-up resistor when connecting a TTL output to a CMOS input. \$\endgroup\$
    – Justme
    Commented Jan 4, 2023 at 17:33
  • 1
    \$\begingroup\$ There is essentially zero DC current with a MOSFET and so it won't interfere with the pullup resistor. It will slow the low-to-high transition because of the capacitance (which is why I suggested a smallish MOSFET rather than a several-ampere AO3400 part). You could use a pullup like 1K and minimize that effect (LS outputs can sink 8mA). \$\endgroup\$ Commented Jan 4, 2023 at 19:14
  • 1
    \$\begingroup\$ With 1kΩ and 2N7002 rise time should be < 1usec, if you used 100kΩ and AO3400 it could be more like 500-1000x worse. Rough order of magnitude guesstimate. Simulation would be more accurate, but highly dependent on the exact threshold of your HC chip, if it happens to be close to Vdd/2 then it will be better. \$\endgroup\$ Commented Jan 4, 2023 at 23:43
  • 1
    \$\begingroup\$ There are two distinct cases, I've edited the answer to show the schematics. The MOSFET option allows a brighter LED if desired. \$\endgroup\$ Commented Jan 5, 2023 at 11:44
2
\$\begingroup\$

when I add the series resistor and LED, the voltage drops to around 3.5V

And that's not a problem with TTL circuitry. 3.5V is a valid high TTL level. If the D registers are TTL, they'll be just fine with that.

The problem I have here is that the when the LED is illuminated, the voltage at Vx only gets up to 3.8V

It's not a problem. It's totally expected and normal, and perfectly acceptable in a TTL system. In TTL, 5V is a supply voltage, not an output logic level.

The "0/5V levels" are an idealization. Real TTL systems do not work with 0/5V levels. They sure accept 5V inputs, but anything above 2V on an input is a high level!

TTL outputs with even a single TTL or TTL-LS load on them have 5V only on the supply lines. It's not a voltage you'll ever see on any TTL signal lines with TTL loads on them. Not even close.

TTL inputs are diodes "facing out" connected to a couple of base-emitter junctions in series from VCC. Anything above 2V on a TTL input reverse biases the input junction under all operating conditions, and acts like an open-circuit at DC. This is also why open-circuit TTL inputs are a valid high logic state. Connecting anything DC above 2V to a TTL input is the same as leaving that input open.

This is not the case with CMOS inputs! Leaving CMOS logic inputs open can cause excessive current consumption and misbehavior of the entire chip so maltreated. This is also why in general you can not replace TTL logic on a board full of them with all-CMOS logic. Some inputs may have been left open, and that's bad news for CMOS like 74HC, 4000, etc.

If you want TTL to drive symmetric 5V CMOS inputs (e.g. 74HC family, 4000 family powered from 5V, etc.), you'll need level translators. TTL can only directly drive TTL compatible, low-threshold CMOS inputs - as found in the 74HCT and 74ACT logic familes, for example.

On the other hand, the anode-side LED load, as you found out, is useful for adapting TTL outputs to CMOS 3.3V inputs :)

Given that TTL outputs drive low logic level much, much harder than high logic level, having the LED connected anode-to-VCC will let the circuit work acceptably up to a higher clock speed, since the LED won't be stealing from already minuscule high-level current.

In TTL, the high level output is only meant to recharge the parasitic trace and input capacitances. It should not be used to drive any DC loads. The low level output can drive DC loads in addition to TTL loads - just apportion the output current appropriately per the fanout available on the output.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for your answer by the way. I learned a lot about TTL from everyone here by asking this question. \$\endgroup\$
    – David777
    Commented Jan 6, 2023 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.