Electronic – LED tachometer with PIC MCU (requires more current)

ledmicrocontrollerpictachometertransistors

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?

Best Answer

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.