Author Topic: PNP transistor switching voltage  (Read 4158 times)

0 Members and 1 Guest are viewing this topic.

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
PNP transistor switching voltage
« on: August 13, 2018, 09:37:18 am »
Hey guys, couple of questions regarding PNP transistors.

I'm planning on using a PNP device to switch a 12V system using a 5V MCU - as far as I can tell, I'd need some additional circuitry to make this work, as the PNP device would need 12V to the base to switch off completely?

Also, related question - what would I need for Vce?

Cheers guys :-)

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5116
  • Country: bt
Re: PNP transistor switching voltage
« Reply #1 on: August 13, 2018, 12:07:23 pm »
Transistors are not voltage driven devices but current driven devices.
You have to ask how much current would you need in order to switch a load with a PNP transistor.

And yes, you would need an another transistor to drive the PNP properly. For example:
EDIT: fixed the missing 1k resistor in Q2's base.
« Last Edit: August 13, 2018, 03:00:33 pm by imo »
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: PNP transistor switching voltage
« Reply #2 on: August 13, 2018, 12:10:08 pm »
Transistors are not voltage driven devices but current driven devices.
You have to ask how much current would you need in order to switch a load with a PNP transistor.
I'm afraid you've completely lost me there... Certainly destroyed any idea I previously had regarding their operation [emoji23] could you expand?

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5116
  • Country: bt
Re: PNP transistor switching voltage
« Reply #3 on: August 13, 2018, 12:21:45 pm »
Transistors are not voltage driven devices but current driven devices.
You have to ask how much current would you need in order to switch a load with a PNP transistor.
I'm afraid you've completely lost me there... Certainly destroyed any idea I previously had regarding their operation [emoji23] could you expand?

Sent from my ONEPLUS A3003 using Tapatalk
See above a schematics.
You are lost as you have not looked at the basics.. :)

Mind you have to specify how much current/how_fast you want to switch the LOAD on/off with the high-side PNP transistor, as you have to do some calculations as well.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: PNP transistor switching voltage
« Reply #4 on: August 13, 2018, 12:25:41 pm »
Transistors are not voltage driven devices but current driven devices.
You have to ask how much current would you need in order to switch a load with a PNP transistor.
I'm afraid you've completely lost me there... Certainly destroyed any idea I previously had regarding their operation [emoji23] could you expand?

Sent from my ONEPLUS A3003 using Tapatalk
See above a schematics.
You are lost as you have not looked at the basics.. :)

Mind you have to specify how much current/how_fast you want to switch the LOAD on/off with the high-side PNP transistor, as you have to do some calculations as well.
Ah, gotcha.

Transistors have never been a strong point with me at all - I like to think I can work with most circuits, but for some reason transistors have always eluded me :-)

As long as I have some kind of functional diagram, I'm happy - it's literally just to switch LEDs as the micro can't supply sufficient current, speed etc isn't important :-)

Cheers for the help!

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19866
  • Country: gb
  • 0999
Re: PNP transistor switching voltage
« Reply #5 on: August 13, 2018, 12:43:36 pm »
Transistors are not voltage driven devices but current driven devices.
You have to ask how much current would you need in order to switch a load with a PNP transistor.

And yes, you would need an another transistor to drive the PNP properly. For example:
That's a bad circuit. There's nothing to limit Q2's base current. Q1's Hfe will probably result in far too higher base current in Q2. Move R1 to between Q1's emitter and 0V.
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: PNP transistor switching voltage
« Reply #6 on: August 13, 2018, 02:14:13 pm »
I show it fixed:
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5116
  • Country: bt
Re: PNP transistor switching voltage
« Reply #7 on: August 13, 2018, 03:01:14 pm »
Fixed in my above post. Thanks.
 
The following users thanked this post: exe

Online Alex Nikitin

  • Super Contributor
  • ***
  • Posts: 1292
  • Country: gb
  • Femtoampnut and Tapehead.
    • A.N.T. Audio
Re: PNP transistor switching voltage
« Reply #8 on: August 13, 2018, 03:02:59 pm »
Transistors are not voltage driven devices but current driven devices.
You have to ask how much current would you need in order to switch a load with a PNP transistor.

