I've been working on an LED tachometer that will be installed on an open wheel race car. After putting the order through for the PCB I re-calculated the current draw and turns out the PIC's (16F877A) IO pin will not source enough current to drive 15 individual LEDs. So I have been searching for ways to drive multiple LEDs with more current. Each LED will draw approximately 35-40mA and 16F877A's source/sinking current is 25mA.

Most of my findings seem to point to transistors, using MCU's output as a control. After drawing a sketch on a notepad I noticed I'd need 1x transistor for each LED -- I think this will make the PCB/design quite big considering this LED array will be installed on the steering wheel.

So is there a way to drive multiple LEDs without having a transistor for each of the LED?


2 Answers 2


There are several 16-channel constant current LED driver ICs sold specifically for the kind of requirement described.

For instance:

  • Texas Instruments TLC5940: 16 LED channels with PWM, up to 120 mA each. Perhaps the most well-known, with open source libraries available for many common microcontrollers.
  • ST Microelectronics STP1612PW05: 16 LED channels with PWM, up to 60 mA each
  • Linear Technology LT3754: 16 LED channels with PWM, up to 50 mA each
  • Allegro A6282: 16 LED channels, up to 50 mA each
  • OnSemi CAT4016: 16 LED channels with PWM, up to 100 mA each
  • NXP PCU9955: 16 LED channels with PWM, up to 57 mA each

Each of these ICs is controlled using some form of serial interface, such as I2C or SPI, and at sufficiently high clock rates that a tachometer, even one with fading LED and peak highlight effects, can be implemented.

If one of these ICs is used, not only will all the LEDs be controllable with a single component, the need for individual current limiting resistors on all 15 LEDs will also be eliminated.

So, just one IC and a few supporting parts, plus serial control from your microcontroller.

Another alternative is to use some form of multiplexed LED driver, such as the Maxim MAX7219, which besides its well-known job as a 7-segment 8 digit display driver, can also be used to drive up to 64 individual LEDs, where any one LED will be lit and drawing current at a time, hence the concern about current draw will be taken care of.


For practical applications Anindo's answer is probably best: just get a pre-existing LED driver and follow the driver's appnotes.

If you're interested in a more discrete solution, you can create a discretely multiplexed circuit.

The idea is to split the LEDs up into near-equal sized groups. The number of groups and LEDs in each group should be as close to each other as possible for minimum component count.

For example, if you have 15 LEDs using 3 groups of 5 would work well. 5 groups of 3 will also work, as will 3 groups of 4 and 1 group of 3. The number of total pins/transistors required = #groups + max #LEDs/group. So in each of the above solutions you would need 8 transistors. The exact mix of NPN's/PNP transistors you will need depends on how you hook things up.

Then for each group tie all of the anodes together. You can then use a PNP group-driver transistor to determine which group is going to be turned on. On the other side, you connect the group LED selector pins. So the first LED in each group would have their cathodes tied together, the second LED in each group would have their cathodes tied together, etc. Each LED selector pin is then driven using an NPN transistor. If you tie all of the NPN transistor emitters together you can get away with a single current limitting resistor. Note that the bases of the PNP transistors will still all need separate current limiting resistors.

So the total BOM count:

8 transistors (depending on grouping, mix of NPN/PNP will vary. Can also use MOSFETS).

4-6 current limiting resistors, depending on how many groupings you have. One will determine the LED drive current, the others are just for limiting the PNP base current.

A quick schematic with 3 groups and 5 LEDs per group:


There's also a similar schematic which uses a common cathode configuration.

Now to drive the LED's:

Rapidly switching between different groups and turning on which LEDs in that group you want on. If switched rapidly enough (>120Hz will probably do) the LEDs can be made to appear like they're all on.

Like I stated above, this solution while theoretically works well probably won't work as well as the package solutions Anindo posted. Some LED drivers may even function this way internally. A single package is usually easier to deal with, will likely result in a smaller PCB, and potentially requires fewer control pins on your MCU.

  • \$\begingroup\$ To add to this, if going with NPN and PNP transistors, there are several 8-channel source driver ICs e.g. UDN2981, and similarly sink driver array ICs, that can be substituted - no biasing resistors needed, straight logic drive. As well, regular NPN and PNP transistor arrays exist in 4-transistor and higher configurations, e.g. LM3045. Lower part count, less construction effort, and less PCB real estate than discretes. \$\endgroup\$ Feb 14, 2013 at 16:01

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.