3
\$\begingroup\$

I have this circuit:

photo of breadboard

I'm powering it from an Arduino but that's inconsequential to the operation, it's simply a convenient source of +5v. The orange line is +, black to gnd.

If it's not clear from the picture (the lines got a little messy, sorry), the basic idea is I have 2 switches connected to ground, both attached to a 10k ohm pull-up resistor from the +5v side. The resistors are connected to the input gates of a 74LS20 quad input NAND gate. I've tried to pair the inputs together as I want it to function as a dual input gate. I'm using a quad input due to lack of components.

When I throw the switches to the up position, as pictured, the circuit is shorted to ground, which should pull the input pins low, meaning the output pin is high and the LED lights. This works fine.

However, when I open the switches, the input pins are high (I checked this with a multimeter, they're at +4.98V), but the output doesn't change, the LED stays on.

I've tried the same circuit with a couple of IC's in case one was faulty, but the same behavior is exhibited.

Have I wired this wrong? It's been a very long time since I've messed around with this stuff so maybe I've forgotten something fundamentally intuitive about electronics, apologies if that is the case.

\$\endgroup\$
2
  • 5
    \$\begingroup\$ A real schematic rather than a photo of your breadboard might help you get an answer to your question. \$\endgroup\$
    – John D
    Commented Sep 12, 2016 at 23:51
  • 1
    \$\begingroup\$ U are using the wrong ic pin out \$\endgroup\$
    – D.A.S.
    Commented Sep 13, 2016 at 1:53

1 Answer 1

2
\$\begingroup\$

As already commented by John D, a real schematic would definitely help readers.

However, there is one clear bug:
There is no connection from IC pin 7 to Gnd (0V). Please add that and re-test.


Update: I'm not 100% sure of my interpretation of some of the wiring related to Gnd connections (the wiring is just missing off the top of the photo). However it seems that you have connected IC pin 11 to Gnd. That would be correct for an unusual 5420 package (military temperature version of 7420 in a ceramic flat-pack) but is not correct for a standard 74LS20 in "N" package (plastic DIP) like yours.

I wonder if you have misinterpreted whatever IC datasheet you have been looking at, if it contains that (unusual) 5420 pinout, with Gnd on pin 11?

From the TI datasheet, the 74LS20 pinout for "N" (plastic DIP) package is as shown immediately below. Notice that pin 11 is "NC" (Not Connected) - not Gnd; the correct Gnd is pin 7, as I explained earlier, and that Gnd connection to IC pin 7 is missing on your breadboard:

74LS20 pinout

Whereas in a "W" (ceramic flat-pack) package, the 5420 uses pin 11 as Gnd:

5420 - W package pinout


A couple more points:

  • Since it doesn't have the correct Gnd connection, the IC is currently being powered using a "phantom" Gnd, perhaps through the LED. This won't be doing the IC any good, although I hope that permanent damage won't happen.

  • Your design uses a TTL NAND gate output (pin 6) as a current source for the LED. That is not the best way to drive loads like LEDs, since TTL ICs can "source" much less current (on that IC, TI list a maximum of 0.4mA) than they can "sink" (on that IC, TI list a maximum of 8mA).

    Your LED will be drawing more than 0.4mA from that output pin and so it will be exceeding the output's recommended maximum "source" current - not good for reliability.

    Instead, either add a transistor to that IC output to drive the LED; or use the IC output to "sink" the LED current, although this will invert the LED lighting logic compared to what you expect. It would probably be clearer if you research terms like TTL LED driver, or similar. See this answer for some examples of TTL outputs "sinking" LED current.

\$\endgroup\$
6
  • 1
    \$\begingroup\$ Pin 11 is a no-connect on the normal DIP package, so grounding that pin has no effect. \$\endgroup\$ Commented Sep 13, 2016 at 0:32
  • 1
    \$\begingroup\$ @PeterBennett - Yes, agreed. The problem I see is not so much that pin 11 is connected to Gnd; but that pin 7 is not connected to Gnd. It is interesting that pin 11 is connected to Gnd on the OP's breadboard, for the reason I explain in my answer. I wonder if there is a rogue datasheet somewhere which has mixed that unusual "W" package pinout, with the "N" package pinout? \$\endgroup\$
    – SamGibson
    Commented Sep 13, 2016 at 0:38
  • 1
    \$\begingroup\$ Its strange that he got all the other pins from the N/J pinout, and Ground from the W pinout. \$\endgroup\$ Commented Sep 13, 2016 at 1:18
  • \$\begingroup\$ @Peter - Absolutely agreed. I just couldn't think of another reason why there is a Gnd connection on pin 11 - that was the only hypothesis I could think of. The fact that at least some 7420 datasheets (like the TI one) show both pinouts, could perhaps allow someone to look at the wrong pinout when switching between looking at the datasheet, and looking at the breadboard, while wiring the breadboard...? Hopefully the OP can explain why they did this. \$\endgroup\$
    – SamGibson
    Commented Sep 13, 2016 at 1:28
  • 1
    \$\begingroup\$ @user3662805 - Does your circuit work OK, after you connect pin 7 to Gnd? FYI connecting anything to an "NC" pin is risky. Some manufacturers don't make the distinction in their datasheets between "NC" meaning "this external pin is not connected inside the IC package", and "NC" meaning "user must not connect anything to this pin, because it is connected internally and is used for test / manufacturing purposes and connecting anything to it can cause 'bad things' to happen". Therefore if you see a pin labelled "NC", the least risky option is not to connect anything to it. Hope that helps. \$\endgroup\$
    – SamGibson
    Commented Sep 13, 2016 at 13:26

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.