RGB SMT LED Cube, resistors, drivers, and shift registers.

The resistors I have are old leftover ones from who knows... They are partial packets of 5 from radioshack. I dont think I have more than 3 of any one value. But I suppose, If I can find 3 sets of 3 leds, I could make 3 different sets of voltage dividers. I also have some broken routers and things i can pull parts from, but they are tiny (like 0402 or 0603), and hard to solder wires to.

I've been reading about MAX7219/7221 chips, they are common cathode drivers, Is there a good reason why I shouldnt try to find some of those?

Also, the local electronics store only carries NTE parts, so if there are NTE parts that might work, I might be able to get the part locally.

Am I right in thinking that for each plane you have a sepreate cathode connection and that all the cathodes are not connected together on each plane? Otherwise it would never work would it.

Have you done any tests to see how these LEDs look when they are on, if you need diffusers or what current you need to run them at.
Once you know the current for each LED you can then work out how much current to sink with the cathode sinks, you might need a FET here.

You then can look into how to provide that current at the anodes.

Grumpy_Mike:
Am I right in thinking that for each plane you have a sepreate cathode connection and that all the cathodes are not connected together on each plane? Otherwise it would never work would it.

Have you done any tests to see how these LEDs look when they are on, if you need diffusers or what current you need to run them at.
Once you know the current for each LED you can then work out how much current to sink with the cathode sinks, you might need a FET here.

You then can look into how to provide that current at the anodes.

You are correct about the each plane having a separate cathode connection (4 cathodes, 48 anodes), but all the cathodes per plane are connected (thats 48 cathodes tied together per plane as the LEDs have 6 leads)

I did many tests on the LEDs at 3.3vs to figure out the forward voltage on the LEDs. I figure at 5vs I would need about 100 ohm on the red, 150 on the blue/green. At 3.3v, I need around 50-75 ohms on the red, and maybe something on the blue, im not too sure. I had a an LED hooked up to the 3.3v with a couple resistors, with the 3 leds lit, it seemed a bit blue, and Im guessing that it should be white.

Nearest I can tell, the forward voltage on the red is 2.15, and the blue and green are about 3.3v (That is to say, if I want 20 ma per LED, then those are the approximate voltages)

I have been experimenting with making some voltage dividers to try to hook up some shift registers, to get them to output 3.3v my lack of parts is making it hard, but I have found bunch of tiny 4.7k resistors, and I'll be messing around with them this morning.

but all the cathodes per plane are connected (thats 48 cathodes tied together per plane as the LEDs have 6 leads)

You mean anodes here don't you. It is the cathodes that are negative that are connected together.
The LEDs are capable of 60mA so you intend to run them at 20mA, is that right.

Do you know when you start multiplexing them they will look dimmer because they will only be on for one quarter of the time. One way round that is to boost the current.

If you are using resistors then there is no point in running the shift registers at a reduced voltage, you just alter the value of the resistor.
So given a 5V feed what values do you come up with for a 20mA current?

my lack of parts is making it hard

Resistors are less than a penny each unless you pay vastly inflated prices.

I've been reading about MAX7219/7221 chips, they are common cathode drivers, Is there a good reason why I shouldnt try to find some of those?

The reason is that you cannot control the brightness of each individual LEDs. Also they will not work with the way you have wired it up.

Grumpy_Mike:

but all the cathodes per plane are connected (thats 48 cathodes tied together per plane as the LEDs have 6 leads)

You mean anodes here don't you. It is the cathodes that are negative that are connected together.
The LEDs are capable of 60mA so you intend to run them at 20mA, is that right.

Do you know when you start multiplexing them they will look dimmer because they will only be on for one quarter of the time. One way round that is to boost the current.

If you are using resistors then there is no point in running the shift registers at a reduced voltage, you just alter the value of the resistor.
So given a 5V feed what values do you come up with for a 20mA current?

my lack of parts is making it hard

Resistors are less than a penny each unless you pay vastly inflated prices.

I've been reading about MAX7219/7221 chips, they are common cathode drivers, Is there a good reason why I shouldnt try to find some of those?

