I'm working on a hobby project where I have 4 groups of 16 LEDs (with a \$V_f\$ of 2.0V). I'm already past the point of putting the LEDs in parallel, since the entire circuit is powered by an Arduino (which can supply a maximum of about 50mA I've read)

Here's my circuit diagram. I left out the other 6 output pins on the shift register; 4 pins will be connected like \$Q_a\$, the other four like \$Q_b\$. The part within the dashed box is a simplification of another circuit)


simulate this circuit – Schematic created using CircuitLab

My strategy is to use a single shift register for each group, so I'll be chaining 4 of them. This requires a series of two LEDs on each output pin, which should work, since I use a \$V_{cc}\$ of 5V. I have two control signals per group, and the intention is to use one signal to ground the OE terminal. I thought that if I'd connect the other signal to the base of some NPN transistors, I get the following result:

  • SW1 closed: LED1 and LED2 are lit
  • SW2 closed: all LEDs are lit, unless SW1 is open

It is acceptable (and from the real setup, impossible) that SW2 is closed and SW1 is open, ending up with LED3 and LED4 unlit.

For the timing of the shift register, I'm using a simple Arduino program to have a single HIGH bit traverse through all shift registers. When it comes out of the \$Q_{h'}\$ of the last register, a new HIGH bit will be "inserted".

From my (limited) knowledge, I calculated the current as follows:

\$V_{R1} = 5.0 - (2 * 2.0) = 1.0V\$

\$I_C = \frac{1.0}{82} = 12.19mA\$

From what I understand of BJT transistors, I apply a base current of

\$I_B = \frac{5.0}{51,000} = 0.098mA\$

The transistor I'll be using is a 2N3904, which has a \$h_{FE} = 100\$ according to the datasheet. I chose the resistor value so that it would be around the inverse of the \$h_{FE}\$ of the transistor, to "eliminate" the current gain:

\$I_E = (h_{FE} + 1) * I_B = 101 * 0.098mA = 9.8mA\$

I'm still a bit confused with the concept of \$V_E\$, since it would be a lot higher than \$V_C\$. Do I need an additional resistor between the emitter and ground?

According to the circuit below, will my idea work, or am I missing something? I also wondered if I could "counter" the current gain by increasing the value of \$R1\$ and reduce \$R2\$ by the same factor? (I picked the \$82\Omega\$ value to get a 10mA current, which provides just the brightness I want for the LEDs)

  • \$\begingroup\$ move the diagram up to where it's most needed: before the second paragraph \$\endgroup\$ – Jasen Oct 12 '19 at 20:35

There are some misunderstandings on how current is computed.

When using an inverting transistor switch, hFE reduces towards 10% of its max value and is usually rated at hFE=10 at Vce=Vce(sat). Thus Rb must be much lower.

CMOS FETS have a high resistance already for each family. 74HC types such as this can be viewed in the datasheet for the drop voltage on Vdd-Voh, Vol-Vss(0) @ Iol,Ioh( eg. 4mA) @ 25'C Although the tolerance is 50%, and increases with low Vdd, consider nominal Rs = 50 Ohms for 5V logic.

concept of VE ? Ve=0V gnd


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.