Consecutive logic gates voltage loss

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
6 replies · 2K views
damosuz
Messages
72
Reaction score
0
Hi,

I am introducing myself to logic circuits and I want to build a network of logic gates (CMOS) that have push buttons as inputs and LEDs as ouputs. At most there are 4 gates between a button and a LED. However, at the inputs of the 4th gate, which is a AND gate, I measure 4 V and 4 V, but the output I get is only 2 volts. I don't understand why. I use Vcc = 5 V.

Maybe 4 V isn't considered a 1 and I need to boost the inputs to 5 V? If this is so, how can I do that?

Thank you.
 
Engineering news on Phys.org
damosuz said:
Hi,

I am introducing myself to logic circuits and I want to build a network of logic gates (CMOS) that have push buttons as inputs and LEDs as ouputs. At most there are 4 gates between a button and a LED. However, at the inputs of the 4th gate, which is a AND gate, I measure 4 V and 4 V, but the output I get is only 2 volts. I don't understand why. I use Vcc = 5 V.

Maybe 4 V isn't considered a 1 and I need to boost the inputs to 5 V? If this is so, how can I do that?

Thank you.

What logic family are you using? 74HCxx? 74AHCxx? 74VHCxx? 74xx?

For whatever logic gates you are using, look on the datasheet at the specs for Vih, Vil, Voh, Vol. That will tell you what the valid input and output voltages are...
 
I am using 74HCxx. According to datasheet, 4 V should be considered HIGH.

I did not connect the unused inputs to 0 V. Can that be the problem?
 
damosuz said:
I am using 74HCxx. According to datasheet, 4 V should be considered HIGH.

I did not connect the unused inputs to 0 V. Can that be the problem?

Unused CMOS logic gate inputs always need to be tied either high or low. Floating CMOS inputs are a bad thing in general.
 
damosuz said:
, at the inputs of the 4th gate, which is a AND gate, I measure 4 V and 4 V, but the output I get is only 2 volts. I don't understand why.
Remove the LED that you have connected to the output of that gate, so that nothing at all is connected to that gate's output. What voltage do you measure now?
 
NascentOxygen said:
Remove the LED that you have connected to the output of that gate, so that nothing at all is connected to that gate's output. What voltage do you measure now?

Ah, good point. And be sure to use a series current-limiting resistor. Check what the Iout capability of the 74HC family is (it's not much), and add a resistor in series to limit the output current to that max Iout. You will get about a 2V drop across the LED, so assume a 3V drop across the resistor to help you choose the value of the resistor using V=IR.
 
Pay attention to the max current drive of the gates. At what current is Voh or Vol measured. Or, at what voltage is Ioh or Iol measured. Some datasheets also list the short circuit current, for example.

2V is about right for a logic gate connected directly to an LED (bad form )