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 adsRemove these ads by Signing Up
poinu says: Dec 26, 2011. 11:28 AM
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 :)
lnr0626 in reply to poinuFeb 26, 2012. 12:39 PM
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.
potkart in reply to poinuJan 14, 2012. 7:17 PM
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?
triumphtotty in reply to potkartJan 20, 2012. 4:50 AM
Just as a general comment, some components from different manufacturers with equivalent part numbers have different ratings. That's why Googling for a generic data sheet is usually a bad idea, e.g. some TI 74HCxxx chips have 50mA total handling, whilst the equivalent chip from NXP might have 70mA. The xxx part determines the functionality, and the logic family (e.g LS, HC, AC) defines the type of logic electronics used. Neither defines the power ratings, and different packages, e.g. DIP vs SO, will have different power dissipation characteristics too due to different surface area, dissipation through contacts etc.

For this project, the 74HC574 is OK.  Although you will be drawing peak currents above 50mA, the average won't be 160mA even with the whole cube lit up.  Probably closer to 100mA allowing for interrupt duty cycles (everything is "off" for a chunk of the latching time), and line and component losses in the wiring and transistors.  I decided to use 74AC574 chips "just in case" and after running my cube for hours, they don't have any heat in them.  Most of the effects only have around 20-100 LEDs on at any one time, which averages out at about 30mA per 74XX574.  Well within their spec.  If you had every LED lit for hours it might be a different story, but then you'd just have a big 512 LED lamp.  There are better, simpler and cheaper ways of achieving this.  :o)
potkart in reply to triumphtottyJan 22, 2012. 1:22 PM
Thanks for the answer.
wingraham says: Nov 26, 2011. 11:52 AM
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.
dabamrak in reply to wingrahamDec 5, 2011. 12:08 AM
I think they have used 1/4 watt, can somebody confirm?
tarPancake in reply to dabamrakFeb 20, 2012. 8:48 AM
yes, 1/4 watt
wezeltje says: Feb 10, 2012. 2:52 PM
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?
yww336600 says: Sep 3, 2011. 1:29 AM
WHAT IS THE VALUE OF RESISTANCE R20 --R28???

Thanks!
thangpc26_cool in reply to yww336600Sep 4, 2011. 8:54 PM
hi,yww336600.

I do not have Pro accounts can not doawloading ledcube 8x8x8.ban code can give me please a code ? if so please send me your mailbox: thangpc26_cool@yahoo.com
brandon248 says: Jan 12, 2011. 5:32 AM
Could you use 8 resistors (one per cathode layer) instead of 64 (one per anode column)?
greyphox in reply to brandon248Jan 13, 2011. 7:52 AM
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.
vijirvy in reply to greyphoxSep 1, 2011. 1:34 AM
WHAT IS THE VALUE OF 64 RESISTANCE?
TechNotes in reply to vijirvySep 1, 2011. 1:39 PM
100 Ohm
yww336600 in reply to TechNotesSep 3, 2011. 1:20 AM
i use the resistors of 1K
StarGazerBob says: Feb 20, 2011. 2:49 PM
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.
de-es in reply to StarGazerBobApr 26, 2011. 1:54 PM
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 ;)
ids in reply to de-esJul 25, 2011. 3:06 PM
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?
StarGazerBob in reply to StarGazerBobFeb 20, 2011. 5:00 PM
Just to clarify, I'm refering to substep 2) of Step 14 in this Instructable.
Vick Jr says: May 29, 2011. 2:10 PM
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 Jr says: May 26, 2011. 8:24 AM
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?
llb443 says: Apr 22, 2011. 11:48 AM
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)

Thanks in advance
de-es in reply to llb443Apr 26, 2011. 1:59 PM
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
llb443 in reply to de-esMay 6, 2011. 1:08 AM
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.
rclayled says: Feb 7, 2011. 10:13 AM
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. 
de-es in reply to rclayledApr 26, 2011. 1:56 PM
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?
Sentavera says: Apr 23, 2011. 10:36 PM
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.
MrGentlemen says: Jan 31, 2011. 10:26 AM
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*
freaked1 says: Jan 30, 2011. 10:42 PM
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!

thanks in advance

(please excuse my bad english, i´m austrian)
MrGentlemen says: Jan 28, 2011. 10:33 PM
I dont understand how to calculate the resistirs for the leds.
did i need to calculate all the values from the IC, transistors and LEDs together or what?
Its confusing
phazerave says: Jan 23, 2011. 11:24 PM
im relatively new to electronics but Im a fast learner, can someone look at this light and recommend a resistor for it? i dont want to mess up the resistance.

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=120645595496#ht_2977wt_1134
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!