Preface: Def a beginner at EEing.
I'm building out a proof of concept where I'm using transistors to create a logical AND gate to control LEDs. I'm using reed switches to trigger the transistors and putting the transistors' collectors/emitters in series so that both transistors have to be triggered for the final LED to light up.
Here's the schematic that made to work out the logic:
And here's the wired up bread board:
And this works ... mostly.
When I trigger the first reed switch it lights up the first yellow LED only. Good.
When I trigger both reed switches the two yellow LEDs come on AND the red LED comes on. Good!
But here's where the bad comes in: if I activate only the second reed switch, the one that leads directly to the red LED there's enough current passing through to faintly light up the red LED. Bad :'(
I'm not sure how to stop the current from the second transistor to the final LED. I'm assuming that it's the current from the gate pin on the second transistor passing through to the red LED, but I'm not sure how to stop it.
I tried adding a pull down resistor on the red LED's anode leg and that does help, but of course the red LED dims since the current has a different option to flow in.
Is there a way to keep the red LED off until both transistors are triggered?
I def want this to work, but I also want to understand why it's happening.
UPDATE
Here's the updated schematic and working circuit based on the replies I got here. Thanks again everyone for the help. It's very cool to see it working and to get it!
first reed switch
andfirst yellow LED
? ... the components have labels, please use them in your description \$\endgroup\$