Electronic – Driving LEDs / other small loads with a 74HC06 or similar inverter

cmosintegrated-circuitmicrocontrollerttl

I was recently reverse-engineering some firmware (and other bits) from a router, and spotted that the front panel LEDs were driven from a 74HC06 hex inverter gate chip rather than a proper LED driver.

A little confused, I pulled up the datasheet and found that the chip could drive as much as 35mA, which seems like a cool trick – you can strobe two low-current LEDs at once, save yourself a bunch of separate transistors, and drive everything from a single cheap IC.

After digging around further, I found other inverter and buffer gate ICs that can sink up to a couple hundred milliamps in a small package, with a lower cost than even buying a bunch of 2n2222 transistors. This seems absolutely ideal for driving small loads from a microcontroller.

Is this really a common trick? Am I missing something here? Anything tricky that I should be aware of?

Best Answer

As long as you observe the datasheet limits (as you seem to have done) there are no real tricks here. A typical microcontroller may contain thousands to millions of transistors so tend to be fabricated using processes suited to to higher density logic instead of being aimed at high-current / power dissipation.

Those simple gates / drivers might contain in the order of dozens of transistors so use different processes, so if you find a part where the datasheet meets your needs go for it.

Just as a further comment, in high-volume commercial designs sometimes the reason the 'trick' isn't used is that when machine placed the transistors and a few resistors often work out cheaper.

Related Topic