# Consecutive logic gates voltage loss

1. Feb 21, 2014

### damosuz

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.

2. Feb 21, 2014

### Staff: Mentor

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...

3. Feb 21, 2014

### damosuz

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?

4. Feb 21, 2014

### Staff: Mentor

Unused CMOS logic gate inputs always need to be tied either high or low. Floating CMOS inputs are a bad thing in general.

5. Feb 21, 2014

### Staff: Mentor

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?

6. Feb 21, 2014

### Staff: Mentor

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.

7. Feb 21, 2014

### meBigGuy

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 )