The reason is that you cannot control the brightness of each individual LEDs. Also they will not work with the way you have wired it up.

I do mean I have 48 cathodes tied together per plane (aka common cathode) There are also 48 anodes per plane that need to be individually controlled, they are connected to the copper wires in my photo, the silver colored wires are the cathodes. Basically, the cathodes connections hold each plane together, and the 48 copper wires hold the planes up. Using copper for the anodes (+), and zinc coated wire for the cathodes (-), was not an accident, I did that intentionally to make it obvious which is + and which is -.

Resistors around here are about 25 cents each, so 48 resistors will cost $12. assuming I only buy the right ones, and dont have any problems. I ordered shift registers online a month ago, and they cost $5/20. A shift register, and a resistor are basically the same cost to me. 48 resistors will make things quite messy too, I would probably want to hide that mess under the cube, but keep the shift registers, and nano, neatly next to the cube, for display, but im still not sure how I will mount/display the cube.

Since there is no way to run the shift registers at the low voltage that the red LEDs need, I will need a minimum of 16 resistors, or a constant current driver. I havnt messed around with PWM yet, but I expect to do PWM, shiftPWM or otherwise...

I havnt done much testing at 5v, my guess is to get 20ma, I will need 100ohm for red, and 150 for blue and green. Im still not too sure about how much current each LED needs for even brightness/color.

The whole point of running the shift registers at lower voltage is to reduce the amount of parts. If I only needed 4 resistors, I could live with that, but 48 is going to expensive, ugly, and more effort.

I have a few of these ULN 2003a chips, they are transistor or diode arrays? Could those be helpful?

making voltage dividers with 0402 resistors is very difficult, but I managed to make 3 of them with 4.7k resistors, and soldered them up to my old cubes shift registers, and it lights up, but its not working right, its acting crazy. It could be my dividers are not working right, I dunno.

Resistors around here are about 25 cents each,

WHAT!!!

You need to order them on line, it is sewing your view of electronics and forcing you into making silly design decisions.

It could be my dividers are not working right,

I doubt it, that sounds more like faulty wiring or bad software.

I will need 100ohm for red, and 150 for blue and green.

That sounds wrong.

the forward voltage on the red is 2.15

Again that sounds too high, but assuming it is right:-
So the voltage across the resistor is 5 - 2.15 = 2.85V so to have that voltage with 20mA needs a 2.85 / 0.02 = 142.5 Ohms
Similarly for a voltage drop of 3.3V you need 5 - 3.3 = 1.7 then 1.7 / 0.02 = 85 Ohms

Doh! i got the values backwards, I meant 150 ohm for the red, 100 for the blue and green.

I couldnt even buy shift registers locally, the only stores that have parts are radioshack, and oregonelectronics, radioshack has almost nothing helpful, and OE only carries NTE parts, and they are expensive, and not very helpful.

I can get resistors at both places, OE is $.25 each, and RS is #1.20/5 pack. We used to have a Norvacs, but they went out of business, probably because there just isnt enough support for them, and they were a bit expensive (about the same prices as OE and RS, but they did have a lot of parts, most of the time I could actually get what i needed, but sometimes you gotta spend $10 for a cap.)

I can order stuff online, but it usually means waiting a week or 3. I also dont like spending $1 on resistors, and have to pay $5 shipping to get it within a week. I'd rather spend $5 on a driver chip that does everything i need, and looks good on display.

Even if I had all the resistors I need for this project, its gunna be ugly trying to figure out where to put them, and I like to use uninsulated wire, which will things difficult to wire, without shorting somewhere.

Im testing the 3.3v on my old cube. The shift registers are on the cathode side on that cube, they get 5v from 4 arduino pins (but are they have 220 ohm resistors) On that cube, when its lighting up all the LEDs on 1 plane, they are dimmer. 16 resistors on the column pins would be better than 4 resistors on the plane pins. If I did the RBG cube the same way, it would be 48 LEDs, and really really dim when all the LEDs on a plane are lit.

