# LED Cube 8x8x8

## Step 14: Choose your resistors

There are three things to consider when choosing the value of your resistors, the LEDs, the 74HC574 that drive the LEDs, and the transistors used to switch the layers on and off.

1)
If your LEDs came with a data sheet, there should be some ampere ratings in there. Usually, there are two ratings, one mA for continuous load, and mA for burst loads. The LEDs will be running at 1/8 duty cycle, so you can refer to the burst rating.

2)
The 74HC574 also has some maximum ratings. If all the LEDs on one anode column are on, this chip will supply current 8/8 of the time. You have to keep within the specified maximum mA rating for the output pins. If you look in the data sheet, You will find this line: DC Output Source or Sink Current per Output Pin, IO: 25 mA. Also there is a VCC or GND current maximum rating of 50mA. In order not to exceed this, your LEDs can only run at 50/8 mA since the 74HC574 has 8 outputs. This gives you 6.25 mA to work with.

3)
The transistors have to switch on and off 64 x the mA of your LEDs. If your LEDs draw 20mA each, that would mean that you have to switch on and off 1.28 Ampere.
The only transistors we had available had a maximum rating of 400mA.

We ended up using resistors of 100 ohms.

While you are waiting for your LED cube parts to arrive in the mail, you can build the guy in the picture below: http://www.instructables.com/id/Resistor-man/
Remove these ads by Signing Up
poinu2 years ago
I just be missing something, if you can't exceed the 50/8 mA rating from the 74HC574 (6,25mA), how can you use 100Ohm resistors?

I = 6,25mA = 0,00625A
V = 5 - 3 = 2Vdc

R = V / R = 2 / 0,00625 = 320Ohm

If I used 100Ohm resistors, I would exceed the maximum current and break the 74HC574, wouldn't I?

I'd really appreciate anything that could help me, thank you very much :)
11 months ago

you won't overdrive the LEDs because as the current exponentially rises in the LED, the chips pin will drop voltage.

2 years ago
I think i figured it out. I am using 74HC595 (so it might be different), but I could not find a DC sink current, instead i found supply current at 70 mA (so i assume this is what he meant). This is the currrent sunk by the chip, and the output current (35mA in my case) is the maximum current sunk by any output pin. If you then use the current you want going through the LED (20 mA in my case), you get this:

I = 20mA = 0.02 A
V = 5-3 = 2V

R = V/R = 2/ 0.02 = 100 Ohm

So that will have 20mA going through each output pin, which is well below the 35mA maximum.
I think this is right, but i could be wrong.
2 years ago
I stumbled on the same question, told myself 100ohms would do, but i really wanted to know why it would work.
I searched some specs about this chip and TI tells the maximum ground current is 50ma .... per output. Which would give 400ma maximum.
Also The PN2222 can hold 600ma ,not 400ma.
Anyone tell me if i am wrong here?
wezeltje2 years ago
would it not be smarter to use a transistor instead of a resistor to regulate the voltage? Due to the the A changing but you want to keep the V the same and the R also? so say you want 3 volt supply you use a transistor and resist the base untill the emitter of the transitor only gives you 3 volts? wouldnt this be a much more stable supply keeping the LED cube a standard brightness?
wingraham3 years ago
Does anybody have a recommendation or preference between carbon film and metal film resistors? Also the site I am looking at offers resisters divided into categories of 1/2 watt, 1/4 watt and 1 watt.
3 years ago
I think they have used 1/4 watt, can somebody confirm?
yww3366003 years ago
WHAT IS THE VALUE OF RESISTANCE R20 --R28???

Thanks!
brandon2483 years ago
Could you use 8 resistors (one per cathode layer) instead of 64 (one per anode column)?
3 years ago
If you did that, I believe you may have some undesired brightness effects. In using 64 resistors, and the fact that only 1 layer can be on at a time, each resistor will always only see 1 LED on at a time, with the exact same current flow. However, using 1 resistor per layer, you could have anywhere from 1 to 64 LEDs on at any given time. This causes a huge difference in the current flow through the resistor. If you remember Ohm's law, V=IR, for a fixed value, R, if you increase current flow, I, ie turn on more LEDs, your voltage drop V across the resistor R will increase. This in turn can cause your power supply some issues and may cause your LEDs to dim if many in the same layer are turned on at the same time. You would also need a resistor with a much higher power rating to be able to dissipate the heat generated without damaging itself.

In short, I would not advise skimping on the resistors. If the resistor saw the same load every time, then yes, this would work, but this is a dynamic array which makes regulation much more difficult per layer.

As an example, lets compare the extremes. Say you have a regulated 5V supply, and use Blue LEDs. The V(f) for Blue is ~ 3.2V @ 20mA. For a single LED, you would want a resistor of approximately 90 ohms for current limiting. This is found by: (Vsource - Vf)/(Imax) = (5 - 3.2)/0.02 = 90. Use the next highest standard resistor value to ensure you don't exceed the standard max current of the device to ensure a long life.

