Hardware Reference
In-Depth Information
Current flow into the base of
Q
1
creates a voltage drop of
V
BE
= 0
.
7
V
, from the input
base lead to ground. So to calculate the resistor value
R
1
we take the
V
R
1
divided by the
current. The highest voltage coming from GPIO is going to be slightly less than the 3.3 V
power supply rail. It is safe to assume that
GPIO
HIGH
= 3
V
. The voltage appearing across
R
1
is thus
GPIO
HIGH
-V
BE
.
GPIO
-
V
R
=
HIGH
BE
1
I
B
307
0 002
1 150
-
.
=
.
=
,
W
The nearest 10% standard resistor value is
R
1
= 1
.
2
k
Ω. Using this resistor value as a
check, let's compute backward what our actual drive capability is from
Q
1
. First we need
to recompute
I
B
now that we know
R
1
:
GPIO
-
V
I
=
HIGH
BE
B
R
1
307
1200
19
-
.
=
=
.
mA
This tells us that the GPIO output pin will not have to source more than 1.9 mA of
current, using
R
1
= 1
.
2
k
Ω. Now let's calculate the maximum drive we can reliably expect
in the collector circuit of
Q
1
:
IIH
=
=
=
´
0 0019 50
95
CB FE
.
.
mA
■
Note
this discussion glibly avoids the effects of components being within ±10%
tolerance.
This computes that the designed 2N2222A driver circuit is capable of driving up
to 95 mA.