Electronic – Using NPN Darlington to switch on PNP

7segmentdisplaytransistors

I'm trying to separately switch on the digits of a 2 digit common anode 7 segment display (specifically the Lumex LDD-E2802RD because it's small and cheap). I think that the easiest way of getting my microcontroller (an MSP430G2335) to do this is by connecting A-G,DP through resistors \$R(4+i), 0\le i\le 7\$. A shift register will switch on transistors \$Q(3+i)\$ (incorrectly labeled \$Q(4+i)\$) to turn on individual segments (assuming they're being powered "from above") (figures below).

In order to turn on the individual digits, it seems like a PNP is the way to go. The problem is that I want to supply my LEDs with 6.3V, which is my circuit's \$V_{CC}\$, because my 3.3V line can't supply a lot of current.

Let's start with what (I think) I know: each segment of the display draws 25mA steady state, with a peak of 150mA for 10us, and has a forward voltage drop of about 2.2V. This means my LED resistors should be
$$R_\text{LED} = \frac{V_\text{LED}}{I_\text{LED}} = \frac{V_{CC}-V_f}{I_\text{LED}} = \frac{6.3\text{V}-2.2\text{V}}{25\text{mA}} = 164\Omega \approx 180\Omega$$
and the transistors on the shift register output should be able to handle at least 25mA (ideally more just to be safe — I'll probably end up using an 8 element Darlington array).

Now for the part where I'd like to make sure I'm not making a mistake. I used http://www.rason.org/Projects/transwit/transwit.htm as a guide for how to use the PNP, as I've really only used NPN and N-channel devices in past designs. The PNP, \$Q2\$, will need handle at least \$8\cdot25\text{mA}=200\text{mA}\$ of current flowing through it (plus a little extra just to be safe), so a BC807 seems like an appropriate choice. To calculate \$R2\$,
$$I_B = \frac{I_C}{h_{FE}} = \frac{200\text{mA}}{60} = 3.3\text{mA}$$
so
$$R_2=\frac{V_{CC}-V_{BE}}{I_B} = \frac{6.3\text{V}-1.2\text{V}}{3.3\text{mA}} = 1242 \approx 1.2\text{k}$$
The aforementioned PNP guide suggested that \$R3 \approx 10\cdot R2\$, so \$R3=12\text{k}\$.

Because my microcontroller's logic high is 3.3V and it can sink/source a maximum of 6mA on each GPIO pin, it seems like a good idea to use an NPN (Darlington) transistor to turn on and off \$Q2\$. (Maybe 3.3V would be enough to turn off \$Q2\$ and 3.3mA isn't all that much current, but transistors are incredibly cheap in terms of actual cost and PCB real estate.) It appears that \$I_{C_{Q1}} = I_{B_{Q2}}\$, so to calculate \$I_{B_{Q1}}\$ (hereafter \$I_B\$), I perform similar calculations, this time using values from the BCV27 datasheet.
$$I_B = \frac{I_C}{h_{FE}} \approx \frac{4\text{mA}}{4000} = 1\mu\text{A}$$
and
$$R_1 = \frac{V_{CC}-V_{BE}}{I_B} = \frac{6.3\text{V}-1.5\text{V}}{1\mu\text{A}} = 3.8M \approx 3.9M$$
although I'm guessing that since \$I_B\$ is so low, \$R_1\$ isn't really necessary, although if I wanted to include it, something easier to find like a 1M resistor would do.

So that's about it, right? It just seems a little weird to me that I need to switch on the PNP with the NPN, and I wanted to make sure I'm doing this the right way.

Lumex LDD-E2802RD

Lumex LDD-E2802RD

Imagined circuit setup

Imagined circuit setup

Best Answer

Pretty close.

You should give the PNP a lot more base current to make sure it saturates. Use a forced beta of 10-20, which means that the resistor R2 should be more like 470R.

The value of R3 is not critical, 10K would be fine, so would 20K.

You don't need a Darlington to drive the PNP transistor, a regular NPN will be fine. Use a base resistor of more like 10K. The base resistor limits the current- it is determined by the desired base current, not by the gain of the transistor- you do always need it.

Keep in mind these Darlington things won't switch instantly and if you don't allow some dead time in the drive firmware you'll get 'ghosting'.