1
\$\begingroup\$

I purchased an SN74LS74AN ic and the pinout is (unless I am mistaken) like this: enter image description here

I did the following:

pin 14 to power, pin 7 to ground, pins 1 & 4 via 10k ohm resistors to power, pin 6 to pin 2 (Q' to Data input), pin 3 to power with a simple push button

also, pins 5 and 6 go to ground via 100 ohm resistors and blue LEDs

my intention is to make a circuit so that when I push my push button (which goes to pin 3), the LED which is 1 goes to 0, and the LED which is 0 goes to 1 and so on.

here it is in falstad

enter image description here

i believe the clock input for this chip is edge triggered

Anyhow, it is not working. can someone help me figure out why? bear in mind I am a beginner.

Edit1: by not working I mean either one of the LEDs is turned on. i don't have any mechanism of predicting which one will be on. pressing my push button to pin3 does not change the current state.

Kindly,

\$\endgroup\$
2
  • \$\begingroup\$ "Not working" means? \$\endgroup\$ Oct 25, 2016 at 3:31
  • \$\begingroup\$ either Q or Qbar turn on. it seems to be random. sometimes it will just switch. when I press my push button to pin3, nothing changes. I'll amend my question to make it more clear. \$\endgroup\$ Oct 25, 2016 at 3:34

4 Answers 4

7
\$\begingroup\$

There are quite a number of changes you need to make.

1) Your LED current limit resistors are too small. A 74LS74 has a nominal rating of 16 mA when low. Assuming 2 volts Vf on your LEDs, producing 0 volts at a low output will draw about 30 mA. Try increasing the resistors to 300 ohms or so.

2) You have not shown any treatment of your unused inputs. Logic ICs should never have floating inputs. Connect unused inputs together and tie them to +5 with a 1k pullup resistor, since they are active low, and you don't want them active. In general, for TTL/LSTTL, the standard termination for unused inputs is via pullup, even when the input can be tied either way. The reason is that the input current is much less when high than when low, so less power is wasted on the unused function. By the same token, TTL/LSTTL outputs can sink much more current (when low) than they can source (when high), which is why your LED connections are correct - except for the resistor values.

3) As st2000 has answered, you need to condition your input. As it happens, you can do this cheaply by using the unused half of the chip as a SR flip-flop.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
3
  • \$\begingroup\$ I tried the arrangement you outlined. But instead of flipping from Q to Q' when I push the button, it just blinks rapidly. My goal with this project is to have a 555 timer feed the clock signal on the first D flip flop whose Q' will feed the clock signal of the next D flip flop so that I have a binary counter that goes {00,01,10,11....}. Is there a point where I may consider the chip is not functioning properly? Is there a way to test it with a simpler configuration? I tried unsuccessfully to make an SR flip flop out of it too. \$\endgroup\$ Oct 25, 2016 at 23:58
  • \$\begingroup\$ @Jozurcrunch - How, exactly did you try to make an SR FF? If you use the left-hand half of my schematic, and connect LED/resistors to the Q and Q* outputs, what happens when you push the button? And do you have a 0.1 uF ceramic decoupling capacitor from pin 14 to pin 7, with very short leads (no long jumpers - 1 inch or less)? \$\endgroup\$ Oct 26, 2016 at 2:54
  • \$\begingroup\$ I get the feeling that I connected something wrong initially. I successfully made an SR FF. Feeling confident, I used a 555 blinking circuit to feed the clock (pin3) with the same set up I had initially and got the led from Q1 to blink, then I did the same for the second half of the 7474, but the clock2 (pin11) being fed by Q'1 (pin6). In this way I got Q1 and Q2 to blink {00,01,10,11} the way I wanted. Given this bouncing trouble, the SR FF feeding the clock sounds very clever so I will try this one again to establish if bouncing is indeed the root cause of my frustrations. thank you \$\endgroup\$ Oct 26, 2016 at 19:33
4
\$\begingroup\$
  1. The input of digital circuits needs to be either on or off. Inputs can not float. If using a switch to Vcc you need a pull down resistor (say, 10K ohms) to ground. If using a switch to ground you need a pull up resistor (again, say, 10K ohms) to Vcc.

  2. Mechanical switches bounce. Digital circuits are fast and see the bounces. You need to de-bounce your switches in order to get predictable results. Like this for example:

enter image description here

Note the pull up resistors at the inputs of both NAND gates.

\$\endgroup\$
3
  • \$\begingroup\$ i did not know this. I connected pin3 (clock) to ground through a 10k resistor in addition to having the push button from power. still not behaving like the simulation though. i wonder if I should take a picture. on the other hand, maybe this is why my 7408 AND gates did not work \$\endgroup\$ Oct 25, 2016 at 4:23
  • \$\begingroup\$ You can't have floating inputs. As @WhatRoughBeast pointed out, you need to apply this practice to all inputs. Including the inverse-clear and inverse-set for the half of the 7474 you are using. \$\endgroup\$
    – st2000
    Oct 25, 2016 at 13:18
  • 1
    \$\begingroup\$ For bipolar TTL, such as the 74LS74 and 7408 the OP mentions, you would need a very low value pull-down resistor as the inputs source current. Better practice is to connect the switch between input and ground, to give a solid Low when the switch is closed. \$\endgroup\$ Oct 25, 2016 at 15:44
1
\$\begingroup\$

The inputs of bipolar TTL logic (74xx, 74LSxx, and others without a "C" in the middle of the part number) source current, and will normally appear as a High when not connected.

Since the inputs source current, they must be pulled Low with a small (under 1K) resistance to be seen as a logic Low.. The traditional solution for switch inputs is to put the switch between the input pin and ground. Adding a 5K or so pull-up resistor is good practice, but usually not necessary.

CMOS parts (74ACxx, 74HCxx, and others with a "C") are CMOS and have very high impedance inputs - they can be used with high value pull-up or pull-down resistors - but ALL inputs must be connected somewhere, else they may be seen as "maybe" levels, and cause the chip to draw excessive current.

\$\endgroup\$
0
\$\begingroup\$

I did the following: pin 14 to power...

Make sure by power you mean the positive side of a 5 volt DC source. If you use anything higher than 5 volts then you might overheat and/or burn the chip. If you use too low of a voltage source, then the circuit will not operate.

... pins 1 & 4 via 10k ohm resistors to power....

It's not bad for experimentation purposes, but if later on you decide to never use the set or clear operations of the chip, you could tie them directly to power.

... pin 3 to power with a simple push button

Sad news is when you use a push button, "bouncing" happens. This basically means the connections in the button open and close very fast more than you would like. To a circuit, this means switch is on, and switch is off and this happens at a faster than expected rate for a short time. Because of this, the clock is seeing multiple pulses when you intended on making only one.

The easiest fix but not the prettiest is to connect a capacitor across the button (one leg of the capacitor to one button leg, and the other leg of the same capacitor to the other leg of the same button). Also, connect a resistor from the clock input (pin 3) to ground. 10K works well here. The resistor is used to provide a default logic level to the clock, which in this case is logic level zero since the resistor is connected to ground.

When the button is pressed, the capacitor is shorted until the button is let go, then the capacitor charges up. Until its sufficiently charged, the logic level will be one for a period defined by the resistor and capacitor values.

\$\endgroup\$

Your Answer

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

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