This is a NAND gate IC. I have one input connected to the positive terminal of the battery while the other input is not connected to the battery as you can see in the image.

Why does the LED turn off when I touch any of the input wires? When I touch the conducting part, the LED remains off as long as my fingers are in contact. When I press the insulating part, the LED turns off for a few seconds and then lights up again. The tighter I press, the longer the LED remains off. Why is that?

enter image description here

  • 1
    \$\begingroup\$ Add supply bypass capacitors, one (or two if using both "rails" top&bottom) for the breadboard somewhere in the middle, one close to each "fast" IC. Do not leave CMOS inputs floating (like that black wire) - this does not give a legal voltage level with CMOS logic ICs. \$\endgroup\$
    – greybeard
    Commented Aug 17, 2023 at 15:35
  • \$\begingroup\$ Which chip is this? \$\endgroup\$
    – CL.
    Commented Aug 17, 2023 at 15:36
  • 5
    \$\begingroup\$ Floating inputs and no current limiting resistor. What's that chip done to upset you? \$\endgroup\$
    – Finbarr
    Commented Aug 17, 2023 at 15:51
  • 6
    \$\begingroup\$ There are a lot of NAND gate ICs out there. Could you please edit your question to tell us the part number? I'm kind of assuming it's a 74HC00, and if not that then some other CMOS NAND gate -- but you need to tell us. Also, if you're able, post a schematic. \$\endgroup\$
    – TimWescott
    Commented Aug 17, 2023 at 15:52
  • \$\begingroup\$ I have resistors connected, just outside of view. And yes, its a 74HC00 \$\endgroup\$
    – Rx6rx
    Commented Aug 17, 2023 at 19:13

2 Answers 2


You have an input that is connected nowhere. That is not a valid connection.

You can't know if it will be high, low, neither or both, wiggling rapidly.

You can't leave any CMOS input unconnected, as it can cause excess power consumption and even damage.

  • \$\begingroup\$ Yes, I left it unconnected because I observed the phenomena only on pressing the floating input. \$\endgroup\$
    – Rx6rx
    Commented Aug 17, 2023 at 19:21
  • \$\begingroup\$ Unconnected input picks up interference via capacitive coupling, so if you touch the input you likely transfer mains hum into it and LED blinks at mains frequency, and by touching the wire there is insulation between so you couple mains hum with AC coupling. The chip has some leakage currents that may eventually bias the DC voltage to a level that the coupled AC does not cause transitions. \$\endgroup\$
    – Justme
    Commented Aug 17, 2023 at 19:27
  • \$\begingroup\$ Thank you for answering...:) \$\endgroup\$
    – Rx6rx
    Commented Aug 17, 2023 at 19:57

The unconnected gate input could be floating at pretty much any voltage, as noted by Justme.

You are a large conductor. When you grip the wire, you're forming a capacitor, with your fingers as one conductor, the copper wire as the other, and the plastic insulation as the dielectric. The capacitance will be tiny, but the gate has a very high input impedance.

You are also an antenna, picking up stray electric fields from all the electrics in your home. The capacitance is then coupling those stray AC signals through to the input pin of the NAND gate, changing its state.

  • \$\begingroup\$ Thank you very much. I think I get it now. \$\endgroup\$
    – Rx6rx
    Commented Aug 18, 2023 at 2:25

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.