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

Thread: Driving 9 IR Leds with Teensy LC

  1. #1
    Junior Member
    Join Date
    Sep 2015
    Posts
    18

    Driving 9 IR Leds with Teensy LC

    I apologize that this is a pretty basic question, but I'm making a project that uses 8 QRE1113 IR reflectance sensors, and I'm trying to figure out the easiest/most efficient/proper way to power/control the LEDs. I only need to have one turned on at a time as I'm polling the sensors individually, and I want to supply them with around 12 mA. Low power consumption is a priority. Because the Teensy LC only has four pins capable of more than 5 mA, I assume I'll need to use a shift register, LED driver, or Darlington array. I've tested it with a 74HC595 and it seems to work okay, but these are rated for only 6mA per pin (though people seem to use them to drive LEDs all the time). The higher-power shift registers seem to need 5V, and I'd rather keep everything at 3.3. A Darlington array seems like it might be a good choice (I have enough spare pins on the Teensy to devote one to each LED) bit is it overkill?

    Are there any tricks I'm missing to do this directly with the Teensy? I assume I can't multiplex the LEDs because I would need 6 pins, three outputs and three inputs, all capable or sourcing/sinking 12mA, is that correct?

    Thanks very much for your time!

  2. #2
    Junior Member
    Join Date
    Sep 2015
    Posts
    18
    Maybe something like the TPIC2810D LED driver would be my best option?

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,473
    Often this sort of thing is done using a NPN transistor and a resistor between the transistor's base and the Teensy output pin.

    But if you need to control 8 of them, maybe that chip would be simpler than adding 16 parts?

  4. #4
    Junior Member
    Join Date
    Sep 2015
    Posts
    18
    Okay, thanks Paul. I just wanted to make sure I wasn't missing something. I also found the TI TLC5916, which seems like just what I need. I can control it with SPI and use one resistor to set the current for all the LEDs. I think I'll experiment with that and see how it goes. Thanks again!

Posting Permissions

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