I dont have an accurate data sheet, so I had to hook up resistors, and measure and calculate (back on the first page of this thread are all those numbers... Scroll back to the first page, and check my numbers and math there, I think its right, but I could have made a mistake.

The voltage dividers I made are tiny (0402 parts), its very likely I buggered them up with my iron, or solder. No change in the software. Im using the old cube, and its shift registers (that work fine on 5v), to see if I can make them work at 3.3v like I hope to use on the new cube.

and really really dim when all the LEDs on a plane are lit.

That either means your design is bad or the power supply is not up to it.
There should be no dimming when there are multiple LEDs on.

Cheap, quick, parts from the USA as far as shipping is concerned. At least that is what I have been told and they shipped quick to me.

http://stores.ebay.com/thaishine

Thats where i got the shift regitsers. they got here in less than a week.

I ended up ordering 200 (100 ohm, and 150 ohm) resistors. $5 is better than $12 i guess, but I still have to wait till next week probably. Hopefully they will be close enough. I also ordered some .1 uf caps.

I spent the better part of the day wrecking and repairing my old cube, I wont be using it for testing stuff anymore. I also soldered up some RGB LEDs to some shift registers to experiment with 3.3v. I can run the blue and green at 3.3 safely. I still need to make new voltage dividers, I keep breaking the tiny ones I've made.

I couldnt even buy shift registers locally,

Very rarely you can. But many distribution houses offer next day delivery. Digikey for example does that, as mouser / newark.

I order my parts in hundreds so shipping cost ends up as nothing.

I think i could have gotten some from the OE shop, they sell NTE parts, and Im sure NTE must make some kind of shift register, but the counter guy wanted me to try to figure out which part would work, and I didnt know, so I left, and bought online instead. I would prefer to buy local, and support local business, but they charge too much, and cant be bothered to help make a sale.

They already have my package ready for shipping (i have the tracking numbers, but they havent been scanned in yet.)

They also sent me email offering me %12 off their normal prices if I buy today. (but not on ebay, on their regular website. The regular website doesnt offer the 4day shipping, they do have 3 shipping options, but the quick way is kind of expensive for a few parts. Im considering ordering those 85 ohm resistors.

I guess I assumed that shift registers were fairly common, they seem to be used in a lot of things.

I cant even find RGB LEDs locally, they only have single color ones, and they want $.65 each for them. It would have cost $40 just for the LEDs on my first cube.

Mike, My old cube uses 4 resistors, one for each plane, which means it uses between 20 and 320ma (assuming my resistor is the right size...), when it lights all LEDs on a plane, it is noticeable, if you are paying attention, but most folks dont seem to notice.

I may try to make and sell a few cubes, so I can buy a bunch of parts and see how many ways I can light up LEDS!

I want to try some of those cool POV projects with spinning LEDs (like spokePOV), or the spinning globe things. I have an old VCR that im thinking about turning into a POV project.

MMMMmmm I love LEDs.

My old cube uses 4 resistors, one for each plane,

Well that explains it, very poor design that.

Grumpy_Mike:

My old cube uses 4 resistors, one for each plane,

Well that explains it, very poor design that.

It was when i changed it up from using 20 pins, to using shift registers that I noticed it, so it would be more like a very poor re-design, if you must form it that way. I prefer to think of it as a work in progress. I may just throw some resistors at it and solve things the easy way, rather than the elegant way.

My resistors should be in today, so I should be able to wire up the cube for 5v, using 100, and 150 ohm resistors.

I also drew up some fritzing images with 3 different setups, one uses 5v, and is probably the common way of doing it.

The other 2 images are running 3.3v from the shift registers, to the LEDs. using 50 ohm resistor for the red.

To keep things simple and easy to understand, this is only using 8leds, and 1 shift register per color, and one for the cathodes (4 total 74hc595s)

5v, 4 shift registers, 16 100 ohm resistors, 8 150 ohm resistors:

3.3v from arduinos 5v line

3.3v from external power supply

Im not sure, but I think the last one needs a ground to the arduino for the latch/clock/data lines to work.

Is there anything wrong with any of those designs? I just realized that I need to put .1uf caps on the shift registers, so other than the caps, is there anything wrong? will one design work better than another?

The middile one definitely has something wrong. You don't use a resistor potential divider as a power supply [unless you use a power op-amp to prevent (make negligible) the effects of loading, but that is a whole other kettle of fish].
You should use a proper voltage regulator - be it a LDO regulator, a switching regulator, a zener diode, or other such voltage regulation devices

Loading 101:

If say for example you have two 1k resistors as a divider and say connect 5v at the top. Under no load, you will get 2.5V. Say you now used that as a power supply, and started drawing i dont know, maybe 1mA from the 2.5V line

You would then have
Ib = Vb/Rb = Vb/1000 [A] flowing through the bottom resistor, and 1mA flowing through the output.
That would then mean that flowing through the top resistor you have:
I = 1 + Vb [mA] = 0.001 + 0.001Vb [A]
The voltage drop on the top resistor would then be:
Vt = IR = 1000*I = 1 + Vb [V]
That would give you a total voltage drop across the potential divider:
V = 5[V] = Vt + Vb = 1+2Vb

So that would mean that at the output, the voltage would be:
Vb = (5 - 1)/2 = 4/2 = 2[V]

So in that case, just 1mA of loading would result in the output voltage dropping by 20%.

In your case you seem to be using 10k for the lower resistor and 5k for the upper resistor and are attempting to power 3 LEDs from it. So input voltage would be 5V, load current would be say 60mA. So just for fun that would give Vb = -200[V]. That figure is of course absurd, and the reason for it is you simply cannot put 60mA through a 5k resistor when the voltage across it is limited to 5V (The maximum would be I=V/R = 5/5000 = 1[mA], and at that amount there would be 0v across the LED).

Wow! that was a really good explanation. So, #2, bad idea, on the voltage divider on the shift register power source, I'll look seeing if I can fix that with a VR circuit.

Resistors and caps came in. I can put some filtercaps on my shifters now.

I may pair up some 100 ohm resistors to put on my 3.3v test RGB leds too to test the 3.3v have something setup like the 3rd example.

I may also be able to rig up the cube similar to the 1st example, I have a 7 piggybacked 74hc595 shift tower soldered up for the cube.

but that still has to wait for me to take care of other business first :frowning:

I've been experimenting, before wiring anything up to the cube. I had a rig setup for running 8 RGB LEDs on 3.3v, but I decided to undo that, and set it up for 5 volts, because it wasnt working, and I wanted to start with something easier.
So, re-soldered it up with resistors (8 100 ohm on the red, and 150 ohm on the blue and green). I have the cathodes (the negative side) soldered to a wire, and the anodes soldered to resistors, that are soldered to 3 piggybacked 595's. I soldered up a few .1uf caps to where I hook the 5 volts up to the shift registers. I made a couple jumpers to power the 595s from the 5v and gnd pins on the uno, and a jumper from the cathode to the gnd on the shift registers.

No LEDs would light up. just to see if If the LEDs would light, i tried hooking up the 5v to the resistors, no luck, but in the process, I touched the cathode wire with the 5v wire, and some leds lit up. I took the ground wire off of the cathodes, and hooked 5v to it, and it seems to work fine (runs the shift pwm demo).

Im confused though. I double checked everything, and my LEDs seem backwards. The schematic shows pins 1,2,3 as cathode, but on all my RGB LEDs, you hook up 5v to that side, and ground on the other side to light them.

I double checked the datasheet online and the only odd thing I can find is the symbol for the LEDs looks funny, on the blue and green leds there is a symbol that looks similar to an LED next to the regular LED symbol.
Im including the image from the ebay auction

Look at the pin numbers on the bottom right diagram (you can ignore the zener diodes). The have drawn the image as if it were from looking at the back.
If you then look at the top left diagram, the cathode is marked with a triangular notch.

The good news is that if you have in fact wired everything as common anode, it is a lot easier to control as you can now use the TLC5940's or any other LED current sink to drive them.