how to power 100 leds

Hello everyone. This is my first project with Arduino. I intend to control about 100 LEDs with bit shifters. I need to control each individual led and its brightness. ShiftPWM library seems to work really well. My next question is how the heck do I power this thing?

I just read a little bit about darlington's couple but am still not sure where to start.

Any help leading me to the correct path will be greatly appreciated.

Thank you

1 Like

In a matrix display you are lighting one row at a time. That means that the power requirement for each row is much higher than the power needed for each column. The shift register chips alone probably can't handle the row current because they are intended to drive other logic chips. Adding transistor drivers allows the current for the rows to flow.

First of all thank you for your response. I intend to light all of the LEDs at the same time.

Lets say I only use 64 LEDs. I have an 8x8. I want to be able to control each individual led at anytime. So I could have leds (1, 1) (2, 5) (2, 6) and (7, 8) on at the same time and the rest off.

So I do not believe your idea would work because from what I understand it would only allow to light one row at a time.

Yes it would work because you turn them on and off so fast you think they are on all the time. It is called multiplexing and is a standard technique.

Ahh!! So that's how it is done! Amazing. Where can I learn the basics of this? Any place with a simple tutorial and/or examples?

Some info here:

My post did not describe multiplexing, but there is plenty of information about that on the web.

Any place with a simple tutorial and/or examples?

Well I wrote this to give you the basics of the idea:-
http://www.thebox.myzen.co.uk/Workshop/LED_Matrix.html

However you might be being sidelined here. If 'all' you want to do is light up 100 LEDs then using a simple shift register might do for you. You asked about powering them. You will need an external power supply. Preferably one that gives you 5V and with 100 LEDs at 20mA it will need to be able to deliver at least 2A.

Driving 100 LEDs is not as simple as you might think, it is a lot of LEDs and things do not always scale up easily in electronics. This will require 13 shift registers, these need to be soldered down on strip board or perf board, don't think you can make it on solder-less bread board. The chips need proper decoupling
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html
and you might need to buffer some of the signals to drive that many loads. That is one output from the arduino might have trouble driving 13 inputs from a shift register.

Grumpy Mike your website is awesome! I have been reading through all sections the past few days.

I am a bit confused though. How much of this does the 74HC595 chip do? Does it only light the led's or is it itself using the multiplexing technique?

You can use the 595 shift registers in one of two ways.
To directly drive an LED and not bother about multiplexing at all, you will need one shift register per 8 LEDs.
To provide the signals for either the column or rows. As the source or sink capability of this chip is only one LED you need drivers on one side. The simplest is to have them supplying the current for the rows and then feeding a Darlington transistor array for the columns.

Ok. I have gotten 2 shifters setup with 16 LEDS working with arduino. Can you go into more detail about "drivers"? Sorry I am very new at this and do not have any experience at all. I am familiar with darlington pairing but I'm not sure how I would connect a battery to power all of these.

Would I need equal amount of transistors as LEDs? I a simple circuit would be helpful. Otherwise I can try to make one from my understanding from your website and show you.

If you are just going to use LEDs connected directly to the shift registers all you need is to power the shift register with an external supply of 5V. Connect the grounds of this supply and the arduino together, but not the external 5V and the arduino 5V.
If your external supply is not 5V then you will have to build a regulator circuit, this will be a regulator IC and two capacitors. There are lots of circuits showing you how these are arranged on the web.

oh ok! So I will have at least 10 shifters. Do you suggest I get a constant 5V power source and hook all the shifters in parallel? Is there an ideal current that should be provided to the shifters?

I have also ordered a multimeter so hopefully that will make it easier for me to calculate what I need in regards to voltage and current.

I'd go with an external 5V supply sized on the LEDs you are using.
100 LEDs @ 20mA each = 2A?
So a 5V, 4A supply could supply all the current you need for LEDs, shift registers, and the Arduino board.

I use this one with my fencing scoring machine, has worked well.

http://www.mpja.com/5VDC-4A-Regulated-Plug-Supply-Openpeak/productinfo/18520+PS/

Thanks! Are you power arduino through that or did you just splice up the wires and plug them into the breadboard/project?

I put a panel mount connector on the box, and split out the 5V to the different loads from there.
The two ProMini's were 2 of the loads.
So I guess splice up the wires would be the answer.

It's possible to use 74hc164 for the LEDs, and 74hc595 only for the sink drive.
They are 14 pin, not 16 pin.

Larger matrix boards also may require damping resistors on some control lines, depends how long they stretch on the board, and how fast you update the serial registers.

I had some noise on the LEDs, until I added one 2.4k resistor on the sink drive chip /OE line.
It's still sensitive for touching, maybe due to the crystal which has long leads.

You have to experiment a lot when you build larger matrix, and apply common sense.

Transistors also are problematic for larger rows, there can be brightness variation, as well too much voltage drop (I don't use 5 volts to save power). Digital MOSFETs are good for this purpose.

Of course you can't use the ready-made library when you use 74hc164 together with 74hc595. But the additional code is very minimal. When you send data, you'd switch off the /OE for a short moment.

That all can be confusing but it's better to use smaller ICs (in my opinion).

Your question is how to power 100 LEDs. The more LEDs, the more power is lost, since LEDs never can be supplied directly from 5 volts. If you only use 3 volts, it's much less power lost.

5v/4A supply for 100 LEDs? I use 12v/1A supply for 768 (multiplexed) LEDs. But it's downconverted to 3 volts.