Still learning on my own so I am really not an expert.
I built a small circuit and can’t get the expected behavior.
Here is the schematic:
This is pretty simple. The PNP on top is connected to 5V on the emitter and the collector is connected to a current limiting resistor and an LED (so I can see when there is current.)
The base of the PNP is connected to the collector of a NPN and the emitter goes to ground.
The collector of the PNP provides currrent to the base of the NPN so when the PNP is on, it keeps the NPN on and the LED stays on.
I also connected the base of the NPN to a switch button that is connected to ground.
When I press it, the NPN base is grounded so it turns off and the PNP base gets 5V (from a resistor connected to 5V and the PNP base) and the LED turns off as expected.
Where I don’t get it is that as soon as I release the button, the LED goes back on.
Like if the NPN base was getting 0.7V from the PNP collector (that is supposed to be off.)
Here's a picture of my breadboard circuit:
I was looking at building something like this and wanted to test if it was working prior to adding the second npn (and using a pnp instead of a mosfet)