Electronic – arduino – how to drive 5×5 IR LEDs with 100 mA, using Arduino

arduinocurrentledmatrixtransistors

I am trying to do my first Arduino project, and I would like to drive a 5×5 matrix of IR leds. I would only like to have one switched on at a time.

I understand that in an array I can do it with 5 lines for anodes and 5 lines for cathodes. My problem is that I cannot supply 100 mA with an Arduino.

What would be the easiest way for me to supply 100 mA for these leds? I think they don't need current limiting, if I could drive them with 1.35 V voltage, it would work perfectly. I've measured a couple of my LEDs and they used exactly 100 mA at 1.35V.

I know that I can use a transistor for supplying a higher current power source, but I don't understand that how could I do it with a 5×5 LED matrix. How many transistors do I need? 5 or 10? And if I need 10 transistors, then I understand the 5 which supply 1.35 V, but what are the other 5 doing? How can a transistor supply 0 V?

Or, as an ugly trick, I was thinking about using a Mega, and for each line, using 3 pins in parallel. I mean one pin has a current limit of 40 mA, so 3 pins would be enough for 100 mA. That way I wouldn't need to care about an other power source, and transistors. I could just run the whole thing from USB. All I would need would be 5 resistors. Is that a good option?

Or, as an alternative, I was thinking about using Rainbowduino in itself. It has current limiting, and in theory I could possibly run the whole thing from 5V USB. But it seems really complicated to just control 5×5 LEDs. I don't understand the whole idea about source driving the anode and current driving the cathode! Isn't it a circuit, I mean we either set the source, or the current? And why does the anode has 500 mA current limit, while the cathode has 120 mA? So while it looks good on paper, I think I'm really not on a level to understand how it works.

All I would need is to control 5×5 LEDs, where each of them would require 100 mA @ 1.35 V. What would be the best way you’d recommend me doing it?

Best Answer

First, a safety warning

25 IR LEDs at 100 mA each will be a LOT of IR radiation. If they're close together, your pupils are dilated (indoors, this is often true), and/or you're close to the matrix, you could really hurt your eyes.

The image of the matrix will be focused to a tiny area on your retina, and you'll hear/feel a little pop as the blood and fluid there boils. You'll have a permanent blind spot. Not fun. BTW, it's your job to make sure that you understand what you're doing and don't hurt yourself, not mine. I'll help you begin understanding, but I won't be held responsible.

My advice: For development (and production if possible), put bright green LEDs in series and physically close to the IR LEDs so that your blink reflex is activated at a bare minimum. Use hardware (in addition to software) techniques to limit the number of LEDs lit and/or the power delivered to the matrix to help ensure that only one LED is on at a time.

Techniques

There are many LED driving techniques. None of them hinge on delivering 1.35V; that will change between LED batches, over time, and with temperature.

If you're just interested in current limiting, a few transistors will be sufficient. The total transistor count will depend on your choice of a current limiting circuit topology, which is dependent on your heat sinking capabilities, routing area, and other contstraints. There are also voltage/current regulation ICs and linear LED drivers which would simplify your job. If you're interested in power conservation, many buck converters can be configured for current limiting, which would maximize your battery life.

You may want to have unlimited sink and limited source (or vice versa). Alternatively, you might have just one current source, and mux it between the various LEDs. Because of the safety issues inherent in this project, I'd recommend the latter option.