Go Down

Topic: how am i going to use transistors to control the the current for each layer? (Read 545 times) previous topic - next topic

yangfizz

i wanna build a 2x2x2 led cube on my breadboard. i currently have uno, some leds, soldering iron and some jumper wires. i read some post online saying that i have use transistors for each layer, i wonder how that works because i don't see any transistor on top of each layer.

Osgeld

http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

CrossRoads

For layer 1 you will have 4 IO pins connected to current limit resistors and then to the 4 LED anodes.
All 4 cathodes will connect to the collector of an NPN transistor, emitter to Gnd.
5th IO pin to 270 ohm resistor to NPN Gate.

For layer 2 you will have the same 4 LED anodes connected to the 4 anodes from layer 2.
All 4 cathodes will connect to the collector of a 2nd NPN transistor, emitter to Gnd.
6th IO pin to 270 ohm resistor to NPN Gate.

Drive the anodes, turn on transistor 1 for 5 mS. Turn off transistor 1.
Drive the anodes, turn on transistor 2 for 5 mS. Turn off transistor 2.
Repeat.
Occasionally, change what you drive out on the anodes.

Exand the number of anodes, layers, transistors to make a bigger cube.
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.

yangfizz

oh, thanx, i now have a sense of what to do now, okay, so my last question is that how do i connect the transistor to the cathode on the second layer? and how i control the transistor to be on and off(sorry for being a noob.), through programming?

CrossRoads

Generally, folks seem to bend the "layer" pins out at a right angle (cathode in this case), and leave the column pins straight to connect to the LED below it anodes in this case).
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.

Go Up