Pages: [1] 2 3 ... 8   Go Down
Author Topic: RGB SMT LED Cube, resistors, drivers, and shift registers.  (Read 17631 times)
0 Members and 1 Guest are viewing this topic.
Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I made a new cube using some SMT RGB LEDs, Im using these 5050 SMT LEDs I found on ebay.
This is the specs i have on the LEDs, I've written the ebayer, but they wont be back for a couple weeks.

RGB PLCC -6 5050 3-CHIPS SMT SMD LED Light
VF Forward Voltage
Min2.9   Max 3.6
Luminous Intensity
Min 4000   Max 5000 mcd
Power Dissipation 200 mW
DC Forward Current 60 mA
Reverse Voltage 5V

I've built the cube using common cathode, assuming thats how most of other rgb cubes are setup.
The LEDs have 6 leads, so I could build it either way, or even use them in series.


I had planned on making a matrix, but it turned out to be too difficult to solder up, and i found that I can just buy a nice SMT RGB LED matrix for under $10 so I abandoned that idea, but I made up a 32 bit shift register out of 4 74hc595s.


I figured i'd use it with this cube, but then I realized that I will need to control one plane (48 LEDs) with it, and 32 bits wont work unless I cut the planes in half, which would be difficult. Had I made 2 1/2 cubes, and set them next to each other, it would work... but I have 1 cube.

So, I built a big 56 bit shift register tower (7 chips tall) I figure I will use 48 bits for the LED anodes, and 4 bits for the planes (cathodes), and have 4 dummy bits (but they could be used for additional features).

If I use shift registers, i will need resisters, and im not exactly sure what the forward voltage is on these leds since the only info I have lists one voltage. I tested the leds with 3 volts, and the red ones were really bright, too bright, but the didnt blow from quick testing 3v. Based on looking over specs on  several 5050 leds, my guess is the forward voltage is 2.2v Red, 3.2v Blue, 3.2v Green

From 5 volts, 100ohm should get me close on the blue/green ones, and 150 on the red.
Since I dont really know what these LEDs should use, I figure i can experiment with resisters on a spare LED to try to dial in the right resisters for each color, but maybe there is a better way?


I have also been revisiting the idea of running the shift registers at 3.3v instead of 5, reduce the 5vs to 3.3, and resister the data pin so that it gets 3.3v from the arduino. I was thinking maybe having a voltage regulator (like an lm317) drop the voltage from 5 volts to 3.3. Then I would have to resister the red LEDs, and run the other leds on 3.3v

Is that a reasonable solution?

Im also considering just using LED drivers instead, just to be easy... There seem to be many good LED drivers, which would be a good one, and why?

I've read some posts here that mention TLC594?, max232,ws280?

I have an uno for developing it, but I plan on running it off of a nano, and hopefully a small inexpensive power supply (like used for charging cell phones)

I also have a real nice power supply from a DVD player, it puts out 5, 12, and 24v, but i was hoping to save it for something that needs a lot more current (like a burning laser!)


So... im interested in ideas about how to control the cube best, I have shift registers, and can maybe scrounge up resistors (or just order some online...), but I will probably have to order resisters online, and maybe i should just order some inexpensive driver chips instead?

Oh, i just realized that I have some ULN2003 chips (they are in circuits, but I can unsolder them.)

« Last Edit: October 27, 2012, 05:58:58 pm by Hippynerd » Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 504
Posts: 31324
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but maybe there is a better way?
Yes you have the LEDs, connect them up with something like a 330R resistor and actually measure the forward voltage then you can do the math correctly to get your current.

Quote
I have also been revisiting the idea of running the shift registers at 3.3v instead of 5, reduce the 5vs to 3.3, and resister the data pin so that it gets 3.3v from the arduino. I was thinking maybe having a voltage regulator (like an lm317) drop the voltage from 5 volts to 3.3. Then I would have to resister the red LEDs, and run the other leds on 3.3v

Is that a reasonable solution?
Absolute crap solution.
1) The shift registers cannot supply the current.
2) You always need a current limiting device with an LED. http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

Quote
maybe i should just order some inexpensive driver chips instead?
No as well.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but the didnt blow from quick testing 3v.

Told you so, smiley

Quote
Is that a reasonable solution?

Yes. Essentially the output resistance of those shift registers act as the current limiting mechanism here.

The risk you run, however, if the leds have wildly differing forward voltage drops, you may not be able to turn some of them on.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is an interesting design that you may want to think of. It is for singles but notice that a) it is done without the use of shift registers - think very hard about that; b) it is done without resistors either.

