Hello again,
Here are some calculations that illustrate the problems with the circuit and how they can be corrected. The main idea is that the transistor has to turn fully on and fully off with the respective gate output voltage limitations.
Starting with the two equations for the circuit which includes the two resistors,
the logic gate output Vout, and the transistor base emitter voltages:
VbeH=(Vcc*R2)/(R2+R1)-(VoutH*R2)/(R2+R1)
VbeL=(Vcc*R2)/(R2+R1)-(VoutL*R2)/(R2+R1)
where VbeH is Vbe when the logic gate output is high at the voltage VoutH, and
where VbeL is the 'target' Vbe when the logic gate output is low at the voltage VoutL.
R1 is the resistor connected to the output of the gate, R2 is the other resistor
shown as 4.7k on the schematic as it is now (R19).
We assume Vcc=5 volts. We assume VoutH=3.5 volts and VoutL=0.5 volts which is
typical for a logic gate output.
First we can set Vcc=5,VoutH=3.5,VoutL=0.5 and get:
VbeH=(1.5*R2)/(R2+R1)
VbeL=(4.5*R2)/(R2+R1)
Now we see that if VbeL was equal to 3 times VbeH, these two would be exactly the same,
and that would also be a decent ratio for the on/off Vbe voltages. So this would mean
we set VbeL=3*VbeL in those two and of course get:
VbeH=(1.5*R2)/(R2+R1)
3*VbeL=(4.5*R2)/(R2+R1)
and now we can concentrate on the first equation:
VbeH=(1.5*R2)/(R2+R1)
Since we have two unknowns and only one equation, we have to pick one value and solve for the other.
If we choose R1=1-R2 we can solve for ratios instead of actual values and so we end up with:
VbeH=1.5*R2
and now solving for R2 we get:
R2=(2*VbeH)/3
Now if we set VbeH=0.3 volts for the turn off Vbe, we get:
R2=0.2
and since R1=1-R2 then:
R1=0.8
keeping in mind these are ratios. Taking them both together:
[0.8,0.2]
and multiplying by 5000, we get:
R1=4000 and R2=1000.
Inserting these back into the original equations we get:
VbeH=0.3 and VbeL=0.9
and that seems good. Note however the actual VbeL will be lower but all we need to do is make sure it is lower than about 0.75, but not as close as say 0.8 due to temperature variations.
The only thing left now is to calculate the expected base current.
Since when turned on Vbe is 0.9 volts and the output of the gate is 0.5 volts,
the voltage across R1 is 5-0.9-0.5=3.6 volts, which means the base current
is 0.9 milliamps. It will actually be higher because of the actual Vbe voltage so that is good.
If we expect the transistor to remain in saturation, we can only draw about
9 milliamps from the collector, so we'd have to see if the load requirement
would match that criterion. If it is just a logic output, it probably will
be ok, but if it has to drive anything significant we'd have to reexamine.
The actual current will be a little higher because of the actual Vbe voltage when turned 'on'.
The question that comes up of course is does 1k and 4.7k work instead of
1k and 4k. The answer is that they might, but the turn on Vbe voltage
would be just barely enough and may either limit the collector output
current too much or may not even turn it on enough at all.
It's simple enough to calculate, just use those values in the first set
of equations instead of the newly calculated values. Doing that we
find that the turn on Vbe is barely enough, if it works at all.