I'm trying to make a NOT gate, but with a PNP transistor instead of NPN. What would a wire diagram look like for a NOT gate with a PNP transistor?



It's the mirror image of the NPN solution: emitter to Vcc instead of ground, load resistor between collector and ground instead of between collector and Vcc.

Like JustJeff says, make sure your input high voltage is high enough. If it is less than Vcc - 0.6V the transistor will be always on, or at least conduct partially, which shows when your LED isn't completely off. You can make the base voltage higher by adding a resistor from base to Vcc. Together with the base resistor it will form a divider. Example: say Vcc = 5V and your input high voltage is 4.2V. That's too low, the transistor will always be off. If you place a resistor between base and Vcc the same value as your input resistor, the base will be at 4.6V and the transistor will be off.

  • 1
    \$\begingroup\$ Unless it's driven by something that outputs very close to Vcc for a high level, it might want a pull-up on the base. \$\endgroup\$ – JustJeff May 7 '11 at 18:38
  • \$\begingroup\$ @stevenvh but wait, where do i connect the led for an output? from the collector? \$\endgroup\$ – Trevor Arjeski May 7 '11 at 18:54
  • \$\begingroup\$ @TrevorMA - yeah, output would be from the collector. \$\endgroup\$ – JustJeff May 7 '11 at 19:04
  • \$\begingroup\$ @JustJeff Why do you go from ground to collector then? \$\endgroup\$ – Trevor Arjeski May 7 '11 at 19:32
  • 2
    \$\begingroup\$ it works but i think something it burning!!! \$\endgroup\$ – Trevor Arjeski May 7 '11 at 19:33

It seems that you want an inverter in the sense that you want to drive an LED on when you input a logic low, and off when you input a logic high. Something like this would do that:

RTL PNP Inverting LED Driver

Values for the resistors depend on your supply voltage, and on what you're driving the input with. Assuming Vcc of 5V, R1 in the range of 470 ohm to 1K would be a fair choice, regardless of the input device. For a CMOS stage (or a switch between Vcc/Gnd) driving the input, R2 and R3 about equal and about 1K to 5K ought to do. For a TTL input, R2 should probably be about 3 or 4 times the value of R3, e.g., R3=680 ohm and R2=2.2K, because TTL doesn't guarantee anything more than 2.4V for a logic high, and you'll need to get the base to at least Vcc-0.7V, or higher, to shut the transistor off.

  • \$\begingroup\$ I tried the above diagram ant I replaced R2 with a switch (or other input) and it worked. \$\endgroup\$ – user57729 Nov 6 '14 at 23:22
  • \$\begingroup\$ @That_Guy_You_Know - if you replace R2 with a switch to ground, you may pull inordinate current through the B-E junction of the transistor, resulting in loss of the magic smoke. R2 is there to limit that current to a safe value. \$\endgroup\$ – JustJeff Nov 7 '14 at 12:52

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.