Here's an AND gate I built for practice and it's working with one quirk. Whenever I press the button closest to the LED by itself, the LED dimly lights up. I think there's enough voltage going through the transistor base/emitter to power the LED. How can I prevent that from happening? If it matters I have my calculations below. FYI I'm new to circuits so please talk to me like I barely know what all this means... Thanks in advance!
R1 Resistance
Vin = 9V
LED = 3V drop / .02A
Transistor 1 = .2V drop
Transistor 2 = .2V drop
You can also put a shunt resistor across the LED ... something like 2.2k or so. We see this a lot with the newer LEDs that are very sensitive to micro currents.
In your case the transistors BASE's are floating allowing them to behave like an antenna for anything attached to them. A resistor from the Base to the Emitter on each transistor will minimize this current as well. Anything from 10k to 100k should be fine.
You can also put a shunt resistor across the LED ... something like 2.2k or so. We see this a lot with the newer LEDs that are very sensitive to micro currents.
In your case the transistors BASE's are floating allowing them to behave like an antenna for anything attached to them. A resistor from the Base to the Emitter on each transistor will minimize this current as well. Anything from 10k to 100k should be fine.
I've searched many references, but now I'm stuck. What I understand so far is that a transistor is made up from two diodes, and as far as I know, the function of diode is only allow a current flow ...
electronics.stackexchange.com
That is you'll see a dim light from the LED - small current through R3, R1 and base-emitter of the rightmost transistor.