Go Down

Topic: My 3x3x3 and 5x5x5 LED cube (Read 10 times) previous topic - next topic

WonderTiger

#35
Feb 17, 2013, 10:14 pm Last Edit: Feb 17, 2013, 10:20 pm by WonderTiger Reason: 1
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 :).

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:).

CrossRoads

25 LEDs at 20mA is 500mA; you can't go much brighter without another supply.
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.

RosDaddy

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. :*) 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!

fillbob1

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.

retrolefty

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

Go Up