1
\$\begingroup\$

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

\$\endgroup\$
2
\$\begingroup\$

Assuming the instructable schematic works okay, you can use the same values for the base resistors as for the 2N3904, there is not much difference between the transistors or the shift-register output current capacity.

I believe the transistors are only on one at time, and the absolute maximum Vcc current is 70mA, and absolute maximum continuous output current is 35mA implying a resistor value well above about 65 ohms or maybe above 130 ohms.

The other 74HC595s are being abused more severely since I believe all 8 can be on at once, which implies an absolute maximum peak current per LED of less than 9mA. With 100 ohms the current would be about 18mA if the 74HC595 output was perfect. At 7.8mA the Vol is guaranteed to be 150mV typical so it's almost certainly going to exceed 9mA (the absolute maximum limit) with all LEDs on that chip illuminated.

The consequence of this will likely be shortened life of the CMOS chips. It may not be a big deal for a toy that is kept in a benign (ie. cool) environment. The 74HC164 is rated for even less current (20mA per output and 50mA total through Vcc or GND) so you're better off than the original, for what that's worth.


As you are probably aware, the 74HC595 does require an additional strobe signal (RCLK). You may be able to simply invert SCLK and feed it to RCLK to get a similar result (or not, I've not looked into it deeply).

\$\endgroup\$
1
\$\begingroup\$

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
\$\endgroup\$
4
  • \$\begingroup\$ Sorry, but most of that went straight over my head. What is Rb, exactly? \$\endgroup\$ Apr 12 '19 at 15:29
  • \$\begingroup\$ It's the resistor that determines the Base current of your transistor. Per @Tony Steward you need to drop from 5V (logic output voltage) to 0.6V (LED forward voltage) when supplying 20mA \$\endgroup\$
    – mhaselup
    Oct 1 '20 at 2:51
  • \$\begingroup\$ Do you mean by "unless pulsed then 30mA max." that the mean current should be 30mA; or the pulsed (peak) current? \$\endgroup\$ Oct 1 '20 at 10:48
  • \$\begingroup\$ 30mA is often the “absolute maximum current” but it depends on your data sheet for I vs t @thebusybee FYI \$\endgroup\$ Oct 4 '20 at 1:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.