Looking for a driver chip for 16 LEDs, 1 LED at a time, DIP package

I have 16 LEDs and I want to light each of them every millisecond, one at a time for as little as is needed to reliably read the analog value from all the 16 reflection sensors lit by the LEDs. So, every LED might be needed to run for a few microseconds every millisecond.

I don't want to run all of them simultaneously purely for energy-saving reasons because the project will run on batteries and 16x20mA would drain the batteries too fast.

I'll use Arduino RF-Nano, 5V.

At first, I was considering 16-bit shift registers, but then I discovered dedicated LED constant current driver chips, which have the bonus of requiring a single resistor to control the current of all LEDs.

However, almost none of them are available as DIP. I would like DIP for both prototyping and also using them in sockets on my final PCB, so that I can quickly swap them in case I do something stupid and fry the chip.

The only DIP options seemed to be MAX6969 (or MAX6971). But I could not find those where I live.

MAX7219 is popular and available as DIP everywhere. However, it's 8x8 matrix driver and as I understand, it is not possible to control its internal multiplex frequency, so I cannot use it for strictly controlling the time when a specific LED is on :frowning:

Am I missing any better options for lighting one of 16 LEDs for a controlled amount of time with minimal wiring and with through-hole components?

Or should I just give up and try one of SSOP options? I'm afraid my soldering skills are not good enough to deal with 0.63mm pitch, but maybe it's not as scary as it seems, especially when using those small SSOP-DIP adapter boards.

Also, I have to choose among a variety of options: TLC59281, TLC59282, TLC5926, TLC5927, TLC59025, FD9802, MBI5025, MBI5026. I'm not fully sure which would be better for this task - some of the chips have a group delay, so maybe I should avoid those. And maybe I'm missing something even better than the options I mentioned?

How about these
TLC5916
TLC5917

Those are 8-bit, so I would need two of them, and that would take more space and need more wiring/traces. But I could consider them as the last option if there's nothing better.

How about RGB strip, like the WS2812. One pin to control any mumber of individual LEDs with no external chip required.

Then your only other choice is an SMD package

Not an option in my case - the LEDs are built into the reflection sensors and have to be used that way.

I found one older option DM13A - seems to be available in some places, although I don't quite trust the supplier's quality.

I'm not sure that TLC-like drivers meet your requirements for precise control on time of LED. Don't these drivers use PWM to control the output current? If so, wouldn't that be a problem? I am interested in what kind of sensor you are using that is capable of responding in microseconds.

Sounds like a PCA9685 might be able to do this. IIRC it has timing modes where one channel is triggered after another.

While this is not a DIP part, it's easy to obtain in a convenient module form and libraries are available for Arduino use.

Otherwise I'd recommend biting the bullet and learning to solder SMD. You may find it's not as daunting as it may seem. There are little PCB's with common SMD footprints that you can use to solder the IC's of your choice onto, with breakouts to regular 2.54mm pitched pins. This route would considerably widen your options.

I was worried about PWM too, so I tried to skip the chips that mentioned built-in PWM in their specifications, but still I'm not fully sure if it's not present even if not mentioned. At least, some specs say that we can implement our own PWM by rapidly pulsing the global on/off pin. So I assumed that if the specs recommend this, it would mean that there is no PWM built in at all.

Regarding the sensor part - it's a QRD1113 or QRD1114. I hope it should be able to read the analog input value of the phototransistor. At least I have seen one successful project where person used similar approach to rapidly turn on one of 8 QRD1113 LEDs, then measuring the output, and then switching to another LED, and repeating it every millisecond. But they were using direct connection to Arduino instead of multiplex.

Umm. Your "sensor" is a paired emitter and detector. Would it be possible to ensure 1:1 exposure, that is, if one emitter is turned on, only it's associated detector could possibly be exposed? If so, why not only enable a single emitter at a time, and simply tie all detectors in parallel?

Right, and that's exactly why I need an LED driver chip to turn those 16 emitters (LEDs) on / off one by one.

If you are going to run the LEDs at 20-25mA, you could use Charlieplexing.
16 LEDs would only need 5 pins

1 Like

You could also use a 4067 16:1 multiplexer, which guarantees switching on only 1 at a time. Although they're commonly thought of as input multiplexers, they're rated for 25 mA continuous, and you can do what I'm describing with them. All you need to do is drive the four address pins, and the Enable pin if you want to shut it down between scans.

How close together are your sensors? Is this scattered across many meters, or contained within a small area?

Thanks, good idea, haven't considered using those as LED drivers. But they might need a separate resistor for every LED? Or maybe I could share a single resistor and connect all LEDs together?

All the sensors will be in the same box, about 20x10cm.

Are you running the LEDs at 20mA?

@jim-p solved it. Charlieplex the LEDs. 5 pins, 5 resistors. That's all.

"connect all LEDs together?"
Thought you wanted only one on at a time???

Charlieplex is simpler, less hardware, if you can pull off the coding; sounds like your physical arrangements allow it. Charlieplexing LEDs across many signals in an 8' x 8' x 8' cube isn't the same thing as Charlieplexing LEDs across an 8" x 8" x 8" box.

But, if you go with the mux (for simplicity or distance reasons), I'd wire from GND thru each LED to each mux input, and wire the mux output via resistor to +5V; that allows you to distribute only the mux inputs and GND to your LEDs, keeping your +5V local. UNLESS you find you need to vary the resistance to get higher intensity or what have you in a particular location, there's no need to have unique resistor-per-LED arrangements. 20 mA should be plenty, and pulsing at 1/16 even if scanning continuously means you won't be taxing the mux; No Arduino pins are sourcing/sinking significant current in this scenario. If your installation may be subject to rough handling/ static electricity, etc., buying an extra mux is a no-brainer; I might even consider using a mux for the detector side as well in that case, addressing both simultaneously. From the datasheet of the 4067:

These analog multiplexers/demultiplexers control analog
voltages that may vary across the voltage supply range.
They are bidirectional switches thus allowing any analog
input to be used as an output and vice-versa. The switches
have low β€œon” resistance and low β€œoff” leakages. In addition,
these devices have an enable control which when high will
disable all switches to their β€œoff” state.

Always remember, the Arduino itself is not a robust, industrial product; if used in such circumstances, it's best to plan for replacement, or use a product with better protection.

@progmars don't worry about the coding, it's actually very simple.