Jonathan Kirwan ???
You hit it.
When your CMOS output is high, it is sourcing current into the BJT's
base. If this is the output of a micro, chances are that the
effective source resistance is in the rough 100 ohm range (50-500
wouldn't surprise me at all.) So this limits the current into the
base. However, the base will only rise up to about one diode drop,
though it may be more than .7V due to the neighborhood of 10mA or so.
This is not surprising. Think of the CMOS output itself as being two
switches like this:
: +3.3V
: |
: |
: o
: \
: \
: o
: |
: \
: / 100
: \
: /
: |
: +-------> CMOS OUTPUT
: |
: \
: / 40
: \
: /
: |
: o
: /
: /
: o
: |
: |
: gnd
where exactly one of the two switches is closed at any one time. I
specifically chose to use two different resistor values in order to
highlight the fact that the low-side FET usually has somewhat lower
resistance than the high-side FET -- although this is not necessarily
the case and some CMOS outputs are actually configured in the opposite
way (so that the sourcing side is actually beefier.)
Now, if you imagine this connected to your BJT, it looks like:
: +3.3V
: |
: |
: o
: \
: \
: o
: |
: \
: / 100
: \ ,------>
: / |
: | |/c
: +-------|
: | |>e
: \ |
: / 40 |
: \ gnd
: /
: |
: o
: /
: /
: o
: |
: |
: gnd
Now, when the upper switch is closed (the lower one open, of course),
current flows from +3.3, via the 100 ohm resistor, through the diode
which is the base-emitter diode of the BJT. The current in the BJT's
base rises exponentially with slight changes in the base voltage (at
about 60mV per 10-fold current change. So quite quickly the 100 ohm
resistor becomes the limiting factor. The voltage across the base-
emitter junction will rise to some 0.75V or so and the current will be
about (3.3 - .75)/100 or about 25.5mA. Actually, for 3.3V CMOS, the
actual current will probably be less than that. But in any case, the
base emitter voltage won't be a lot different from 0.75V.
Anyway, a resistor as others have said makes sense to further limit
the current. It's not likely that you need that much base current and
it's probably outside the specs for the CMOS, anyway. With a resistor
going from the CMOS output to the BJT base, you still won't see the
voltage at the base vary much from 0.7V. But, at least, the CMOS
output will then be permitted to be much higher than before -- much
closer to the value you expect from it.
Jon