And yes, you would need an another transistor to drive the PNP properly. For example:
That's a bad circuit. There's nothing to limit Q2's base current. Q1's Hfe will probably result in far too higher base current in Q2. Move R1 to between Q1's emitter and 0V.

It is not just a bad circuit, it is a completely wrong and dangerous circuit  :palm: . If Q1 is a small device, it would just blow up rather quickly and can take Q2 with it!

Cheers

Alex

P.S. - looks like I was late to the party  ::) .
« Last Edit: August 13, 2018, 03:04:39 pm by Alex Nikitin »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5116
  • Country: bt
Re: PNP transistor switching voltage
« Reply #9 on: August 13, 2018, 03:06:42 pm »
There is nothing wrong with that circuit now. A typo has been fixed.
If you have a better circuit you may post, there could be several variants, sure.  :clap:

PS: As I wrote above we need more info on his requirements (LOAD, speed) as the currents/transistor_types have to be designed based on the requirements. The above circuit is "for example" only, the resistor values are "an example" only.

In case he wants to switch an inductor, or an electromotor, or a welding machine he needs much more components to add, indeed.
« Last Edit: August 13, 2018, 03:16:26 pm by imo »
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: PNP transistor switching voltage
« Reply #10 on: August 13, 2018, 04:14:55 pm »
There is nothing wrong with that circuit now. A typo has been fixed.
If you have a better circuit you may post
Your R3 is in the wrong place and draws way too much current, more than the transistor Q2b that it turns off. My fix changed the value of R3 and placed it correctly parallel to the base-emitter of Q2.
I also increased the value of R1 so that it dopes not overload the MCU.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17084
  • Country: us
  • DavidH
Re: PNP transistor switching voltage
« Reply #11 on: August 13, 2018, 04:26:52 pm »
Below are some other variations.

The upper left is the variation Hero999 suggested with Q1 operating as a constant current source.  R1 and the resistor in series with the collector are optional.  The collector series resistor may be desirable to limit power dissipation in Q1; it could be replaced with a zener diode.  I like this one for general use.

The upper right circuit has a non-inverting level shifter (a digital low turns the PNP on) allowing an optional series RC feedforward network to speed up switching of Q2.  This configuration might be used in a switching regulator.  The resistor in series with the collector of Q1 (not marked) is again optional and reduces power dissipation; it could be replaced with a zener diode.  The resistor in the series RC circuit is often zero ohms.

The lower circuit uses a zener diode for the level shift but depends on the 12 volt supply being stable.  The resistor in series with the zener diode (12V - 0.6V - 2.5V = 8.9 volt zener diode) limits the drive current.  The optional series RC circuit speeds up operation.  The resistor in the series RC circuit is often zero ohms.

Note that the last two circuits require the logic output to provide the entire drive current plus the charge through the feedforward network if used.  If this is a problem, then a buffer may need to be added or a more powerful logic output used.  The advantage of these circuits is much faster switching because non-inverting operation allows the feedforward network to drive charge directly into and out of the base of the output transistor.  In practice, a Baker clamp on the output transistor might also be added to further speed up operation.
« Last Edit: August 13, 2018, 04:29:00 pm by David Hess »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19866
  • Country: gb
  • 0999
Re: PNP transistor switching voltage
« Reply #12 on: August 13, 2018, 04:28:20 pm »
There is nothing wrong with that circuit now. A typo has been fixed.
It was not a typo, but a missing/incorrectly placed part, which would cause smoke!

Don't worry about it, this kind of mistake is easy to make and is one of the reasons why forums like these exist.


Quote
If you have a better circuit you may post, there could be several variants, sure.  :clap:
I was thinking of this, which has a faster switching speed and higher input impedance.

Q1 could have a pull-down resistor, if there's a possibility the base could be left floating, otherwise it's not needed.

Quote
PS: As I wrote above we need more info on his requirements (LOAD, speed) as the currents/transistor_types have to be designed based on the requirements. The above circuit is "for example" only, the resistor values are "an example" only.

