Electronics > Beginners

Transistor NOT gate slow output rise time

(1/3) > >>

TechJunkie97:
Hi, I wanted to invert a PWM signal (i.e. the HIGH duty cycle becomes the LOW duty cycle and vice-versa) so I decided to try a NOT gate using 2N3904 transistor on a breadboard. I found that the output takes ~4.5 us to become high (when the input becomes low). This time lag is significant for a 15-20 kHz switching frequency PWM signal. However, there is no lag (<100 ns) when output becomes low (When the input goes high).
Moreover, this output rise time improves to 2.3 us when I use 1k collector resistor instead of 10k and worsens when I use resistor value greater than 10k.

My theory:
It seems that there is some capacitance getting into the circuit. When I use lower the value of the collector resistor the RC constant decreases and I have smaller output rise time and vice versa.
what do you think is happening here?
Thanks

T3sl4co1l:
Place a 4.7k from base to GND, and reduce the collector load resistor to 1k.  Or double up the circuit, complementing polarity (resistor from input to base, base to VCC; use PNP, emitter to VCC, collector to output) and drop the collector resistor entirely, thus making the BJT equivalent of a CMOS inverter. :)

Further speed can be had by placing 100pF in parallel with each 10k from input to base.  Beyond that, I'd really strongly suggest something 74HC or LVC flavored instead. ;)

There is quite indeed capacitance in the circuit, and not just those on the datasheet (Ccb, Cbe) and their expected effects (i.e., Miller effect with Ccb), but also the equivalent capacitance of the charge stored in the B-E junction.

Diode recovery (stored charge) acts like a very small battery.  I'm... not sure if that's actually a useful statement of it, but it so happens that a battery has these properties.  Self-discharge is the charge leaking away over time, under no load.  The terminal voltage has an exponential dependence on concentration of the reactants (in this case, stored charges (conduction electrons and holes) in the semiconductor; in batteries, the chemicals used), times a nominal standard voltage drop (which is the reduction potential of the battery's chemistry, or, related to the bandgap of the semiconductor).

As it happens, the self-discharge of the diode junction is also proportional to its state of charge (beyond a baseline level).  In a BJT, this is the base current supplied by the input circuit.  Yes indeedy, the base current is something of an accident -- for the most part, we have to consider its effect on the circuit, and provide for it, but we never use base current as a primary design parameter.  (A consequence of this is the ratio between collector and base currents -- hFE -- which is generally consistent say over a range of currents, but this really just happens as coincidence and should not be relied on.)

Because batteries are nonlinear, we can't simply express them as capacitors.  Two practical ways to express it are: the incremental capacitance, C = dQ / dV (where d is a small change around some operating condition of charge Q and voltage V; and the average capacitance, C = Q /  V (for some instantaneous pair of Q and V).  Because this varies widely with condition, we might measure an effective capacitance for a particular case (like a saturated switch with 10k resistors around it), and use those figures in our calculations of switching speed, or current requirements or so on.  We can guess that this parameter will change gradually as we vary conditions, but beyond say a factor of 2x in any direction, we should probably measure again, and repeat whatever calculations we've based on it.

The "reduction potential" for silicon, by the way, is around 0.7V (it depends on initial current and doping), and the recombination time (self discharge) is on the order of 10-20us.  These are small batteries -- in the range of pico ampere hours! :)

And yeah, in case it's not clear, the B-E junction is for all intents and purposes, just another diode junction. :)  So, it has reverse recovery and nonlinear capacitance and all that.  MOSFET body diodes too, or JFET gates (though you don't usually forward-bias those; but if you did, you'd see recovery when turning it off, just the same).

Tim

TechJunkie97:
Thanks T3sl4co1l for your detailed and helpful reply. I had no idea about this phenomenon. I tried your suggestions and got much better results (<1 us output rise time) and I am very happy with this.

Actually, that PWM signal controls the speed of a fan and is also used elsewhere in the circuit. Turns out the fan speed is controlled by the negative duty cycle ( but I assumed the other so that fan speed was exactly opposite of the desired  :palm:). It was better to invert this signal for the fan instead of making changes to essentially all the circuit. I wanted to use BJT instead of 74HC logic as there is not enough space of the already soldered vero board to put a 14-pin DIP IC.

At least my stupid mistake helped me learn something good :)

TechJunkie97:
T3sl4co1l, just one question. How does putting a 4.7k resistor from base to GND, for example, help us in this circuit? Does it provide a path for the B-E junction to discharge charge faster instead of self-discharge? and how does it affect reverse recovery?
Thanks again for your help!

T3sl4co1l:
Yes, precisely.  That was the one thing I didn't wrap up: you need to discharge the battery, and that's what the resistor does. :)

Tim

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod