Pages: 1 [2] 3 4 ... 8   Go Down
Author Topic: RGB SMT LED Cube, resistors, drivers, and shift registers.  (Read 17721 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

http://bildr.org/2011/08/74hc595-breakout-arduino/
heres an example of someone running 595s on 3.3 volts from an arduino. They are even running LEDs w/out resistors.

Then I read this
http://arduino.cc/forum/index.php/topic,26476.0.html
Logged


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

1) Your hc595 is not a perfect voltage source, as it has significant internal resistance. As the current draw goes up, its output voltage goes down (when outputing 1), reducing the current draw. The same mechanism works with a mcu's pin.

2) Your led does not have a constant voltage drop: the voltage drop goes up, albeit slowly, when the current through it goes up.

Put the two together -> you don't get smoke when powering a led with a  hc595 directly.
Logged

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

I've been looking about the internet for more info about 3.3v, and found this about the nano...

Power can be supplied to the Nano via the USB cable; feeding 5V directly into the 5V pin, or 7~12 (20 max, not recommended) into the Vin pin. You can only draw 3.3V at up to 50 mA when the Nano is running on USB power, as the 3.3V is sourced from the FTDI USB>serial IC. And the digital I/O pins still allow a current draw up to 40 mA each.

Im pretty sure that 50 ma wont be near enough, but If I resister the 5v input from the USB to 3.3v that may work. That way, the shift registers are powered directly from the USB, instead of through the arduino.
Its still going to need 17 resistors, which is messier than i would like, but less messy than 50 resistors.
Logged


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

Revisiting resistor options...
Ideally (from the pretty lights perspective), each LED would have a current limiting resistor (thats 192 resistors!), but because of many reasons, its very impractical to put 3 resistors on each LED, but not as impractical to put one on each LED column (or SR output pin, same thing) (48 LEDs), but even that is a lot parts, space, and complexity. Only one plane at a time is lit, so theoretically, it should be the same, but then I think only one LED is actually lit at a time, so it seems that resitoring the planes (common) (like I did on my other cube), would be viable.

I have noticed that on the other cube, when it lights up all the LEDs on a plane, they are not as bright as when it lights up only a few leds per plane. this cube will have 48 LEDs on a single plane, and my guess is that it the dimming would be more dramatic.

HRm... resitoring the USB power input wont work, because the current will vary depending on how many LEDs are lit at one time, I think i would need a 3.3 Voltage regulator to run the CRs at 3.3v.
A driver chip would be nice, sadly I havnt found one that will work with common cathode.
« Last Edit: October 29, 2012, 02:12:21 pm by Hippynerd » Logged


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

I found a 3.3v voltage regulator (from an old wrt router that died), snatched a few parts from it (Diode, coil, voltage regulator, cap), and soldered them up into a tiny regulated power supply.

This site tipped me off to the VR
http://kioan.users.uth.gr/wireless/wrt54g/supply.html

And looking over the datasheet, they had a typical circuit, which happened to be exactly how Linksys used it, so I just took the parts connected to the VR, and applied them based on the schematic in the datasheet http://html.alldatasheet.com/html-pdf/87877/ANACHIP/AP1501-33K5/1780/7/AP1501-33K5.html

I wasnt sure about the input cap, so I omitted that part, and it seems to put out 3.4v with no load.
The 12v brick I used said its .3a@12v, the VR is rated at 3a. Im not sure what my current needs are, but I think this will be more than plenty.

« Last Edit: October 29, 2012, 04:12:11 pm by Hippynerd » Logged


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

Something strange happened. When I tried to hook up the 3.3v to the shift registers, i disconneded the 5v, and the cube didnt stop working, it kept on working until I disconnected the ground.

I hooked up the 3.3v and ground from the 3.3v power supply to the shift registers on my old cube, and it didnt work right. its hard to explain how it worked, but it was slowed/delayed, and it seemed to not display stuff. It was just wrong.

Im totally baffled how/why the shift registers and cube were running on 4 wires (clock, data, latch, and ground)
Logged


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

Clamping diodes on the inputs of the shift register IC. Basically if you remove Vcc, power can flow from an input which is set at logic 1 to Vcc via the protection circuits. This is not good for the IC as the protection circuits aren't designed to power the thing.
If theArduino is running at 5V still you also have a problem as you are running the shift register at 3.3v meanung that the inputs will be far above the absolute maximum allowed voltage of Vcc+0.5V
Logged

~Tom~

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


Tom, are you saying that the SRs are getting power from the data/clock/latch line? and that if i put a diode on those lines it will be ok? or that I should resistor the inputs down to 3.3v.

When I made the 3.3v power supply, i was thinking I could run the arduino at 3.3v, but the docs say minimum input voltage is 6v (but isnt the usb power 5v?)

I still need to find some decoupling caps, my shift registers dont have any on them, and I guess they like them.
I have lots of broken stuff i could pull smd caps from, but sadly, i dont know their value, I probably have many many suitable caps on various broken boards.

I also found this website with a 5x5x5 RGB cube thats running on shift registers and ULN 2003 chips. The way they mulitplex uses a lot less pins, but I cant figure out a way to build it, and make it stable with SMD LEDs, and solid uninsulated wire.
http://gemlit.com/howto/
They are doing 25 x 15, If I could figure out how to do the SMD LEDs my cube would be 12x16 (28 pins), half as many as ithem currently using 48 x 4 (52 pins)

They use the ULN 2003 on 2 of the shift registers, is this for current limiting? The schematic shows no resistors, but it looks like the PCB has places for 1206 lands, and my guess is those are the resistors.
I also notice that they claim that most RGB cubes are common cathode, but theirs is common anode. That seems odd to me, since I seem to only find drivers for common anode setups.

I also found the rainbowduino (seeedstudio), uses my9221 chip, for their 4x4x4 CC RGB cube. Sadly, i havnt been able to find that part.

I have some ULN 2003s, and from what I see on ebay, they are fairly inexpensive.
Logged


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

What I am saying is that when you disconnected the 5V line, it stayed working because there are diodes built into the chip. This is a very bad way of operating the chip.


When you connected 3.3v, you need to level shift signals from 5v down to 3.3V otherwise there will be excessive currents flowing through the same built protection diodes which will damage the chip.

Level shifters can range from dedicated IC's to Transistors, to basic resistor potential dividers.
Logged

~Tom~

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

What I am saying is that when you disconnected the 5V line, it stayed working because there are diodes built into the chip. This is a very bad way of operating the chip.


When you connected 3.3v, you need to level shift signals from 5v down to 3.3V otherwise there will be excessive currents flowing through the same built protection diodes which will damage the chip.

Level shifters can range from dedicated IC's to Transistors, to basic resistor potential dividers.

Hrm.. ok, this is interesting. Could you give me a couple examples that I could start experimenting with ? I have some resistors, I could make a resistor potential divider, What values would be appropriate? Looking over the wikipedia page https://en.wikipedia.org/wiki/Voltage_divider

It looks like their example of 6v from 9v, is the same ratio 3.3v from 5 v. In which they say R1 should be twice the value of R2. I've looked, and not found a pair of resistors that are suitable, however I have some tiny resistor packs, and I could bridge 2 resistors to make one resistor thats half the value of the other resistors. They are pretty low resistance (63 ohms).

How about the ics or transistors? I have some routers that I can pull parts from, maybe I have the transistors already?
Logged


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

1.8k and 3.3k tend to work well. 
Logged

~Tom~

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

I think i have a couple 3.3k, but not 3. and I dont think i have anything close to 1.8k.

I just made up this little schematic to show one layer of the cube.

It shows the cathodes connected (this is physically how they are connected too)

The anodes are connected to the next layers anodes, but im only showing one layer in the schematic, or it would be very hard to read.



16 RGB LEDs means 48 Anode pins to control, but only one cathode.

I do like idea of each layer having common R anode, common G anode, and common Blue anode, then it would be 16 cathodes and 12 anodes. I just dont see a way to do that, and make the cube dimensionally stable. The way the cube is built now is pretty dimensionally stable
Logged


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

The way I have made mine structurally sound is to use a plastic frame, but I have access to a laser cutter at the University where I study so that may not be an option. The other thing I considered doing was to use plastic rod which can be gotten from hobby shops, and then either glue or melt the layer wires into it to give it rigidity.

What values of resistor do you have available? If you have enough 3.3k resistors, you can put two in parallel to get 1.65k which would give you exactly 3.3V. Alternatively any three resistors of the same value with the top of the potential divider being two in parallel will result in 3.3V

Code:
o-----+--+
      |  |
    R [] [] R
      |  |
      +--+-----o
      |
    R []    Where R = any value - preferably between 1k and 10k
      |
o-----+--------o
« Last Edit: October 30, 2012, 06:24:37 pm by Tom Carpenter » Logged

~Tom~

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

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.
Logged


Manchester (England England)
Online Online
Brattain Member
*****
Karma: 508
Posts: 31390
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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