74HC595 - 8 (for 36 LEDs);
TIP122 - 6 (for controlling layers)
Power suppl - 5v-3.8A bought from ebay
I can turn on all 6 layers and light them at once with full brightness.
used shiftOutX library. attached it
ofc I also have 220 Ohm resistors for each led. 36 in total
everything works so far, but when I do multiplexing leds brightness decreased by a considerable amount. which makes the cube less brightness. Is there anyway to fix this? using some capacitors?
I used the delayMicroseconds(4000), which is less flicker also less brightness.
because you are have multiple layers active simultaneously which your 595s and possibly power supply may have difficulties with. I'm guessing that the layer transistors are connected to pins 2 to 7 and a HIGH switches the layer on.
You should probably do something like this:
if(i == 5){
digitalWrite(2, LOW); //row1 - ensure it is off
digitalWrite(3, LOW); //row2 - ensure it is off
digitalWrite(4, LOW); //row3 - ensure it is off
digitalWrite(5, LOW); //row4 - ensure it is off
digitalWrite(6, HIGH);//row5 - Switch on
digitalWrite(7, LOW); //row6 - ensure it is off
regOne.allOn();
delayMicroseconds(4000);
regOne.allOff();
}
You can refer to the layers much more elegantly if you define the pins in an array:
because you are have multiple layers active simultaneously which your 595s and possibly power supply may have difficulties with. I'm guessing that the layer transistors are connected to pins 2 to 7 and a HIGH switches the layer on.
You should probably do something like this:
if(i == 5){
digitalWrite(2, LOW); //row1 - ensure it is off
digitalWrite(3, LOW); //row2 - ensure it is off
digitalWrite(4, LOW); //row3 - ensure it is off
digitalWrite(5, LOW); //row4 - ensure it is off
digitalWrite(6, HIGH);//row5 - Switch on
digitalWrite(7, LOW); //row6 - ensure it is off
regOne.allOn();
delayMicroseconds(4000);
regOne.allOff();
}
You can refer to the layers much more elegantly if you define the pins in an array:
it does give me the highest brightness it can.
I already tried it. see lel()
in that code, 32leds are on except the four leds in the center. but the brightness is low
Please post your code inside your post, not as an attachment. Give a link to the download page of the library. Read the forum rules to find out how to post code and links properly. Also post a schematic. Hand drawn is OK. You don't need to show all 8 shift registers just a couple to show how you wired them.
From the tiny clues you have given so far, it could be your choice of components that is the problem. 74hc595 is not a great choice for lighting leds, especially when multiplexing, because of is current limits. Tip122 is also a poor choice because of its high voltage drop.
Basically you multiplex and the display dims. You can compensate a bit by increasing the current, but if your multiplexing stalls your LEDs go up in smoke.