Electronic – LED cube using 74HC595 and 2N2222

npnresistorsshift-registertransistors

So I'm trying to build an 8x8x8 LED cube according to this Instructables. But I'm using slightly different parts:

  • 74HC595 shift registers instead of 74HC164
  • 2N2222 transistors instead of 2N3904

I'm still using the same 100 ohm resistors as him for each output on the shift registers.

My question is, what base resistor value should I take for the transistors so that I don't pass too much current through the shift registers?

LED Datasheet

Best Answer

the 74HC595 datasheet says for Voh , the output using 4.5Vdc (5V-10% tol.) will drop 200mV to 500mV with 6mA load.

The transistor needs 5% to 10% Ic to achieve Vce=Vce(sat) at some rated current as they are usually rated at Ic/Ib=10 since hFE drops towards 10% of hFE when saturated as a switch.

The LED prefers 20 mA avg (unless pulsed then 30mA max.)

Thus Ib= 10% of 20mA = 2mA from 5V to ~0.6V (Vbe=0.6 @ 1mA)

So what is Rb from the shift register?

Added

Rb is your base resistor in question. A full of thumb using the same supply voltage for base and collector sources using any transistor as a switch, I make Rc/Rb =20. But more accurately you would compute the diode drops and Ic/Ib= 10 to 20 for the base current of 5 to 10%.

  • you must compute the R voltage drop by subtracting the diode drops for Vbe= 0.65 and Vf=3.1V for Blue/White