2
\$\begingroup\$

I need to do some switching and I want to turn off both +ve and -ve(GND)

I can use 1 NPN and 1 PNP transistor. But I'm wondering if I can use 2 NPN transistors only, I have some confusion about NPN. I've been reading for long time about transistors and now this is how I can use NPN.

enter image description here

But can I use NPN transistor like below schematic too ?

enter image description here

or only PNP can do this ?

\$\endgroup\$
  • \$\begingroup\$ Read up on high-side switching vs low-side switching. \$\endgroup\$ – tangrs Feb 22 '15 at 7:43
  • \$\begingroup\$ Both circuits are appropriate when switching a load. One may be preferred over the other for some target applications . \$\endgroup\$ – Andy aka Feb 22 '15 at 8:24
1
\$\begingroup\$

As far as the second circuit goes in the original question, using a NPN transistor as a "high-side" switch is generally not a good idea because you would have to bring the base voltage all the way up to Vdd to turn the transistor on, which would generally be a problem, for example, if Vdd is +12v and you are trying to drive it from a microcontroller output that can source only 3.3v or 5v.

Instead, the accepted way is to use a PNP transistor. Resistor R1 ties the base to Vdd and keeps the transistor off by default, so the microcontroller only needs to ground the base to turn it on. (Note this is the opposite of how the microcontroller usually operates; 0 means on and 1 means off). However you sill have the situation where Vdd can appear at the output pin of the microcontroller, which most can not tolerate above their supply voltage.

enter image description here

So a better scheme is to use both an NPN transistor and PNP transistor together, like this:

enter image description here

The PNP part of the circuit operates as before as a high-side switch, except now instead of the microcontroller directly grounding the base of the PNP transistor, instead it turns the NPN transistor on which in turns grounds the base of the PNP transistor. This isolates the Vdd voltage from the microcontroller.

Note this does invert the sense of the microcontroller again; so once again it is zero to turn the load ff, and 1 to turn the load on.

\$\endgroup\$
  • \$\begingroup\$ You have ON and OFF backwards in a few places. \$\endgroup\$ – Olin Lathrop Mar 25 '15 at 13:02
  • \$\begingroup\$ Fixed, thanks. My mind was thinking MOSFETs, not BJTs. \$\endgroup\$ – tcrosley Mar 25 '15 at 13:03
  • \$\begingroup\$ Thank you, can you please answer this electronics.stackexchange.com/q/161379/52245 \$\endgroup\$ – xmen Mar 25 '15 at 15:40
  • \$\begingroup\$ Why do I use this instead of the first config in OP's post ? \$\endgroup\$ – Vrisk Sep 21 '18 at 14:04
0
\$\begingroup\$

Basically the first circuit (named common-emitter configuration or transistor switch) is more appropriate for some reasons (smaller dissipated power, arbitrary input voltage). You have only to add a base resistor. A disadvantage is the ungrounded load.

\$\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.