http://www.doyoung.net/works/CUBE8/index.html

Youtube has a video. Check it out.

I like the implementation of touch-based power button. I think its light-sensing can be improved.
Logged

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

 Thats quite the interesting cube. 128 control lines to control 512 LEDS.

I see the touch button thing, it looks like they use a photo resistor, and maybe capacitive touch on the other button.
Heres a video of a guy that made circuit boards on glass slides, They use capacitive touch, and you can operate it from back of the glass (not the side with the traces).
https://www.youtube.com/watch?v=5ZH1-eScY0M
I thought it was pretty awesome just because the circuit is on a see through board, but its even cooler as a input device!

I have to salvage some resistors to do some testing, and see if I can figure out the appropriate voltage for each LED.

I did read your webpage about LEDs Grumpy Mike, I assumed as long as you had the right voltage to feed your LED, you dont need to worry about current.  As a test, I ran a blue LED on 2 D cells, Im not sure what the forward voltage on the LED is, but my guess is close to 3v. The circuit was simple, 2 batteries and an LED,  no current limiting resistor, or any other fancy bits. Based on your webpage, it sounds like I have stressed the LED, but it did not seem weaken the LED any. Im confused, or conflicted, im not sure...

The Shift register way seem a bit more clunky, but thats also kind of appealing. The components will be on display with the cube, so a stack of shift registers, and resisters might be extra cool looking, but not as nice of a way to control the LEDs. I think its kind of interesting how I got 2 totally different responses. Mike, why is the shift register way crap? Im not criticizing, im curious about what is good and what is bad about things. Im also unclear on what you mean by "no as well"

« Last Edit: October 27, 2012, 08:20:45 pm by Hippynerd » Logged


Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just converted my old 4x4x4 cube to run on a nano, while I was at it, i decided to hook the Shift registers to the 3.3v pin on the nano, it seems to be running, but is it doing bad things...
Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 504
Posts: 31324
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Told you so,
Be aware that dhenry is well known on this site for having a very odd attitude to reliability and safety of components. His attitude is that if it dosn't melt then it is fine.
LEDs are a particular blind spot of his.
He delights in being clever clever and showing off how smart he is. Which is odd because he isn't. Look at his past posts and see the larg number of things he is totally wrong about.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I see the touch button thing, it looks like they use a photo resistor, and maybe capacitive touch on the other button.

The photoresistor was there for ambient detection. The power button itself is touch sensing.

Quote
Heres a video of a guy that made circuit boards on glass slides,

That (iching copper on glass) is actually very impressive.

Quote
so a stack of shift registers,

Staking the shift registers the way you did is quite original, as I haven't seen anyone doing it.

The issue with shift registers in this application is that they take space and don't present well. The "nothing but led" approach is quite appealing.
Logged

Leeds, UK
Offline Offline
Edison Member
*
Karma: 71
Posts: 1638
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have been working on something similar, only mine is 12x12x12. It really is an awful nightmare wiring up all the LEDs. The worst part is I finished doing it using magnet wire, only to have insulation in the wire break down and short everything out, so I need to rewire all the common wires.

For mine I am using TLC5951's for the cathodes (though TLC5947s were my first choice but they are too slow for a cube the size of mine), and 4-16 line decoders wired up to create a 7 to 72 line decoder driving P-ch MOSFETs for all the anode common lines.
By using these IC's mine is capable of 36bit colour (though I have limited it down to 24bit).
Logged

~Tom~

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Mike, if you two want to fight, thats ok with me, but its not my interest., Im interesed in finding solutions, and some experimenting, and hopefully some learning and success.

I would like to know why something is a good idea, or a bad idea, so if you want to talk about what is good/bad about something and why, that is what im hoping to hear.

dhenry, Did you watch this video too, where he shows how he made them? I thought it was pretty impressive.
Im glad you like my shift registers, that is called piggybacking, its commonly used for building memory modules of different sizes, with one sized footprint.

I realized that it shouldnt matter if im using 5v or 3.3 on my other cube, since im syncing with the shift registers, they get 5 volts from the plane pin. I think i originally assumed you needed a resister on the anode side, not the cathode side, and I didtnt want to buy 16 resisters (they cost a quarter each locally...) So I made the cube common anode and used 4 resistors.

When I made the last cube, all the software I found was for common cathode, When I made this one, I made it CC, to avoid those problems.{fail}

