I am following a very simple schematic which is a NOT gate with a push button as input. The output is used to drive the base of a second transistor that turns on an LED:
This circuit works perfectly fine when two BC547A transistors are used:
If the push button is NOT pressed, the LED is on, otherwise off - like it is expected with a NOT gate.
If I switch the two transistors for 2N3904, it does not work anymore and the LED stays always off.
Both the BC547A and 2N3904 are simple NPN general purpose transistors. Up until now I was under the impression that they could be exchanged with each other pretty much always. Apparently, I was wrong, but would really like to understand what causes the difference in this very simple circuit to make one of them work and the other one not.
To be as precise as possible, here are the datasheets of the two transistors used during testing:
It's clear that the NOT gate could drive the LED directly, this is just a test setup to use the output of the gate to drive another transistor.