Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: LEDs + Multiplexer, power limitations ?

  1. #1

    LEDs + Multiplexer, power limitations ?


    This is certainly a basic question and I apologize.

    For a MIDI controller project, I have many switches plus many LEDs (64).
    When the LEDs are all on, the current draw exceeds Teensy specifications.

    I would like to control the LEDs with multiplexers.
    Can I use a bunch of CD74HC4067 to drive the LEDs ? Can they support driving 16 LEDs ?
    How can I power the multiplexers to deliver enough current ?

    If I am on the wrong path, how do you deal with multiple LEDs ?


  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    74HC4067 is good for input signals, but not so good for outputs which drive LEDs. It only connects 1 at a time, and only with a series resistance that prevents driving a LED enough.

    Normally you would want chips like shift registers or GPIO expanders. 74HC595 is the most popular shift register. MCP23017 is among the most commonly used GPIO chips.

    Addressable LEDs like WS2812B might also be worth considering, if you can find them in a size & shape that works for your design.

  3. #3
    Thanks a lot Paul.
    I am going to use shifts registers.

  4. #4
    Senior Member
    Join Date
    Apr 2014
    Some time ago I did a project using a TLC59025 from TI. It basically is a fast standard shift register with 16 constant current outputs. Thus, you don't need all those series resistors for the LED's. Current can be adjusted by a single resistor. Here a cutout of the respective schematic

    Click image for larger version. 

Name:	Capture.PNG 
Views:	13 
Size:	67.4 KB 
ID:	22216

    Very simple and convenient to use. However, looks like there isn't a DIP version if this is important for you. You can even daisy chain them so you can control all your 64 LEDs with 3 lines from the Teensy.

  5. #5
    Senior Member
    Join Date
    Apr 2020
    DFW area in Texas

    I have successfully used the 74HC595 shift register to drive multiple LEDs (40 LEDs plus 2 x 7-segment displays) in my TeensyMIDIPolySynth project (see <this> post for a short discussion). As a nice benefit, you can use a PWM output pin to modulate the output enable (OE) pin of the shift registers for a very nice brightness control, if such a capability is needed/desired.

    Good luck & have fun !!

    Mark J Culross

  6. #6
    Tank you all for your help. I am ready to go !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts