# Power supply for medium-scale 74HC TTL circuit

I've developed an 8-bit computer, in the same vein as Ben Eater's wonderful 8-bit computer series. It's based on a collection of 74HCxx-series ICs, and fits (in theory!) on a single PCB board. I'm currently analyzing power supply requirements, and suspect 5 V, 2 A might not be enough.

My components, and their peak current draws, are roughly:

• 10x 74HC04 (Not gate): 20 mA
• 49x 74HC08 (And gate): 20 mA
• 18x 74HC32 (Or gate): 20 mA
• 29x 74HC86 (Xor gate): 20 mA
• 12x 74HC157 (2x nibble multiplexer): 20 mA
• 9x 74HC273 (8-bit Register): 20 mA
• 4x 62256 (32-kilobyte RAM): 70 mA
• ~50 green LEDs: 20 mA
• Handful of others

Back of napkin math suggests max. ~4 A, but this feels very high. Based on number of components, what would be a reasonable power supply for such a circuit?

• HC is not TTL type but CMOS type. Each logic gate would surely not consume 20mA unless you put 20mA worth of load on it. If all your LEDs are on, it would already consume 1A. And it would be sufficient to run them at some bright enough current, instead of forcibly at the rated 20mA. Commented Nov 27, 2022 at 0:37
• 20W: you can get that in a wall-wart, but 74HC will have different power draw depending on how high the clock speed is. Commented Nov 27, 2022 at 0:43
• You can definitely save some current on the LEDs. Most cheap LEDs are perfectly visible with 5 mA through them (you may find that 20 mA is too bright, even), and I've even used one for a power-sensitive application before that's visibly on with less than 0.5 mA. Commented Nov 27, 2022 at 0:46
• @Hearth I've used the high efficiency LEDs (2 mA) at 500 uA and they are (to me) just fine. I like them. Pricier, though, back when I was considering them more.
– jonk
Commented Nov 27, 2022 at 1:26
• As SamGibson suggests, these numbers doesnt make sense at all. The 74HC08 draws a maximum of 20uA. Same as the '04. You are a factor of 1000 off... Commented Nov 27, 2022 at 18:52

Are you really running the LEDs at 20mA?

Most modern LEDs when used as indicators only need 1-2 mA to be adequately bright. I usually use a 1k or 2.2k resistor for the LEDs when driving them from 5V rather than the 220 ohm as in the linked reference.

The LEDs will probably be the dominant consumption and if you run them at 2mA each that is a total of 100mA when all lit.

CMOS logic consumes sub-microamp supply current at room temperature when idle and only a very short burst of current when actually switching. Most of the logic at any moment will not be changing state so will consume very little current.

What frequency are you running the logic at?

The power consumption of CMOS logic increases proportionally with frequency of operation.

The link you reference only uses a few hundred Hertz for the clock in which case the total logic consumption will be very low, maybe only a milliamp or two.

I expect the power supply you already have will be more than adequate.

Do ensure that you have adequate decoupling for all devices - the surge of current can cause problems because of the inductance of the power wiring.

• Thank you - this sounds much more reasonable to me. Commented Nov 30, 2022 at 15:54

Chances are that your current is going to be overwhelmingly dominated by the LED currents. Those CMOS parts draw almost no static current, and a dynamic current will only come into play if you have many MHz clock frequency. As others have said, I would suggest much lower LED currents. Try and see what is acceptable, but 1-3mA is probably more than adequate. So use appropriate resistors to get that current. I would be very comfortable with a vanilla 2A supply as used for a Raspberry Pi unless you insist on blindingly bright LEDs (and even then, that would leave a huge 1A for everything else, so you'd still be okay).

Here is an emulated 4-bit microcomputer with visible registers, PC, ALU and a block of memory (a "badge" about 180mm x 90mm). It runs from 2 AA batteries drawing about 20mA average total as shown! The LEDs are not crazy bright in an office setting, but are very visible in somewhat subdued light.

4A at 5V is 20W: you can get that in a wall-wart.

But 74HC will have different power draw depending on how high the clock speed is. If 2A is not enough, just reduce the clock speed until it is.