In case he wants to switch an inductor, or an electromotor, or a welding machine he needs much more components to add, indeed.
If the load is inductive, all that's needed is a diode in reverse parallel with it.

There is nothing wrong with that circuit now. A typo has been fixed.
If you have a better circuit you may post
Your R3 is in the wrong place and draws way too much current, more than the transistor Q2b that it turns off. My fix changed the value of R3 and placed it correctly parallel to the base-emitter of Q2.
I also increased the value of R1 so that it dopes not overload the MCU.
Yes, the base discharge resistor should be across the base-emitter connections, not the base resistor and emitter nodes.
 

Offline IanMacdonald

  • Frequent Contributor
  • **
  • Posts: 943
  • Country: gb
    • IWR Consultancy
Re: PNP transistor switching voltage
« Reply #13 on: August 13, 2018, 05:48:00 pm »
BC337 has a minimum hfe of 60 at 300mA, so assuming no more collector current than that, you need at least 300/60 mA of base current. 5mA.
 
A 1k resistor will pass just under 5mA if used in the later circuit, just under 12mA in the first circuit. Therefore either would be acceptable. (60 gain is a guaranteed minimum, it will be more like 100)

The thing you don't want  is insufficient base current because that will cause the transistor to be in linear mode instead of switching, in which case it will get hot. Whilst it can switch 300mA no bother (actually up to 800mA with a higher base drive) it can only dissipate 625mW in free air. Which means that at 300ma, the emitter-collector volts drop needs to be kept under 2 volts whilst on.

Since the base-emitter junction is a diode it will drop about 0.7 volts in the forward direction. Therefore you MUST have a base current limiting resistor of some kind. Otherwise the B-E junction will be a near dead-short across the 12v supply. Likewise for the interfacing NPN transistor.

Hope this explains how to work these things out.

https://www.onsemi.com/pub/Collateral/BC337-D.PDF
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: PNP transistor switching voltage
« Reply #14 on: August 13, 2018, 07:16:23 pm »
Hey guys, sorry to have neglected this - very, very busy afternoon all of a sudden!!

I've already had a look in terms of transistor specs, but here are the requirements since you asked so nicely [emoji13]

The system is to switch a model railway signal, which can only be done on the high side, as they use a common negative. Each transistor will be switching a maximum of 2 LEDs, usually just 1, from a 12V supply, and switched using a microcontroller.

VCC = 12V
Vmcu = 5V
Il = 20mA
Rl = 600r
Ib = 5mA

Hope this helps :-)

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17084
  • Country: us
  • DavidH
Re: PNP transistor switching voltage
« Reply #15 on: August 13, 2018, 07:58:12 pm »
Another way to do it which avoids any possible ground loop issues is to use a Darlington optocoupler driven directly from the microcontroller's output pin.  Or add a single transistor amplifier on the input side if you want to direct output current away from the microcontroller if 4 to 5 milliamps is too deemed too high.

A 20 milliamp output could require a drive current of less than 4 milliamps making this very feasible.  For instance, Vishay single/dual/quad K815P/K825P/K845P Darlington optocouplers would be suitable.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: PNP transistor switching voltage
« Reply #16 on: August 13, 2018, 08:11:23 pm »
Another way to do it which avoids any possible ground loop issues is to use a Darlington optocoupler driven directly from the microcontroller's output pin.  Or add a single transistor amplifier on the input side if you want to direct output current away from the microcontroller if 4 to 5 milliamps is too deemed too high.

A 20 milliamp output could require a drive current of less than 4 milliamps making this very feasible.  For instance, Vishay single/dual/quad K815P/K825P/K845P Darlington optocouplers would be suitable.
Hmm, I'll definitely investigate that - cheers David! :-)

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline rx8pilot

  • Super Contributor
  • ***
  • Posts: 3644
  • Country: us
  • If you want more money, be more valuable.
Re: PNP transistor switching voltage
« Reply #17 on: August 13, 2018, 08:17:18 pm »
It may help to see a visual representation of the current flowing in a transistor.

https://youtu.be/Bine_PbyFSQ

