The B-E junction acts like a diode, and a diode stores charge much like a battery.
This is actually very apt, if a bit unusual because of scale:
- A battery stores and releases charge (current * time).
- The voltage drop is exponential with charge state. (Ever had a phone where the charge indicator is on 4-5 bars, then it suddenly tanks? Yeah, that's running down the exponential slope as it runs out of charge. Proper indicators are supposed to account for this, but linear voltage scales are still very common...)
- The battery self-discharges.
- The battery self-discharges at high voltage, usually through alternative reactions (like electrolysis of water, which is what creates the explosion hazard for lead-acid batteries for example, when charged rapidly).
In this case, the amount of charge stored is very small, maybe 100pC.
In steady state, stored charge depends on forward base current.
There is no alternate reaction in silicon, just regular current draw. In effect, the self-discharge is exponential with voltage. BJTs are charge-dependent devices like any other, but because of this current draw, they can be treated as current-controlled for certain purposes (mainly as saturated switches).
The self discharge is extremely rapid, about 20us for lightly doped silicon. You can see this by using no GND resistor at all -- the transistor will stay on surprisingly long, until it eventually clears charge from the B-E diode, and in this case also from the capacitance of the driving transistor.
So, what you're doing is discharging that "battery", much faster than it would by itself. Any B-E resistance path helps, which is why your original wasn't too bad. Best performance is around where Ib2 = Ib1, with Ib1 being forward base current and Ib2 being reverse (turn-off) base current. The base voltage dwells around 0.6V as it's discharged through the B-E resistor (again, it's a battery, more or less) -- the B-E resistor continues to carry current even after the driving source has turned off.
So, you want to dimension things so that the pull-up resistor delivers 2*Ib, and the B-E resistor draws Ib at Vbe = 0.6V or so. Or,
Rpu = (Vcc - Vbe) / (2*Ib)
Rbe = Vbe / Ib
Ib is determined by what collector current you need to handle, and what saturated hFE you choose, usually around 20. (Most datasheets still use a standard figure of 10, but high-hFE parts have been spec'd at 80 or more -- good performance indeed!) So,
Ib = Ic(max) / hFE(sat)
Alternately, you want to use a resistor divider such that:
Supply voltage = Vcc
Thevenin output voltage Vth = 2*Vbe
Thevenin output resistance Rth = Vbe / Ib
These in turn use,
Rth = R1*R2 / (R1 + R2)
Vth = Vcc * R2 / (R1 + R2)
and some algebraic rearrangement.
Tolerance: don't worry about it, Vth can be much higher (which after all, is what you had originally, Vth = Vcc and Rth = some kohms).
Note this doesn't account for capacitances, which are real, and not quite the same as the [excess] stored charge. The capacitances are there regardless of current flow, so you can't expect good performance if you run at, like, 10uA and use 100k+ resistors. It's going to be slower of course. In that case, the capacitance dominates, and you just use RC time constants (and risetime = 2.2RC or thereabouts) as they are dominant.
That's probably the next thing you're up against, assuming you want/need a still sharper waveform -- a stiffer pullup will charge the collector capacitance faster.
It's practical to get edges down in the 50, even 20ns range from 2N3904s and such; but you do need to spend a few mA doing it. You can save a few in turn by using a more complicated circuit, like replacing pull-up resistors with current sources, using "speed-up" caps across series resistors, using cascode connections and such; but this shouldn't be necessary for present application, at least.
Tim