as an inverter, let’s examine the two
possibilities.
The collector is tied to +5V
through R2, which serves as a
current-limiting resistor. Therefore,
when the base of the transistor is
also connected to +5V (through R1,
which is a current-limiting resistor
too), the transistor “turns on” which
effectively connects the collector to
ground. However, don’t forget the
small internal voltage drop I
mentioned earlier.
As a result, it would be more
accurate to say that the collector is
connected to 0.3V, not 0.0V
(ground), but that voltage drop isn’t
significant, and it’s simpler to just
think of it as “the collector is
connected to ground.” On the other
hand, when the base of the transistor
is connected to ground, the transistor
“turns off,” which disconnects the
collector from the emitter (i.e., no
current can flow into the collector).
So, in Figure 1, the collector is simply
connected to +5V (through its
current-limiting resistor).
To summarize the above: When
the base of the NPN transistor is at
+5V, the collector is (almost) at
ground; when the base is at ground,
the collector is at +5V. In other
words, the transistor switch functions
as an inverter: high in = low out, and
low in = high out.
Now, let’s turn our attention to
the level of the input signal at pin C. 3
of the 08M2. The first point that
needs clarification is resistor R3 —
which is connected between the
collector of the 2N3904 and pin C. 3
on the 08M2. As you know, pin C. 3
on the 08M2 is fixed as an input. As
a result, R3 is really not needed at all.
If we were to replace it with a
jumper wire, the circuit would still
function properly. Whenever the
2N3904 collector is at a high level,
the input to pin C. 3 is at a high level;
whenever the 2N3904 collector is at
a low level, the input to pin C. 3 is at
a low level. However, consider what
would happen if we accidentally
connected the collector to pin C. 4
rather than pin C. 3.
If C. 4 happened to be configured
as an output, whenever the voltage
level at the collector differed from
the voltage level on the C. 4 output, a
direct short would occur, and the
transistor and/or the 08M2 would
probably be damaged. Resistor R3
prevents that from happening by
limiting the current flow to a safe
level.
At first glance, it might appear
that resistors R2 and R3 form a
voltage divider, but that’s not the
case. As we discussed earlier, when
the voltage at the base of the
transistor is +5V, the transistor switch
turns on, so the collector is
connected to ground and pin C. 3 is
pulled low through R3.
On the other hand, when the
voltage at the base of the transistor is
0V, the transistor switch turns off, so
no current flows through the
collector and pin C. 3 is held high
through the combined resistance of
R2 and R3.
Before actually testing our
inverter circuit, there’s one last point
I want to mention. The only reason
the 08M2 is included in the circuit is
to provide visual feedback for the
state of the pin C. 3 input. The
program to accomplish this goal is
really simple, as we will see when
we’ve completed construction of the
test circuit.
However, if you prefer, you can
eliminate the 08M2 altogether, and
simply use a multimeter to measure
the voltage at the right end of R3 as
you change the voltage level that’s
input to the base of the transistor.
At this point, we’re finally ready
to test our simple inverter circuit. A
formal parts list isn’t really necessary;
all you need is a 2N3904 transistor
(or any general-purpose NPN
transistor you have on hand), three
current-limiting resistors (I used three
10K resistors, but anything between
1K and 10K will also work), a
resistorized LED (or a regular LED
and a current-limiting resistor), and an
08M2 processor with a programming
circuit. If you’re missing anything, all
the necessary parts (except the
08M2) are available on my website.
Figure 2 shows my completed
breadboard setup for this experiment.
As you can see, I deviated from the
schematic in two minor ways: I’m
using a resistorized LED (so I omitted
R4), and I replaced the SPDT switch
with a long jumper wire (which you
can see dangling in the lower right
corner of the photo). (When we run
the experiment, we’ll just insert the
SHARPENING YOUR TOOLS OF CREATIVITY
March 2015 11
■ FIGURE 2. Breadboard setup for
Experiment 1.