Expandable LED cube 4x4x4 using 8051 with program example

Picture of Expandable LED cube 4x4x4 using 8051 with program example
The led cube is amazing. Let me try creating one. My version of course :D (as I may not have all components listed from other’s instructables).
Remove these adsRemove these ads by Signing Up

Step 1: The plan and result

Picture of The plan and result
I have less than 100 red led right now but will have more later so I plan to make an expandable cube, i.e. start from 4x4x4, make 8x4x4 or 16x4x4 when more led are available.

I google then got some understanding about how to make a led cube. I drafted the circuit as below. That fits my needs that I can expand to 16x4x4 or even 16x16x16.

I was too eager to solder the led. After two days, with some painful mistakes like wrong polarity, short circuits, damaged led, finally come with the successful product.

The design needs 24 (16 + 8 ) npn transistors and 4x100ohms resistors (may be another 8 for as pull up transistors for y and z).

Basically three transistors together determine the on or off of a led. When all three transistors have high signal, i.e, x=1, y=1 and z=1, the led will be turned on.

At a single moment, only one led is turn on. To show a shape like a line, a rectangle or a cube, turn on the led that link as the shape one by one, then repeat for several times. E.g. a straight line needs to link four led on one edge, switch on each led one at a time then repeat the cycle for 100 times, you will see the straight line. That is the effect of POV.

To make expandable, I split the product as three modules: 1) led matrix; 2) drivers (the transistors) to turn on the led matrix; 3) a MCU to program the sequence of led on and off.
BOOM OWWWW1 year ago
What resistors. Do I use for the LEDs in this scimatice
13, 10:15 AM.jpg13, 10:15 AM.jpg
whalescwh (author)  BOOM OWWWW1 year ago
Battery 9.6v, red led needs 1.7v, so r= (9.6 - 1.7) v / 20ma = 395 ohm. Green led needs 2.2v so r = (9.6 - 2.2)v / 20ma = 370ohm.
BOOM OWWWW1 year ago
What a bought R3?
whalescwh (author)  BOOM OWWWW1 year ago
U may google 'forward voltage for red led' to find the voltage. Should be something like 2v. so put in formula v=ir or r=v/i to get r3 value, where i=20ma, v=9.6 - 2.

Check also wiki below.
BOOM OWWWW1 year ago
I want to know what resistors to use for each led
BOOM OWWWW1 year ago
BOOM OWWWW1 year ago
How a bought this one
13, 2:36 PM.jpg13, 2:36 PM.jpg13, 2:36 PM.jpg
whalescwh (author)  BOOM OWWWW1 year ago
The diagram / circuit looks right. Now you can calculate the R1, R2 and R3.

The value should depend on your led color and the power supply.

The formula in used is V = IR. That is voltage = current x resistance.

Orange led needs 2v to turn on, so out of the 9.6v, 2v needs for the led, the rest 7.6v on R2. To light your orange led safe without burning it, I suggest you allow 20ma current to pass through your orange led and R2. So R2 = 7.6v / 20ma = 380ohm.

You don't have a 380ohm, so you can find a resistor with nearby value, like 300ohm. If you use 300ohm, the current will be 7.6v / 300ohm = 25.3ma will should still be safe for your orange led.

Google "forward voltage for led" then you can find what is the voltage required to turn on your red and green led.

Hope this helps.
BOOM OWWWW1 year ago
BOOM OWWWW1 year ago
What u mean?
whalescwh (author)  BOOM OWWWW1 year ago
ok, I checked the exact voltage about your leds. green led takes 2.1v, orange led takes 2v, so put resistor 375ohm (or some close value) in series with green led, resistor 380ohm (or some close value) in series with orange led. That will drive 20ma current through the leds.
BOOM OWWWW1 year ago
13, 9:13 AM.jpg13, 9:13 AM.jpg
whalescwh (author)  BOOM OWWWW1 year ago
Try (9.6-3)/20=0.33=330ohm
NTT1 year ago
Anyone else wondering about this Boom guy? lol
BOOM OWWWW1 year ago
Sry I'm using 9.6v battery
BOOM OWWWW1 year ago
Ill post a scimatice
BOOM OWWWW1 year ago
I am building a detonator I have the toggle switch an led the push switch and another led what resistors for them a 9.6v battery
whalescwh (author)  BOOM OWWWW1 year ago
I am not if i understand your problem. That depends on the color of your led and how you links you leds, parallel or in series.

Red led takes around 2 volt. So (9.6 - 2 ) / r = 20, that is r = (9.6 - 2) / 20 = 0.38 = 380 ohm for one led, or r= (9.6 - 2 x 2) / 20= 0.28 = 280 ohm for two led linking in series.
whalescwh (author) 1 year ago
From the program code you can see that at single point of time you only need to turn on one led, so the calculation is for one led. The minimum voltage supply is the mcu required voltage.
BOOM OWWWW1 year ago
I have a 9.6 v battery and need to know what resistors to use for the LEDs
whalescwh (author)  BOOM OWWWW1 year ago
For red led, forward voltage is below 2v. For transistor is around 0.6v so 1.8v. So leaving around 6v for the resistor. Led cannot bare large current. take 20ma, 6v/20ma => 300ohm should be ok.

I used 4.5v and 100ohm in my case.