Great job on the video! I'm going to try a variation....for the Anode transistors...don't need base resistors (emitter follows the base just 0.6V lower). And for the Cathode transistors, I'm gonna try PNP also in emitter follower configuration...the big difference is that now you pull the base LOW in order to turn on the Cathode transistor...but that's no big deal with the Arduino right?......so now the only resistors I need are the 4 current limiting resistors...Mark
@vicky27287 ouch, the 8051? never played around with that one, should be the same principle as what I'm showing. You may want to consider shift registers, think I made a vid on that
ok just to tell you all i have multiplex my 16x16x16 cube down to just a 12 pin setup so that the arduino its self can run my cube thanks kdarrah1234 with your help of multiplexing it give me a way of doing it
OK think about this can i run the arduino outputs to a decoder ic to get more outputs from the arduino by having the arduino send its code to the decoders and have them run the cube
@kcinkcinkcinnick yep, I'm using the same 5V used to power the arduino, transistors can kind of work like switches. I think I made a vid on that a a while back
I have to say... Multiplexing the axis of a multiplex array is genius, well played sir. A few questions/ideas. Could you in theory multiplex the 4 side of the 4x2 grid further and make it a 2x2? All of this is making my head spin thinking about it, I would definitely have to draw it out like you did to get my head around it. My 2nd comment, the drawing at 8:30... could you put a 2nd LED in parallel with the first, but polarity flipped? Thus double your led count using the same amount of pins?
The emitters of the transistors that control the cathodes, are hooked to pins of the AVR. This means that the emitters are grounded *through* the pin-driver circuit of the AVR and are subject to the current limitation of this circuit! If each cathode controls a whole row, then the corresponding LEDs will share the maximum current a pin can drain. But the amount of current a pin can drain is well below the current needed for, say, 5 LEDs... :S
@pvarelas true, and the wonderful thing about this control scheme is that there is only one LED on at a time, meaning we are only ever sourcing/sinking current for one LED
@kdarrah1234 You're absolutely right! You are multiplexing both the rows and the columns. I was thinking of my circuits, in which I only multiplex the rows and drive the columns "in parallel". Anyway, You've done a great job documenting your work! I ought to say that I have picked some tricks for my upcoming projects :-)
Small note, Arduino with a atmega328 have 18 I / O pins available, you can set them all to output if you like, and use them as digital pin. Arduino uC is just a avr and is full compatible white a the functions of that avr.
Interesting stuff, you should have used demultiplexers chip instead of transistors. You could have used like 2-3 of em instead of 16 transistors What you're doing is really demultiplexing seeing as your cube is the output.
good point on the demultiplexing. In a hardened industrial application I would definitely recommend using a specialized chip, but for fun... transistors are cool!
each base has a 1k ohm resistor, and each collector of the "anode" transistors has a 1k ohm resistor, to limit the LED current. I pretty much use 1k resistors for everything
Yea they should work no problem, I would test it out before soldering though... just to make sure you are supplying enough quiescent current to engage the base.
@kdarrah1234 one last question, what value does the microcontroller send to the cathodes?? for example if i want to light the first row i would send '1' to every anode and '0' to first cathode but what would be the values of the rest cathodes so that every led doesn't light up? If i send '1' to cathodes i would destroy the leds right?
check out my video on the led cube: how it works. You are actually only "lighting" up one LED at a time. You would then turn on each LED in the row separately at a high frequency, so it looks like they are all on at the same time. Basically, just make sure all of the other transistors in your grid are the opposite value that would engage them.
Could you theoretically connect all the cathodes per layer so you only have four transistors instead of 8? Then you could go from 12 pins to 10. Assuming we're still talking about a 4x4x4 cube.
I really appreciate you taking the time to make these videos. I think it helped me alot. Haven't yet looked at your other vids, but have you done a video showing how to program your light cube using multiplexing technique?
1) They isolate your circuit from the microcontroller, so that there is no way to accidentally source/sink above the rated maximum current; the controller simply triggers the bases of the transistor.
2) In this application, it allows you to "further" grid out the grid; the 8x8 grid can become two 4x2 grids. This minimizes the number of pins you need. 8+8=16pins... with the transistors; 4+2+4+2 =12 pins. Hope this helps, thanks for watching!!
Well, you can buy multiplexing chips that use shift registers, and they take care of all your outputs. The input of the chip would be similar to the inputs to the bases of the transistors... "different combinations will light up an output on the chip" I'm not sure if I mentioned it in my videos, but what I am doing is not an industry standard, its just the way I do it, so you may not want to use this method in a practical setting, but its a great way to gain a working knowledge of multiplexing
absolutely, I have heard of this, by "scanning" the pins and checking the "combination" of high and low reads. I will make a video of this in the future, I've got a keypad on order.
Hi, would you be able to give a similar tutorial on multiplexing an RGB LED cube?
Floatexa 2 days ago
@Floatexa that is something I'm definitely considering, time is a little tight right now... we'll see
kdarrah1234 10 hours ago
Great job on the video! I'm going to try a variation....for the Anode transistors...don't need base resistors (emitter follows the base just 0.6V lower). And for the Cathode transistors, I'm gonna try PNP also in emitter follower configuration...the big difference is that now you pull the base LOW in order to turn on the Cathode transistor...but that's no big deal with the Arduino right?......so now the only resistors I need are the 4 current limiting resistors...Mark
mallemang 1 week ago
@mallemang interesting! My transistor skills are a little weak, there is definitely room for improvement with my method, good luck!
kdarrah1234 1 week ago
i have tried a 5*5*5 led cube and i'm using 8051 micro controller
hmmmm i don't know how to multiplex it:(
could you help me out finding any circuit for tat:(
that to i got to submit it in my college well before 24th:)
vicky27287 1 week ago
@vicky27287 ouch, the 8051? never played around with that one, should be the same principle as what I'm showing. You may want to consider shift registers, think I made a vid on that
kdarrah1234 1 week ago
ok i have to ask what would be the best transister for my 8x8x8 cube
lilcreazz420 3 months ago
@lilcreazz420 i would experiment around with a few, but I used standard 2N3904s, just because I had a bazillion of them already
kdarrah1234 1 month ago
ok just to tell you all i have multiplex my 16x16x16 cube down to just a 12 pin setup so that the arduino its self can run my cube thanks kdarrah1234 with your help of multiplexing it give me a way of doing it
lilcreazz420 3 months ago
OK think about this can i run the arduino outputs to a decoder ic to get more outputs from the arduino by having the arduino send its code to the decoders and have them run the cube
lilcreazz420 3 months ago
you have another 5v power source?
so you deactivate a transister just buy putting off a pin from the arduino to the base of the transistor? :p
kcinkcinkcinnick 4 months ago
@kcinkcinkcinnick yep, I'm using the same 5V used to power the arduino, transistors can kind of work like switches. I think I made a vid on that a a while back
kdarrah1234 4 months ago
shift registers anyone?
Mlb312mlb 4 months ago
@Mlb312mlb haha, where's the fun in that!
kdarrah1234 4 months ago
dude, i can control 96 leds whit only 7 pins... and after i fonud a solution to control all this whit only 5 pins...
qw21er43ty65 8 months ago
@qw21er43ty65 oh yea, there are definitely better ways to control LEDs, this is a very old fashioned approach
kdarrah1234 6 months ago
With Charlieplexing you can control 30 LEDs with 6 pins...but itès would be a bit more complexe to make into a cube then Multiplexing.
Kajidimeh92 9 months ago
with Charlieplexing you can use 6 pins to control 30 LEDs.
Kajidimeh92 9 months ago
I have to say... Multiplexing the axis of a multiplex array is genius, well played sir. A few questions/ideas. Could you in theory multiplex the 4 side of the 4x2 grid further and make it a 2x2? All of this is making my head spin thinking about it, I would definitely have to draw it out like you did to get my head around it. My 2nd comment, the drawing at 8:30... could you put a 2nd LED in parallel with the first, but polarity flipped? Thus double your led count using the same amount of pins?
Damageinc333 9 months ago
The emitters of the transistors that control the cathodes, are hooked to pins of the AVR. This means that the emitters are grounded *through* the pin-driver circuit of the AVR and are subject to the current limitation of this circuit! If each cathode controls a whole row, then the corresponding LEDs will share the maximum current a pin can drain. But the amount of current a pin can drain is well below the current needed for, say, 5 LEDs... :S
pvarelas 9 months ago
@pvarelas true, and the wonderful thing about this control scheme is that there is only one LED on at a time, meaning we are only ever sourcing/sinking current for one LED
kdarrah1234 9 months ago
@kdarrah1234 You're absolutely right! You are multiplexing both the rows and the columns. I was thinking of my circuits, in which I only multiplex the rows and drive the columns "in parallel". Anyway, You've done a great job documenting your work! I ought to say that I have picked some tricks for my upcoming projects :-)
pvarelas 9 months ago
Whats the max voltage for the drain on the trasistors you used?
SoundsFantastic 10 months ago
I might not understand this but why use the transistors?
holdupmaster 10 months ago
@holdupmaster Because your µc can't supply that much current..
RonigKillah 10 months ago
im so confused... thanks for the vid nontheless
RavenRof 1 year ago
@RavenRof if you're confused, you're learning.... don't you hate it when your teachers say that!
kdarrah1234 11 months ago
Nice tutorial, keep up the good work. :)
Small note, Arduino with a atmega328 have 18 I / O pins available, you can set them all to output if you like, and use them as digital pin. Arduino uC is just a avr and is full compatible white a the functions of that avr.
Madmax23419 1 year ago
@Madmax23419 yep, that's right! Thanks!!
kdarrah1234 1 year ago
@kdarrah1234
I make a mistake, atmega328 have 23 i/o pins, arduino also, even reset pin can set to i/o, but you can not full sink that pin in think.
Madmax23419 1 year ago
This has been flagged as spam show
@kdarrah1234
@kdarrah1234
I make a mistake, atmega328 have 23 i/o pins, arduino also, even reset pin can set to i/o, but you can not full sink that pin i think.
Madmax23419 1 year ago
i got a fifteen pack of npn transistors for 2.99 and the pack had an extra transistor in it!
tiggyman93 1 year ago
@tiggyman93 sweet!!
kdarrah1234 1 year ago
thankyu
perazaroberto2 1 year ago
Uhmmmm... this is an AND gate made with transistors...
avpc79 1 year ago
@avpc79 yep, and that would be a better component choice!
kdarrah1234 1 year ago
can you multiplex the multiplexed transistors multiplexing the leds?
Durkadurka1995 1 year ago
@Durkadurka1995 oh yea!! you can make an extremely complicated/multiplexed circuit. Check out my video on the scrolling display
kdarrah1234 1 year ago
NO .. thank you mate :)
egyptionguy 1 year ago
Smart.
Then I learned something new today altso.
Flapjackbatter 1 year ago
Interesting stuff, you should have used demultiplexers chip instead of transistors. You could have used like 2-3 of em instead of 16 transistors What you're doing is really demultiplexing seeing as your cube is the output.
spike6sic6 1 year ago
@spike6sic6
good point on the demultiplexing. In a hardened industrial application I would definitely recommend using a specialized chip, but for fun... transistors are cool!
kdarrah1234 1 year ago
@kdarrah1234 I would use both ...transistors keep you from burning up your board (external power suppply)
danimal511 1 year ago
@danimal511 very true, I use them every time; let the transistors do the work, not your micro!
kdarrah1234 1 year ago
@kdarrah1234 ok thanks alot man...just wanted to see how it work cus I'm working on a project my self..I'm making an led mask..i hope it works...
da5ky30 1 year ago
How many and what kind of resistors you actually use for 64 led bulbs???
da5ky30 1 year ago
@da5ky30
each base has a 1k ohm resistor, and each collector of the "anode" transistors has a 1k ohm resistor, to limit the LED current. I pretty much use 1k resistors for everything
kdarrah1234 1 year ago
does the 2N2222a npn transistor works for this project?
indtruder 1 year ago
@indtruder
Yea they should work no problem, I would test it out before soldering though... just to make sure you are supplying enough quiescent current to engage the base.
kdarrah1234 1 year ago
@kdarrah1234 one last question, what value does the microcontroller send to the cathodes?? for example if i want to light the first row i would send '1' to every anode and '0' to first cathode but what would be the values of the rest cathodes so that every led doesn't light up? If i send '1' to cathodes i would destroy the leds right?
indtruder 1 year ago
@indtruder
check out my video on the led cube: how it works. You are actually only "lighting" up one LED at a time. You would then turn on each LED in the row separately at a high frequency, so it looks like they are all on at the same time. Basically, just make sure all of the other transistors in your grid are the opposite value that would engage them.
kdarrah1234 1 year ago
Very good video. Very detailed, informative and easy to follow. Great job.
UnwantedSAVIOR 1 year ago
@UnwantedSAVIOR
Thanks. I appreciate it... wasn't sure about partII, since the quality is kinda weak. Glad it helped!!
kdarrah1234 1 year ago
@kdarrah1234
Could you theoretically connect all the cathodes per layer so you only have four transistors instead of 8? Then you could go from 12 pins to 10. Assuming we're still talking about a 4x4x4 cube.
UnwantedSAVIOR 1 year ago
I really appreciate you taking the time to make these videos. I think it helped me alot. Haven't yet looked at your other vids, but have you done a video showing how to program your light cube using multiplexing technique?
juniorvhockey 2 years ago
Forgive my ignorance, but can you please explain why the transistors are required?
spudw2k 2 years ago
Two reasons:
1) They isolate your circuit from the microcontroller, so that there is no way to accidentally source/sink above the rated maximum current; the controller simply triggers the bases of the transistor.
2) In this application, it allows you to "further" grid out the grid; the 8x8 grid can become two 4x2 grids. This minimizes the number of pins you need. 8+8=16pins... with the transistors; 4+2+4+2 =12 pins. Hope this helps, thanks for watching!!
kdarrah1234 2 years ago
Thanks for the explanation. I've seen a few vids/articles mentioning Shift Registers. How do transistors differ from that?
spudw2k 2 years ago
Well, you can buy multiplexing chips that use shift registers, and they take care of all your outputs. The input of the chip would be similar to the inputs to the bases of the transistors... "different combinations will light up an output on the chip" I'm not sure if I mentioned it in my videos, but what I am doing is not an industry standard, its just the way I do it, so you may not want to use this method in a practical setting, but its a great way to gain a working knowledge of multiplexing
kdarrah1234 2 years ago
is it possible to" reverse multiplex" so that i can connect a bunch of buttons to only a few arduino pins?
b0bb0bs0n 2 years ago
absolutely, I have heard of this, by "scanning" the pins and checking the "combination" of high and low reads. I will make a video of this in the future, I've got a keypad on order.
kdarrah1234 2 years ago
cool! i recently got an arduino (actually a freeduino) and i was thinking for one of my first project, to make a handheld tictactoe game
b0bb0bs0n 2 years ago
Great idea, post a video response when its finished!!
kdarrah1234 2 years ago
awesome video, very helpful!
sabbath997 2 years ago
Thanks for sticking around for part TWO, glad it helped!
kdarrah123 2 years ago
this was soooo usefull !!
jensheylen 2 years ago
EXCELLENT! I think i've got it, Thanks so much.
Brysey19 2 years ago