2
\$\begingroup\$

PN2222A Pin out

I have; pin E to LED's positive pin
- negative pin of the LED is connected to a resistor and then ground.
- If I then leave pin C open and apply power to pin B it will turn the LED on,

It is supposed to not turn the LED on because there is no power to pin C?

This is a problem because;
I am trying to make an AND gate by connecting,
- the E to the C pin of another.

I am supplying power using a Arduino.

What might be my problem?

I have tried using 5v power and 3.3v power to see if I am overpowering it.

EDIT: PN2222A Pin out Here is my circuit. I followed the suggestion and flipped the transistor and the LED still lit up when it should not have. Any other ideas? I also read some other questions and I think that I should not be using PN2222A transistors but instead use a 2n7000 transistor. If that is the case would this work https://www.amazon.com/MCIGICM-2n7000-n-channel-transistor-assortment/dp/B07BKX255D/ref=sr_1_17_sspa?ie=UTF8&qid=1523501912&sr=8-17-spons&keywords=2n7000&psc=1?

\$\endgroup\$
6
\$\begingroup\$

so you are using NPN transistor, as somebody mentioned it in comments you are using it as a diode.

This is the right scheme you should be using

right scheme

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.