Tom, wow 12cubed sounds awesome, is it RGB thats a heck of a lot of wires! and magnet wires has to be very difficult, I've soldered magnet wire, and its a pain in the butt to get the insulation off (I found tinning the end worked, but you have to burn alot of nasty insulation off, and its a lot of effort.

The wire Im using is 19 gauge galvanized wire (like bailing wire) for the anodes, and 24 gauge copper wire for the cathodes (since each LED requires 3 wires, I went with smaller gauge (less obtrusive, and the cube doesnt need that much structural support). I used the copper because I thought it would look good, and I could make the negative lines silver(color), and the positive lines copper)
The 19 gauge is good and stiff, it makes the cube fairly sturdy. Ive found that I spent a lot of time straightening the wire (it comes in rolls, but I want straight lines, and it takes a lot of effort to make the wire straight), I'd like to find straight wire, im considering welding/brazing rods.

Tell me about those TLC5951s and 5947s, im interested in finding PWM solutions for my common cathode cube. Its a 4x4x4, broken into 4 planes, I need to control 48 LED anodes (16 RBG), and 4 plane pins (cathodes). I could run the planes right from the arduino, or ??? The way i was originally planning on doing the matrix was with 4 Shift registers, 3 would control the cathodes, and 1 control the anodes. Now Im considering using 7 shift registers (6 for cathodes, 1 for anodes(1/2 really))

I dont understand the bit about decoders and p-ch mosfets, I did read something about someone hooking up a light strip that was CC, and they used something like that to make it work.

I did a lot of searching last night, and it looks like almost every RGB LED setup is CA, and I wasnt able to find any examples of CC RGB PWM LED drivers. Shift Registers are looking like a better approach right now.
Logged


Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
it was pretty impressive.

What's really impressive is how the whole thing is wired up. He used a 32-pin mcu for that 8x8x8 cube.
Logged

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but maybe there is a better way?
Yes you have the LEDs, connect them up with something like a 330R resistor and actually measure the forward voltage then you can do the math correctly to get your current.

I hooked up a 220 ohm on the red, and a 100 ohm on the green. Im using 3.3v from an arduino nano, and with the red LED I get 2 volts, with the green I get 2.7, the green seems pretty bright, but the red doesnt seem very bright.

Calculations Red (3.3-2)/220 = 0.005909091 (or about 6ma)
                   Green (3.3-2.7)/100 = 0.006 (or 6ma)

Green (3.3-2.77)/75 =0.007066667
Green (3.3-2.88)/50 =0.0084

Red (3.3-2.2)/50 = 0.022  (hey, getting close)
Red (3.3-2.1)/75 = 0.016 


Sadly 50 ohms is the smallest resistor I can find.
From that can I calculate what voltage I need for 20ma?
« Last Edit: October 28, 2012, 04:27:58 pm by Hippynerd » Logged


Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 44
Posts: 2804
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

responding to him... (DHenry) is like a battle of wits.... Except you are battling with an unarmed man... Once in  a while he even manages to stay on topic...
Mainly he is just annoying as he knows everything about anything... and usually is wrong. IMNSHO

Bob
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You are dealing with a few things:

1) different voltage drops causing different If for the same resistors. In your example, your reds have about 2.1v voltage drop and your greens about 2.8v. So to achieve desired If, the reds need to have resistors of (3.3v - 2.1v) / If and (3.3v - 2.8v) / If for the greens.
2) even if the same If goes through all leds, they have different efficiency / light output and our eyes have different sensitivity to different colors.

So play around with different resistors until your eyes perceive them to have same brightness. No point in having very precise values for those resistors.
Logged

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just did some more testing. i hooked up a 50 to the red, and ran 3.3 to all 3 anodes. It looked a little blue, so I hooked up a 50 to the blue, and a 63 to the red. I then measured the diodes

I found the green, with no resister measured 3.24, red measured 2.15, and blue was 2.7

Red (3.3-2.15)/63=0.018253968
Blue (3,3-2,7)/50=0.012
Green (3.3-3.24)/0= ?
But it still looks like mostly blue

I measured the voltage across the resisters, and the blue measures .49, and the red measures 1.

Im assuming with all 3 LEDs on, it should be white, and any color variance should be adjusted with a resistor.
« Last Edit: October 28, 2012, 06:38:24 pm by Hippynerd » Logged


Pages: [1] 2 3 ... 8   Go Up
Jump to: