Pages: 1 2 [3] 4 5   Go Down
Author Topic: My 3x3x3 and 5x5x5 LED cube  (Read 9443 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a question about the current draw from the arduino 5v pin. Is it true that i can pull around 450mA from that pin(Usb powered, arduino uno itself use around 50mA or something close to that, so that leaves me 450mA IF all the digital pins are turned low).

Thanks in advance smiley!
« Last Edit: February 04, 2013, 04:14:19 pm by WonderTiger » Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 146
Posts: 5469
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a question about the current draw from the arduino 5v pin. Is it true that i can pull around 450mA from that pin(Usb powered, arduino uno itself use around 50mA or something close to that, so that leaves me 450mA IF all the digital pins are turned low).

Thanks in advance smiley!

On USB power, yes. You can do about 20 LEDs at 20mA, powered from the 5V pin (not from Arduino I/O pins).

For more than that you need another 5V power supply.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok thanks:D! I only will use around 325 mA at the most so arduino will provide enough when connected to USB, thanks again!
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So after 3 days I finished my 5x5x5 LED cube. Now everything is working fine, however if I multiplex more then three layers my LEDs goes less bright then when I'm only multiplexing 3 layers. It's not a big deal but if someone has an explanation for it it would be great!

pics comming soon!
Logged

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

How has this been going? do you have pix or video yet?

I dont understand your statement about how its going not so bright, or why that might be happening.
Logged


Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry for the delay but I have been on vacation lately. Tommorow I will post some pics of it. I still have some struggling with the code but I almost figured out. So the videos will be posted within a week smiley.

I figured out the brightness issue though. Its because the duty cycle is around 1/5 if I multiplex 5 layers. To fix it I should pulse my leds with much more current then I do right now. I dont really mind about the brightness loss so I keep it in its original state:).
« Last Edit: February 17, 2013, 04:20:48 pm by WonderTiger » Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 534
Posts: 26969
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

25 LEDs at 20mA is 500mA; you can't go much brighter without another supply.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi. im an arduino newbie as well and I just built a 3x3x3 led cube this weekend and wanted to ask you a couple of questions. I built the cube and made sure all the pins worked but got a little bit stumped when it came to programming since it was my first time. Just from reading through these posts I understand now that it is smarter to light up each layer at a time so I have a 1/3 duty cycle. (I was doing 1 led at a time with 1/27th duty cycle. smiley-kiss) But my first question is why use transistors? I hooked each layer up to a specific pin and when I want the layer off I just set the pin to HIGH. Is there an advantage to using transistors?

My next questions is going to be about how you simplified your code. But im going to rewrite my coding a little tonight just so I can see the cube in action and then I will post it.

Thanks in advance! and good work, I hope I will learn as fast as you did!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What I did was do the 1/27 duty cycle, alot of code but you can copy and paste so it becomes easier. You could also use for less code is lable a xyz not sure how to do that though.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17293
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
But my first question is why use transistors? I hooked each layer up to a specific pin and when I want the layer off I just set the pin to HIGH. Is there an advantage to using transistors?

Not just an advantage, but a requirement to use a transistor to enable or disable each layer. As when a layer is enable the amount of current allowed to flow is dependent on the number of leds your software has commanded to be on for that layer and that can vary from 0 to 9 leds for a 3x3x3 cube.

 So worst case, 9 leds x 20ma= 180ma is way more current then the arduino output pin controlling the layer can handle, so the need for the arduino output pin to control a switching transistor that can handle that amount of current.

That make sense?

Lefty
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here are some pics smiley:















Next time I'm gonna design a PCB and etch it at school.
Logged

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

Somehow this ended up a lot more parts than I had originally expected. it looks like you are using 5 transistors for switching planes on or off, and 5 shift registers for columns.
Logged


Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes there quite a few parts in this one, here a list of all things I used:

-125 LEDs
-Copper wire to give the layers more thoughness
-5 NPN 800mA (2n2222) transistors
-5 x 150 ohm resistor for the transistors
-2 experiment boards to solder the components on
-14 male, 5pin connectors
-13 female, 5 pin connectors
-1 male, 3 pin connector
-2 meter 10wires ribbon cable
-6 meter white wire
-2 meter black wire
-2 meter red wire
-1 meter blue wire
-2 meter green wire
-2 meter yellow wire
-6 shift registers and 6 ic-sockets
-6 100nF ceramic capacitors
-25x 220 ohm resistors
-1x 10K resistor

This is all I used. I use 5 shift registers to control 5 LEDs per shift register, the 6th shift registers is for controlling the layers via the NPN transistors.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

5x5x5 cube looks good!

I still dont understand the need for transistors for the grounds. When I want to ground a layer I just send a LOW signal to that layer. When I want to turn the layer off I send a HIGH to the layer. A 5V HIGH shouldn't be enough voltage to reverse bias the led so it shouldn't hurt it.

I may be wrong smiley-eek

Thanks!
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The digital pins from the arduino can only sink(/source) up, up to 40mA. If I turn on 25 LEDs on one layer the total current that need to be sinked by the digital pin would be 25*13mA = 325mA, this is far too much for a digitalpin. Instead I use NPN transistors, the collector from the transistor is connected to each layer of the cube. The emitter is connected to ground from the arduino (Ground from the arduino can sink up to around 450 mA on USB) and the base is connected to a digital pin on the arduino (in my case to the shift register). Now I am able to turn on 25 LEDs on one layer without frying something. The other advantage from transistors is the way how the ground is turned on/off, I send a HIGH signal to the base from the transistor so it switches the selected layer to ground. Because I can use HIGH instead of LOW (what you mentioned) it makes it easier to program.
« Last Edit: February 18, 2013, 01:59:45 pm by WonderTiger » Logged

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