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\$
4
  • 2
    \$\begingroup\$ Your transistor is working as a diode. Put LED and resistor on collector side. \$\endgroup\$ Commented Apr 11, 2018 at 20:26
  • 9
    \$\begingroup\$ Draw a schematic! We are engineers, not poets, we understand drawings, not poems! \$\endgroup\$ Commented Apr 11, 2018 at 20:26
  • \$\begingroup\$ @JakubRakus Can we not be both.... \$\endgroup\$ Commented Apr 11, 2018 at 20:27
  • \$\begingroup\$ Duplicate question, Justin. Just in case you do not know how to search here, see top of page. electronics.stackexchange.com/search?q=transistor+and+gate \$\endgroup\$
    – D.A.S.
    Commented Apr 11, 2018 at 21:02

1 Answer 1

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

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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