The power dissapation by a 100 ohm resistor in this application would be: I^2R, or (Vdrop/Rresistor)^2*Rresistor = [(5-3.2)/100]^2*100 = 0.0324 Watts. It is typically good practice to oversize resistor power ratings compared to what you expect to see in service.

Now, if you have all 64 on at once:
64*0.02A = 1.28 Amp at max rating. The resistor choice for this scenario would then be: (5-3.2)/1.28 = 1.4 Ohms. We chose a 1.5 Ohm in this case, which makes the current: 1.8/1.5 = 1.2A, or 18.75mA per LED.

Power dissipation by this resistor is then: [(5-3.2)/1.5]^2 * 1.5 = 2.16 Watts. This means you should probably use a 5 Watt resistor, which is pretty large.

Now, if you use a 1.5 Ohm resistor and only 1 LED is on, you will almost certainly fry that LED. If you use a 100 Ohm and 64 LEDs are on, they may not even light up, or will be extremely dim due to the voltage drop in the resistor.
3 years ago
WHAT IS THE VALUE OF 64 RESISTANCE?
StarGazerBob3 years ago
I am a little confused about overdrawing the transistors. I've already purchased 1000 3mm blue LEDs,rated at 3.0 VDC and 20mA. My power supply delivers 5.00 Vdc. Step 2 above makes it sound as if I draw more than 6.25mA per LED and all 8 LEDs are lit, that I risk overdrawing the transistors. If this is true, how could one use 100 ohm resistors?
Any help would be appreciated.
3 years ago
Resistors on LEDs don't protect the power supply, they protect the LEDs themselves.
Take a look at the schematic. The current gets drawn from 74HC574. Considering it's max current output is 50mA, LEDs actually can't draw more than that. That means that transistors sink 8*50mA = 400mA. What's more, we have 2 of those transistors for every line, therefore we could actually sink 800mA. Everything's fine :)

What's more, in PN2222 stylesheet it says that Collector Current - Continuous maximum rating is 600mA, not 400mA ;)
3 years ago
So the statement "you have to switch on and off 1.28 Ampere" should read 400mA instead? If we turn on all LED's (on all layers for sake of argument) you are saying we will draw 400mA max (not including the circuitry to drive it all)? So, if I am reading this right, the LEDs will get quite dim, wont they? If the 74HC574 can only support 50mA, then 3 20mA LED's is already starting to dim, correct? Or will the 74HC574 allow 60mA through, and start getting hot because of it? Would you need a transistor on each of the 64 lines in order to provide full current?
3 years ago
Just to clarify, I'm refering to substep 2) of Step 14 in this Instructable.
Vick Jr3 years ago
What should we use for the pull-up resistors on the layers? Also, if I use the same LEDs as you, I assume I should also get 100ohm resistors?

Thanks!
Vick Jr3 years ago
I've read in other 'ibles that if an IC can't handle the current you want, you can "piggyback" it by soldering the pins of one to the same pins of another and using them together, thus doubling the amps.

Would this be applicable/ advisable here? Could you do it for transistors?
llb4433 years ago
I am also stuck on this step...
My LEDs have:
Current: 25mA.
Forward voltage: 1.9V.

Could anyone advise on what value resistors to use?

I have been following this instructable very closely, choosing the exact same components as mentioned. But, would it be better to choose transistors that can output 1.6Amps (25mA x 64).

I am unable to see how you reached 100 ohms, what are the current and voltage of the leds that you used? (maybe then, i could work out where 100 ohms came from)

3 years ago
I=25mA
Ud=1.9V
U=5V

Ur=5-1.9=3.1V

R=Ur/I
R=3.1V/0.025A = 124 Ohm

100 Ohms come from
R=(5V-3V)/0.02A=2V/0.02A=100Ohm
3 years ago
Thanks alot. That number came up a few times in my attempted calculations. But I was uncertain whether the resistor was meant to reduce the current further based on the maximum rating of 74HC574. Thanks alot.
rclayled3 years ago
Here is a handy resistor calculator - http://ledcalculator.net/   Just fill in your power supply voltage (V), LED voltage drop (V), LED current rating (mA) and number of LEDs (I used 64).  This is a quick way to determine the resistor value (and a lot of other useful data after the results.
3 years ago
It's nice, but it doesn't work as we want for LEDs with Vf < 2,5V (like orange ones). Why not just use the formula greyphox posted below?
Sentavera3 years ago
Hello there,

I am little confused with the 74HC574 chips, since only one layer of cube are turn on at a time. So my question is, if all the 8 leds are turned on and it will required 20mA x 8 = 160mA for a 74HC574 chip to supply and fully lid all the 8 led. However, the max Icc for the chip is about 50mA and is it all the 8 led will be having some brightness issue?

any explanation will be appreciated.
MrGentlemen3 years ago
I want to buy the parts as soon as possible, so PLEASE can someone explain how to calculate the correct Resistors?! *pleasing on my knees*
freaked13 years ago
i also dont get the calculation of the resistors right!

could someone PLEASE explain (maybe with an example) how to choose the right resistor for "not so advanced" users!