PNP transistor switching voltage - Page 1
Forum section: electronics / beginners

author: danners430
author_rank: Regular Contributor
timestamp: August 13, 2018, 09:37:18 am
content: 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

author: iMo
author_rank: Super Contributor
timestamp: August 13, 2018, 12:07:23 pm
content: 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.

author: danners430
author_rank: Regular Contributor
timestamp: August 13, 2018, 12:10:08 pm
content: Quote from: imo on August 13, 2018, 12:07:23 pmI'm afraid you've completely lost me there... Certainly destroyed any idea I previously had regarding their operation  could you expand?Sent from my ONEPLUS A3003 using Tapatalk

author: iMo
author_rank: Super Contributor
timestamp: August 13, 2018, 12:21:45 pm
content: Quote from: danners430 on August 13, 2018, 12:10:08 pmSee 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.

author: danners430
author_rank: Regular Contributor
timestamp: August 13, 2018, 12:25:41 pm
content: Quote from: imo on August 13, 2018, 12:21:45 pmAh, 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

author: Zero999
author_rank: Super Contributor
timestamp: August 13, 2018, 12:43:36 pm
content: Quote from: imo on August 13, 2018, 12:07:23 pmThat'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.

author: Audioguru
author_rank: Super Contributor
timestamp: August 13, 2018, 02:14:13 pm
content: I show it fixed:

author: iMo
author_rank: Super Contributor
timestamp: August 13, 2018, 03:01:14 pm
content: Fixed in my above post. Thanks.

author: Alex Nikitin
author_rank: Super Contributor
timestamp: August 13, 2018, 03:02:59 pm
content: Quote from: Hero999 on August 13, 2018, 12:43:36 pmIt is not just a bad circuit, it is a completely wrong and dangerous circuit. If Q1 is a small device, it would just blow up rather quickly and can take Q2 with it!CheersAlexP.S. - looks like I was late to the party.

author: iMo
author_rank: Super Contributor
timestamp: August 13, 2018, 03:06:42 pm
content: 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.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.

author: Audioguru
author_rank: Super Contributor
timestamp: August 13, 2018, 04:14:55 pm
content: Quote from: imo on August 13, 2018, 03:06:42 pmYour 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.

author: David Hess
author_rank: Super Contributor
timestamp: August 13, 2018, 04:26:52 pm
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: August 13, 2018, 04:28:20 pm
content: Quote from: imo on August 13, 2018, 03:06:42 pmIt 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.QuoteI 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.QuoteIf the load is inductive, all that's needed is a diode in reverse parallel with it.Quote from: Audioguru on August 13, 2018, 04:14:55 pmYes, the base discharge resistor should be across the base-emitter connections, not the base resistor and emitter nodes.

author: IanMacdonald
author_rank: Frequent Contributor
timestamp: August 13, 2018, 05:48:00 pm
content: 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 isinsufficientbase 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 onlydissipate625mW 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

author: danners430
author_rank: Regular Contributor
timestamp: August 13, 2018, 07:16:23 pm
content: 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 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 = 12VVmcu = 5VIl = 20mARl = 600rIb = 5mAHope this helps :-)Sent from my ONEPLUS A3003 using Tapatalk

author: David Hess
author_rank: Super Contributor
timestamp: August 13, 2018, 07:58:12 pm
content: 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.

author: danners430
author_rank: Regular Contributor
timestamp: August 13, 2018, 08:11:23 pm
content: Quote from: David Hess on August 13, 2018, 07:58:12 pmHmm, I'll definitely investigate that - cheers David! :-)Sent from my ONEPLUS A3003 using Tapatalk

author: rx8pilot
author_rank: Super Contributor
timestamp: August 13, 2018, 08:17:18 pm
content: It may help to see a visual representation of the current flowing in a transistor.https://youtu.be/Bine_PbyFSQPS: 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).

author: bson
author_rank: Unknown
timestamp: August 13, 2018, 09:51:25 pm
content: Quote from: rx8pilot on August 13, 2018, 08:17:18 pmWow, 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).

author: Zero999
author_rank: Super Contributor
timestamp: August 13, 2018, 09:55:18 pm
content: Quote from: rx8pilot on August 13, 2018, 08:17:18 pmFor 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.Quote from: danners430 on August 13, 2018, 07:16:23 pmThen in the circuit I posted, R1 can be 3k3.

author: danners430
author_rank: Regular Contributor
timestamp: August 13, 2018, 09:56:51 pm
content: Quote from: Hero999 on August 13, 2018, 09:55:18 pmThat seems ideal - I'll get KiCAD out tomorrow and work out some diagrams :-Cheers guys!!Sent from my ONEPLUS A3003 using Tapatalk

author: Audioguru
author_rank: Super Contributor
timestamp: August 13, 2018, 11:22:28 pm
content: Every little transistor saturates very well when the base current is 1/10th the collector current so 2mA of base current is fine.