2
\$\begingroup\$

I'm trying out transistor logic for the first time using PN2222 transistors that came in a kit that I got from Amazon. I've been running into some problems with making a basic NOT Gate (as shown in the schematic below) and I haven't been able to complete it.

I believe that I have faulty transistors, but so far I've tried them all (as well as troubleshooting with a meter, checking for continuity, and changing all components for new ones) and have come to the same outcome every time.

Schematic

schematic

simulate this circuit – Schematic created using CircuitLab

The Problem

When I put my LED on the collector-side of my BJT with a resistor hooked to +5V without anything attached to the BJT's base or emitter I get what I expect, the LED lights up as the rest of the BJT has nothing to do with that LED circuit. However the moment I attach the emitter to ground, the LED shuts off. Applying any kind of input (logic high or low) provides no change.

I tried to connect an LED from the emitter pin to ground, replacing the wire I had used previously, and I found that the collector LED stays lit and the emitter LED is on, but barely.

I can provide pictures of my breadboard circuit if need be. Any help and advice is appreciated as I did say this is the first time I've messed around with REAL transistors, not ideal or simulated ones!

Update (Edit)

R = 1k ohm, R2 = 220 ohm
Here are some pictures of my circuit:

(sorry for the bad quality, my camera is terrible and the LED is quite bright)

The top two photos are of the emitter being directly grounded, the next two are with an LED connecting the emitter to ground. The first picture of both sets are with the switch off, then the second pics of both sets are with the switch pressed.

Emitter grounded, switch off

Emitter grounded, switch on

Notice that the LED connected to the emitter and ground lights up a little bit.

LED connecting emitter and ground, switch off

LED connecting emitter and ground, switch on

\$\endgroup\$
14
  • 1
    \$\begingroup\$ I think you are mistaking an open collector output stage which is for low current, voltage signals for a BJT as a power switch for high currents. Your BJT is acting as a switch that lets current bypass the LED completely. LED should be in series with R2 for it to act as a switch for LED current. \$\endgroup\$
    – DKNguyen
    Jul 20, 2019 at 20:59
  • \$\begingroup\$ @DKNguyen The kit probably really does use this circuit as a NOT gate. It's just that the OP misunderstands and thinks that sticking an LED to ground at the output will make the output visible and doesn't understand that the output may need buffering with an appropriate driver circuit for the LED in order to properly visualize the output-input relationship. Maybe. I don't know for sure. But that's what I'm imagining, now. \$\endgroup\$
    – jonk
    Jul 20, 2019 at 21:06
  • \$\begingroup\$ @DKNguyen I am attempting to follow along with this video: youtube.com/watch?v=sTu3LwpF6XI It is by Ben Eater where in the video he makes logic gates using transistors. Hope this helps! Also I am uploading pics of my circuit shortly. \$\endgroup\$
    – Emir
    Jul 20, 2019 at 21:13
  • \$\begingroup\$ @EmirCurtovic In the last two photographs, I see two LEDs hooked up. Can you explain why? \$\endgroup\$
    – jonk
    Jul 20, 2019 at 21:39
  • \$\begingroup\$ Exactly how did you "apply a logic low" to the input? Based on your circuit the base of the BJT is either a) driven high or b) floating (left as an open circuit). When it's floating leakage currents may be causing it to conduct anyway. Try attaching a resistor to ground -- for example a 100k resistor to ground, attached to the point where R and the switch meet. \$\endgroup\$
    – Mr. Snrub
    Jul 20, 2019 at 21:40

2 Answers 2

1
\$\begingroup\$

I solved my own issue by buying different transistors. All 5 PN2222 NPN transistors I got are apparently faulty.

I purchased a small electronics starter kit on Amazon as it was a Prime Day deal and it seemed like a steal at the time. However, the transistors I received were all faulty out-of-the-box. In addition, some other components included in the kit have been noted to not work here and there (bad quality control, I guess ¯(°_o)/¯ ).

Please learn from my shopping mistake and buy a better kit elsewhere.

\$\endgroup\$
3
  • \$\begingroup\$ Faulty, or... perhaps the pinout is E C B instead of E B C ? \$\endgroup\$ Jul 23, 2019 at 0:12
  • \$\begingroup\$ Woah! Been a year since this post! Regardless, I wanna say it was not switched around, the PN2222's were just bad, have done a lot of work with transistors and semiconductors since this post and I can easily say that with confidence as I tested this thought before I posted my answer. \$\endgroup\$
    – Emir
    Sep 12, 2020 at 16:35
  • \$\begingroup\$ Perhaps you are right. However I got a similar effect by swapping the Collector and Base. I suspect your transistors were incorrectly marked. Some 'equivalents' (eg. BC639) have the Collector in the middle. \$\endgroup\$ Sep 12, 2020 at 19:33
0
\$\begingroup\$

Just add a resistor between base - emitter to properly bias the transistor when switch is open. Floating base is a bad way.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for the advice on floating base! Despite this, however, my problem still persists. \$\endgroup\$
    – Emir
    Jul 20, 2019 at 23:40

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.