MM74C08N acting strange

Thread Starter

oleskiw

Joined Jul 23, 2013
6
Hi, I'm new to circuits and am having trouble getting this AND (also a c04n hex inverter) working. I put 4.8v dc (3AAs), + to pin14 vcc, and - to pin7 GND. I have a led/resistor hooked up to an output pin, and without any inputs, the and gate is outputting ~2v. As I touch the protoboard I have it hooked up to, the LED fluctuates. Whats going on here? Has static messed up the IC? I've heard things about using bypass caps (?). If I put +4.8 to the input pins, the led shuts off. If I run my fingers along ic pins, things go crazy. I have a similar setup with the hex inverter, things are just as bizarre.

Is there a better 7408 package I should use? Do I have to add some other components to get this working? Any help would be appreciated. I'm just looking for a simple way to get AND and NOT logic with 5v to drive LEDs.

Thanks!
 

BobTPH

Joined Jun 5, 2013
8,958
1. At 5V an MM74C08 can only source and sink about 3ma, not enought to drive a typical LED.

2. All inputs must be connected to ground or Vcc. Otherwise there is no telling whether they will read high or low. Running your fingers across otherwise unconnected inputs willl couple your AC line frequency to it.

Bob
 

WBahn

Joined Mar 31, 2012
30,058
In addition to using a logic family that can satisfy the current needs of your LED and of making sure that ALL inputs are at proper logic levels (not floating), you also need to include a series resistor with the LED to limit the current to a resonable level.

Consider using an HC family (instead of the C family) and put a 220Ω or 330Ω resistor in series with the LED. Also, it is generally better to put the LED so that it lights up when the logic output is LO.
 

Thread Starter

oleskiw

Joined Jul 23, 2013
6
I got it working, using pulldown resistors on the input pins. Was able to drive the led too on logic HI. Same with the inverter. True that the datasheet claims at 5v can source only 3ma, so how is it working?
 

WBahn

Joined Mar 31, 2012
30,058
I got it working, using pulldown resistors on the input pins. Was able to drive the led too on logic HI. Same with the inverter. True that the datasheet claims at 5v can source only 3ma, so how is it working?
The data sheet is NOT saying that it can ONLY source 3mA. It is guaranteeing that it CAN source AT LEAST 3mA WHILE maintianing a logic HI voltage level.

Don't get in the habit of abusing parts just because you've found that you can get away with it -- you may not always be able to.

And be sure to use a current limiting resistor. Yes, the part will probably current limit at a current that won't damage anything, but don't rely on that. Learn to do things correctly.
 

MrChips

Joined Oct 2, 2009
30,806
Any particular reason you are using 74C04 and 74C08?
These are not designed to drive LEDs directly.
You can add an NPN transistor in order to drive an LED.
 

Ron H

Joined Apr 14, 2005
7,063
My interpretation of the datasheet is that the guaranteed short circuit current with vcc=5v is only 1.75mA. (See both attachments.)
The typical output voltage for a 3mA load to GND is 1.5V (1.5V across the load).
The typical output voltage for a 3mA load to Vcc is 1.4V (3.6V across the load).
Obviously, any individual unit may have higher or lower output voltage than the typical value.
 

Attachments

ScottWang

Joined Aug 23, 2012
7,400
This is a reasonable way to do it. I don't know if 3mA will give you enough light from your LEDs from your puposes.

A better way is to buffer it with a transistor inverter.
I don't think this is a good way to drive the LED, you can see when Vb going to hi that it will be closing to 5V, and the Ve = 5V - 0.7 = 4.3V, how about the voltages between two pins of LED?

If just want to using the LED to indicating a high voltage, then putting the resistor close to and in series with LED is better, it means that putting the resistor with LED in the same side(C of bjt), some people may connecting LED and resistor to E, it can be work too, but I don't like that way..

Sometimes i will using two or three gates in parallel to driving the LED, it depends on the values of current, in the small current that it won't harm the gates.
 
Last edited:

sheldons

