0
\$\begingroup\$

I want to use a Neopixel LED strip, with 20 LEDs. I am using an ESP32 chip. Hence I need a level shifter. I have decided to use the 74HCT04ADG because it is cheap and most importantly still in stock at most suppliers.

Since this is IC accommodates 6 "devices" and I only need to use one pin (1A to ESP32 and 1Y to Neopixel LED), do I need to ground all the other unused pins (3,4,5,6,8,9,10,11,12,13) or can I leave this unconnected on the PCB?

enter image description here

Secondly, I have also made provision for a second-level shifter on the PCB (SN74AHCT125), should stock run out of the above. Again I am only using pins, 1OE, 1A, and 1Y. Where pin 1 (1OE NOT) is grounded. Do I need to again in this case use a pull-up 10k resistor to 5V for the other OE pins (2OE, 3OE, and 4OE) and then ground the other pins (5,6,8,9,11 and 12) or can I leave them unconnected on the PCB?

enter image description here

\$\endgroup\$
4
  • \$\begingroup\$ There are single-gate options available, e.g. 74AHCT1G14 \$\endgroup\$
    – Mat
    Nov 1, 2021 at 19:36
  • \$\begingroup\$ @Mat I also see the 74HCT04 is an inverted output as your IC also. Does this mean I need another not gate at the output so the input matches the output? (so the output is not inverted) \$\endgroup\$
    – JoeyB
    Nov 1, 2021 at 19:53
  • 1
    \$\begingroup\$ Or invert in your code. Or, well, use a level shifter rather than logic gates. There are single gate level shifters available too. \$\endgroup\$
    – Mat
    Nov 1, 2021 at 19:55
  • \$\begingroup\$ @Mat can you provide a few or one that I can use? \$\endgroup\$
    – JoeyB
    Nov 1, 2021 at 19:57

1 Answer 1

2
\$\begingroup\$

Just be aware that the 74HCT04 is an inverter. If you already have a signal that can't be inverted, then you can't use a single gate of 74HCT04. Either invert it twice in hardware or once in software and once in hardware.

What you suggest to do with the pins won't work.

No, you can't leave unused CMOS inputs floating, and you can't short circuit unused outputs to ground. Those are the basic rules of CMOS chips.

Since the 74HCT04 is an inverter, connecting input to ground would make the output high, so connecting the output to ground would not make sense.

And you don't need any pull resistors for unused inputs of 74HCT125 either, like you did not for 74HCT04.

\$\endgroup\$
2
  • \$\begingroup\$ Since I am not using the output enabled (74HCT125) for 2 to 4 I will connect them to Vcc straight and also connect all inputs 2A,3A and 4A to the ground. Is this okay? \$\endgroup\$
    – JoeyB
    Nov 1, 2021 at 20:54
  • 1
    \$\begingroup\$ It does not really matter how you connect the unused inputs to VCC and GND. Whatever is easiest. \$\endgroup\$
    – Justme
    Nov 1, 2021 at 20:59

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.