I suggest you to go with Fig:2 because of the open collector configuration. The first circuit will be preferred for logical output. The first circuit will also works, but unnecessary power dissipation will happen across the resistor even if the LED turn off...
hmm, yeah I see, there is a current flowing always on the circuit 1.
But, why do you think that it is a better choice for logical output ?
Also, in the case of a digital output, should I be concerned with the voltage drop on the BJT transistor ?
You are driving the transistor base with about 1/10 of the collector current for a forced beta of 10 (the typical recommended value) which will give good turn-on of the transistor well into saturation. For that, the output Vce drop of the transistor when ON should be less than a tenth of a volt.
You are driving the transistor base with about 1/10 of the collector current for a forced beta of 10 (the typical recommended value) which will give good turn-on of the transistor well into saturation. For that, the output Vce drop of the transistor when ON should be less than a tenth of a volt.
Yeah I see, but someone told me, that for example If I put a BJT in this configuration here:
A person told me that when this NPN is conducting in the circuit above, I'll always have an offset of 0.6V on the "TO MCU INPUT" probe, which means that I'll never have 0V on it.
So if I connect a digital pin like an input of MCU on the "TO MCU INPUT" it will never go down to 0V it will always be 0.6V from GND due to the BJT drop. Is that true ?
So my digital port will work between 5V for ON and 0.6V for OFF state.
I personally don't agree. What do you say about that ?
Not true. That "person" is a poor source of electronic information so please avoid him/her for such questions. The Vce ON voltage of the transistor should be less the 0.1V for that circuit. Perhaps the confusion is that Vce can be less than the Vbe ON voltage which is 0.6 to 0.7V typically.
Well there is only one more question, the heat produced by the BJT is due to the small drop of voltage causing a resistence to the current I(c) right ?
Also, to avoid the waste of energy in heat dissipation, I should ensure proper saturation, correct ?
Yes. With proper saturation of the transistor the waste heat will be very small. For example 5mA with a 0.1V drop is only 0.5mW. That raises the temperature about 0.1°C for a typical small transistor case which is too low to feel.