Joined Oct 26, 2011
613
here are 2 example schematics ,one with an npn the other using a pnp transistor,if you use the same supply your using for the op stage you need to alter the resistor in series with the led to suit supply used.....
 

Attachments

ScottWang

Joined Aug 23, 2012
7,400
here are 2 example schematics ,one with an npn the other using a pnp transistor,if you use the same supply your using for the op stage you need to alter the resistor in series with the led to suit supply used.....
Why you want to adding the 1n4148? (there are no need)
The 1k are too small for npn and pnp circuits.
The Rbe is no need for npn and pnp circuits, the 100K(Rbe) is too big for most CMOS IC applications, but if using 74LSxx that it may need Rbe when using in PNP circuit(see the internal structure of page 2).
 
Last edited:

Ron H

Joined Apr 14, 2005
7,063
Why you want to adding the 1n4148? (there are no need)
The 1k are too small for npn and pnp circuits.
The Rbe is no need for npn and pnp circuits, the 100K(Rbe) is too big for most CMOS IC applications, but if using 74LSxx that it may need Rbe when using in PNP circuit(see the internal structure of page 2).
I agree with this.
AS suggested by MrChips, A logic-level MOSFET is also a good idea.
Just to clarify: An N-channel logic-level MOSFET is just a type of enhancement mode N-channel MOSFET .
 
Last edited:

WBahn

Joined Mar 31, 2012
30,058
I don't think this is a good way to drive the LED, you can see when Vb going to hi that it will be closing to 5V, and the Ve = 5V - 0.7 = 4.3V, how about the voltages between two pins of LED?

If just want to using the LED to indicating a high voltage, then putting the resistor close to and in series with LED is better, it means that putting the resistor with LED in the same side(C of bjt), some people may connecting LED and resistor to E, it can be work too, but I don't like that way..

Sometimes i will using two or three gates in parallel to driving the LED, it depends on the values of current, in the small current that it won't harm the gates.
You are correct. I had in mind the case when Vcc was 12V in another thread. The advantage that this circuit has is that R1 sets the current and you only need a single resistor. But if does require that your Vcc be higher than Vdd (what I am calling the logic supply) by a couple of volts. It is not a good way to go with TTL logic because the HI level of TTL is typicall well below the supply, even when no current is being drawn. But CMOS does a good job of getting close to the rail when only a little current is being drawn.

The other way is to use two resistors and the transistor as a switch.



Using parallel gates to get more drive strength is an option, but you need to be sure that you don't exceed the total maximum supply current for the package in the process.
 

Attachments

ScottWang

Joined Aug 23, 2012
7,400
It is not a good way to go with TTL logic because the HI level of TTL is typicall well below the supply, even when no current is being drawn.
This situation that I already replied to sheldons on 15# at third paragraphs as:
but if using 74LSxx that it may need Rbe when using in PNP circuit.

In the basic NPN bjt LED driver that you shown:
The LED spec is 2V/10mA, when you using Rc=270Ω, I called the 270Ω values is a calculation value, because the value is close to the LED current of spec, but considering the LED life, I will using the current around 80% of 10mA,

Calculating the values of Rc:
I_led = 10mA x 80% = 8mA,
Rc = (5V - V_Led - Vce) / 8mA
=(5V-2V-0.2V)/8mA=350Ω, so choosing 330Ω is better then 270Ω.

Using parallel gates to get more drive strength is an option, but you need to be sure that you don't exceed the total maximum supply current for the package in the process.
Yes, it depends on that you want to using the 2V/10mA or 3V/20mA LED, if over the total current that the gates can provided, then adding a bjt to driving the LED is better.
 

WBahn

Joined Mar 31, 2012
30,058
That diagram is generic (I threw it together months ago) and the resistors are for the case that you want an LED current of about 10mA from a 5V supply. If you want 8mA, then you need a bigger resistor. If you want 15mA, then you need a smaller resistor.

Similarly, the base resistor was chosen to pull between about 0.25mA and 0.5mA from 5V logic which should place the transistor in fairly firm saturation while not pulling much current from the logic gate. That value should work with logic down to about 2.5V and LED currents up to about 20mA.
 
Top