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

This is what im working with right now, its a test unit that is setup the same as the ShiftPWM example (even though the LEDs are marked otherwise.)

Im running the 8 RGB LEDs off the arduino, The power supply is via USB (using a usb phone charger, I think its 500ma)

it seems to me that I should be having power issues when its running all the LEDs at 100% (24 LEDs * 20ma =480m. Thats about 160ma per shift register, and about 1/2 amp on the arduino.

according to this site:
http://www.elcojacobs.com/using-shiftpwm-to-control-rgb-leds-with-arduino/
thats not really a problem? I also noticed that there is a picture of 16 RGB LEDs, which is what I will need to do for the RGB cube,

I do have the cube mounted on a case, I have to solder up 48 resistors, and 6 shift registers, which is going to be kinda messy.

This is the next test Im doing, its running the LEDs on a 3.3v power supply, and possibly running the arduino off the 12v that powers the 3.3v circuit, but probably running on the 5v from the usb, I dunno.

The one Im wiring up actually has 100 ohm resistors, I didnt have any 47 ohm resistors.
The wiring between the shift registers and LEDs looks crazy, but i think it will be easier to solder up.

Heres a video of the 3.3v with voltage dividers (like the 3.3v setup in the previous post:

As you can see, it didnt work right, it did make the LEDs light up, but It was pretty wrong.

Heres a video of the 5v test setup (it uses 8 RGB LEDs, 8 150 ohm resistors, 16 100 ohm resistors, and 3 shift registers.) In this video I also include the 3.3v setup, without the voltage dividers, it runs pretty good w/out the dividers, but It may be causing some kind of damage, i dunno.

Instead of soldering up a bunch of resistors, and shift registers, I did a little googling instead.

Check out what I found.
http://aglick.com/charliecube.html

This guy built a 4x4x4 RGB cube using 64 LEDs, some wire, perf board, and a nano. No resistors or transistors or chips of any kind, just some wire, leds, board, and nano.

The way he solved the problem was like using geometry to solve a accounting problem.

I did a lot of soldering yesterday. I found some unused xmas lights that had wires in groups of 3, about the right lenght for my project. I cut, stripped, tinned, and soldered them onto the resistors that I had previously soldered onto the column wires on the cube. I ended up having to untwist the wires to move them through the case, and it ended up pretty ugly. I will probably end up replacing those wires, but they will work for now.
Before green wires:


After green wires:

The horror!


Soldering away...

Which brings us to here:

Now that I have the shift registers wired up to the ribbon cable (clock, latch, data, ground), and wired to the LEDs, I need to figure out how to source current to the common planes.

In my first cube, I used 20 pins, 4 pins sourced 5v (through 220 ohm resistor). I upgraded that cube to using 2 shift registers to control the sink, and sourced 5v via 4 pins through 220 ohms.
I recently upgraded that cube to 16 100 ohm resistors on the column(sink) pins, and removed the 4 220 ohm resistors on plane(source) pins.
In my RGB shiftpwm tests, I sourced 5v to the common pins via the 5v pin on the uno (Originally I had it from a 5v power supply, but later I moved it to the uno for portability).

It seems to me, each of those are drawing too much current through the arduino.

Im considering a few different approaches, I could add a shift register (this is what i had originally figured that i would do). using 4 bits to source the current, and having the other 4 for added features, like buttons? or sound?, I dunno really.
Then I realized that mixing those bits in with the column pins may make shiftpwm, or other however I may control those bits more difficult, and a separate shift register may be better.
I figured, I could use 2 bits for sourcing the current per plane (1 8bit chip to source 1 48 LED plane), but it seems to me running the current for 48 LEDs through 2 shift register pins will be too much for it.

In my previous post, with the 4x4x4 RGB cube, they are able to do this with 64 RGB LEDs, and no other parts. I guess they are able to do all the current control via PWM, and since the red LEDs need a lot less voltage than the other LEDs, it somehow must adjust.

Also, Ive noticed other people posting about making 4x4x4 RGB cubes, if you are making a similar cube, post in this thread with how you are doing it, and what features you are thinking about.

I havnt lit this cube yet, Im still not sure how i want to source 5 volts to the 4 planes. It seems to me that I should be similar to my other cube, but I need to deal with 3 times as many LEDs.

I have built an SMD version of the asher glick cubes spire.

I also came up with a way to do this with 8 RGB LED Spires, but I havnt figured out how to do the 8 led spire in SMD.

I've figured out 2 ways to do the 8 LED spire. One way is to simply build 2 4 LED spires, and rotate the top spire 45 degrees from the bottom spire. Instead of 4 leads, you will have 8.

The more interesting way is instead of using the pi/2 rad formula for rotating the LEDs, use pi/4 rad, and iterate it 8 times (instead of 4). This should end up with 8 leads and 8 charlieplexed RGB LEDs in one column. I have to wait for LEDs to arrive before I can build a spire.

I just read up on the ULN 2003 chip, and it looks like a great way to source 5 volts to each layer. It says it can source upto 500ma, that sounds like plenty compared to a single arduino pin. It looks like I hook ground up to pin 8, 5v to pin 9, and use the first 4 pins for input, and last 4 pins for output to each plane. WahBam plenty of current, with a few pins unused. If I had a ULN2803, I could pair up the 8 arrays into 4 arrays for twice the current.

This way, I can modify my old software for the cube to shift out 48 bits instead of 16, and it should work on this cube. I think i can probably use shiftpwm with this cube too.

Still waiting for new RGB LEDs to arrive... They are common cathode, I will use them to make a charliecube like asher glicks. I cant wait to compare the 2 cubes :smiley:

An update on the 4x4x4 RGB Cubes.

The charliecubes seem to be working great. I have built a couple, and have been running them 24/7 on 5 volts via USB. I have also run them via the Vin with 18v, and they work fine, but the chip gets warm, so I went back to 5v.

The more proper cubes are still under development, one uses TLC5490, and the other uses shift registers and resistors. I built a 48 bit shifter for the anodes, and am using 2 shift registers to sink the 4 planes. I think I need almost 1 amp, and 2 shift registers wont be enough for that probably, so I may need to modify it.

I have a few ULN 2003a chips, and I had thought they would work for sourcing, but that may not be the best solution.

I have been investigating using p-channel and n-channel mosfets. There are a lot of them, and I dont know which ones would be appropriate. It seems the ones in the smaller packages are too small (1/4 amp), and the bigger packages are way bigger than my needs (4 amp).

What are good ways of supplying sink/source to the planes? Is one way vastly superior to another?

Another consideration is circuit board space, im using very small boards with little space, so space is as much consideration as cost (ideally both would be small.)

Shift registers, mosfets, darlington arrays are what I have been looking at, but maybe I should look at other options too?

I think i have found a good current source for my TLC5940 cube,
Manufacturer Part No: IRF3205

Specification
Mosfet Type N-channel
Current Rating 110A
Rds (On) 8m?
Voltage Rated 55V

They are under $1 each, and seem to be a good n-channel source. I need about 1amp max.

Im still uncertain about sinking on the shift register cube. I had originally built it with 2 shift registers to sink, but I think I will need lot more than 2 shift registers for that.

I've ordered some of these p-channel mosfets, we will see if they will work.
Manufacturer Part No: IRF9540

Description
MOSFET
Transistor Type:MOSFET
Transistor Polarity:P Channel
Drain Source Voltage, Vds:-100V
Continuous Drain Current, Id:-23A
On Resistance, Rds(on):117mohm
Rds(on) Test Voltage, Vgs:-10V

Im still interested in other options, ULN ?

For what im doing, I only need 1amp max, are there other parts that might be more suitable? These mosfets seem way bigger than I need. I think I could also do the same thing with a pair of ULN2803s, but I think that would be less energy efficient, and probably a worser way to do it if its running on batteries.

What are some good ways to source/sink

How about these little guys? they look good enough for 1 amp at 5volts.

Mosfet Type: P-channel
Current Rating: 2.6A
Rds (On): 40 mOhm
Voltage Rated: 12V
Package: SSOT-3

Mosfet Type: N-channel
Current Rating: 4A
Rds (On): 100 mOhm
Voltage Rated: 60V
Package: SOT-223

They are much smaller than the ones I actually ordered (from the previous post). but they look like they exceed my needs, take up less space, and are even less expensive. These seem much better than what I ordered, but maybe they are not?

Im trying out TLC5940 chip on the SMT RGB LED cube, I have it wired up with 3 Chips, each have a 2k resistor, and I used 1 10k resistor, but the schematic didnt show any decoupling caps, so I didnt put any in.

Im trying it with the BasicUSe example software (just one plane of of 16 RGB LEDs, no multiplexing), and on Usb, it starts out really bright all on full, and after about a minute, it dims, and flickers each individual LED, but looks weird, and im pretty sure, wrong.

When I run it from 5v power supply, its similar to on USB, but its not bright at all, just flickering each individual led.

I know that I have some solder issues, since all the LEDs are not working (I buggered them up while soldering the wiring on the backside of the board.

Im using the info at:
http://playground.arduino.cc/Learning/TLC5940
and I wired it up like the example.

Heres a picture of the wiring, I havnt done the stuff for the planes, but I run a wire from the 5v to one of the common plane wires.

I worked on this again tonight. I repaired the some wiring on the middle chip, now all the LEDs light up in order, but they are pretty dim. I also put .1uf caps on each 5940, and its a little brighter, but nowhere near as bright as they should be.

Im just running one plane at a time with a 5v wire to the plane, and the software running the 5940s. The cubes gotten kinda beaten up being knocked around my bench for the last month or two. I will need to replace some LEDs I think :frowning:

This is sort of an old topic, but I straighten my wire for cubes by grabbing both ends with needle nose pliers and stretching it. You will feel it stretch and then its perfectly straight

I tried that too. I used a vice, and vicegrips. The copper wire (24 gauge) breaks really easily, then springs out of control. The steel wire (19 gauge) did get straighter, but it was very difficult to stretch. I was able to do it, but when relaxing the wire, it still had curves in it. I also tried pulling real hard on the wire while smacking the wire with my hand, it didnt work either. I got straighter wire, but I couldnt get the curve out entirerly. I was working with about 6' of wire at a time, trying to get the longest section of straight I could get, but it just never got straight enough for me. I have some 22 gauge steel wire, but I havnt tried straightening large sections of it.

How were you doing it, how long and what gauge wire?

There is also a technique where you twist the wire, I actually got the best results with that technique, but when you look close, you could see the twist, even from 10 feet away, you could kinda see the twist. What you end up with is a wire that has very consistent tight twist to it that is roughly straight and rigid. After a few days of trying things, I ended up going back to the original gentle uncurving metheod.

I was looking at the music wire that I had used on the charliecubes, and its got some rust on it, so its not stainless steel, its hardened steel.

Yea i was using a vice and needle nose pliers. And I think 22 gauge copper wire

I found the copper to be the most difficult. Thicker and harder were easier to get straighter, and I was spending a lot of time bending wires. My copper was a little smaller than yours, and my steel was a lot thicker.

How long of sections did you do? did you cut 4" sections, or many feet at a time? I wasnt able to completely remove curve, but if you spend enough time with it, it gets fairly straight. When using the music wire, its very straight, and doesnt get bent while working with it. But its very difficult to solder, comapred to copper or gavlanized steel.

I re-uploaded a new sketch, and hooked it up again, and its doing something! :smiley:

Right now I am only controlling one plane by connecting it to 5v.
The ICs are wired up like the example in the TLC5940 tutorial:
http://playground.arduino.cc/Learning/TLC5940
except that I have decoupling caps on each chip.

Its running the Useprogmem example program, it just lights all 16 RGB LEDs in a plane, and turns them off in sequence. I think it may do some PWM while its turning it off too.

Its not as bright as I had hoped, but maybe with some experimentation, i can make some improvements. I ran the same LEDs on shift registers and resistors, and I seem to remember them being considerably brighter, but maybe that just my imagination.

The smt cube is going to wait until i can figure out a good way to source 5v to each plane. Im assuming a mosfet would be the best way, but I have to figure out what part I need, and order them, and wait for shipping...

I setup a test fixture with some charliecube spires, and I have 3 different resistor sizes. no resistor, 150, 100, and 50 ohm (I didnt have any 50 ohm, so I doubled up on the 100s). No resistor is visibly brighter, but the others light up pretty well. Im thinking of modifying one of my cube with 100 ohm resistors.

It seems to me that there are two viable ways to introduce resistors. I could put on resistor on each of the i/o pins, or I could put one resistor on each of the 64 leads on the 16 spires.

More resistors typically means more evenly controlled, but I think in this case it may not actually make any difference, because It seems to me that the LEDs are being lit ONLY one at a time. Since there will always be 2 resistors used (one on the high pin, one on the low pin), There will always be 2 resistors being used to light any single LED. If I use 100's then Im doing 200 ohms which should mean my LEDs never get anywhere near 20ma.

Measuring what is actually going on would be best, but measuring is going to be difficult to impossible for me, a few calculations only takes a few minutes, and is relatively easy.

If you want really straight wires try heating the wire to a low red heat while applying tension to the wire. Allow the wire to cool naturally and you will have annealed the wire.. No more bends or gentle curves in the wire. This also is useful to relieve work hardening of copper and alumininum as well.

Bob

That seems a bit excessive, I would have to heat it, to soften it, to straighten it, then harden it to help keep the structure of the cube. I certainly wont be heating up galvanized wire till its glowing red.

If i were to heat wires, I think I would use music wire, but use a lot of heat to tin them (like with a solder pot, or small torch.)

I really like the look of the copper, but its too soft for cubes, they really think they need a bit more durability than copper or aluminum provide. The music wire is also small enough that you can barely see it.