PS: The important detail is to see that a BJT transistor is controlled by the flow of electrons (current). A MOSFET transistor is controlled by the buildup of electrons (voltage).
« Last Edit: August 13, 2018, 08:19:24 pm by rx8pilot »
Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline bson

  • Supporter
  • ****
  • Posts: 2411
  • Country: us
Re: PNP transistor switching voltage
« Reply #18 on: August 13, 2018, 09:51:25 pm »
It may help to see a visual representation of the current flowing in a transistor.

https://youtu.be/Bine_PbyFSQ

PS: The important detail is to see that a BJT transistor is controlled by the flow of electrons (current). A MOSFET transistor is controlled by the buildup of electrons (voltage).
Wow, that channel has some excellent conceptual teaching aids!  Often youtubers talk a million miles an hour and don't consider how long it takes a viewer to get something; these animations go on for long enough for a viewer to observe and think.  It's obviously not complete as it's not quantitative, but absolutely perfect for a conceptual introduction on which a quantitative understanding can be founded.   There are op amps, SMPS, and all sorts of stuff explained there!  Beautiful!  Kind of like 3Blue1Brown physics: (although with a bit more math needed).
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19866
  • Country: gb
  • 0999
Re: PNP transistor switching voltage
« Reply #19 on: August 13, 2018, 09:55:18 pm »
It may help to see a visual representation of the current flowing in a transistor.

PS: The important detail is to see that a BJT transistor is controlled by the flow of electrons (current). A MOSFET transistor is controlled by the buildup of electrons (voltage).
For the sake of simplicity, in a saturated switch yes, but the reality is much more complex. To illustrate this, try building the circuit I posted, using a 470R resistor for the load. Apply a 20kHz signal to the base of Q1 and look at the voltage across the load with an oscilloscope. Now try removing R2, since it's theoretically not needed and merely interrupting the base current should stop the collector current, but notice how much longer it now takes for Q2 to turn off? The base-emitter junction holds a considerable charge, which is responsible for keeping the transistor on.

Hey guys, sorry to have neglected this - very, very busy afternoon all of a sudden!!

I've already had a look in terms of transistor specs, but here are the requirements since you asked so nicely [emoji13]

The system is to switch a model railway signal, which can only be done on the high side, as they use a common negative. Each transistor will be switching a maximum of 2 LEDs, usually just 1, from a 12V supply, and switched using a microcontroller.

VCC = 12V
Vmcu = 5V
Il = 20mA
Rl = 600r
Ib = 5mA

Hope this helps :-)
Then in the circuit I posted, R1 can be 3k3.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: PNP transistor switching voltage
« Reply #20 on: August 13, 2018, 09:56:51 pm »
It may help to see a visual representation of the current flowing in a transistor.

PS: The important detail is to see that a BJT transistor is controlled by the flow of electrons (current). A MOSFET transistor is controlled by the buildup of electrons (voltage).
For the sake of simplicity, in a saturated switch yes, but the reality is much more complex. To illustrate this, try building the circuit I posted, using a 470R resistor for the load. Apply a 20kHz signal to the base of Q1 and look at the voltage across the load with an oscilloscope. Now try removing R2, since it's theoretically not needed and merely interrupting the base current should stop the collector current, but notice how much longer it now takes for Q2 to turn off? The base-emitter junction holds a considerable charge, which is responsible for keeping the transistor on.

Hey guys, sorry to have neglected this - very, very busy afternoon all of a sudden!!

I've already had a look in terms of transistor specs, but here are the requirements since you asked so nicely [emoji13]

The system is to switch a model railway signal, which can only be done on the high side, as they use a common negative. Each transistor will be switching a maximum of 2 LEDs, usually just 1, from a 12V supply, and switched using a microcontroller.

VCC = 12V
Vmcu = 5V
Il = 20mA
Rl = 600r
Ib = 5mA

Hope this helps :-)
Then in the circuit I posted, R1 can be 3k3.
That seems ideal - I'll get KiCAD out tomorrow and work out some diagrams :-
Cheers guys!!

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: PNP transistor switching voltage
« Reply #21 on: August 13, 2018, 11:22:28 pm »
Every little transistor saturates very well when the base current is 1/10th the collector current so 2mA of base current is fine.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf