Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
Tools
Old 26th May 2009, 01:17 AM   #1
Default Transistor Question

I'm fairly inexperienced with electronics in general, but I've learned quite a bit over the last many months of self instruction (and some really good help from forums like these). I have one question on transistors whose answer has eluded my normally excellent googling skills, so I figure I would just throw out the question on this forum in hopes of getting an answer.

With a regular 2n3904 transistor, what happens if my base voltage is significantly higher than the voltage that I am switching on the Collector/Emitter? 12V on the base side, 5V on the collector/emitter side.

I've looked at a few javascript simulators I've found online and it says my Ve=11.3V (allowing for the forward voltage drop b to e.). Is this correct? I was worried that the simulators might not handle this "reverse scenario" correctly.

Here's an example scenario:

I have a garage opener button in my garage just outside the back door. It operates on 12V. Close the circuit by mashing the button and the door opens/stops/closes.

I would like to hook up a MCU (Atmel) running at 5V to the button to detect when the button is pressed. All the inputs are max 5V, so I was thinking of using a transistor as a switch. But I worry I'll send ~12V to my MCU inputs, which is grossly out of spec and generally a bad thing.

So, is a transistor just the wrong part for the job if my base voltage is higher? I really want to understand when I can and when I can't use a transistor for such things. What about PNP?

I know there are other solutions like a relay or a solid state relay/optoisolator, which would protect the 5V side from the 12V side. This is more about understanding how a transistor works than figuring out this particular example. I've run into this situation on more than one occasion.
krich is offline  
Old 26th May 2009, 03:13 AM   #2
Default

Draw a circuit. It is hard to picture how you are using the transistor. Dont forget that in most switching applications where transistors are used, there is a series current-limiting resistance in the base circuit. Sometimes this takes the form of a series resistor, and sometimes a resistive divider consisting of two resistors, one to supply, the other to supply return...
MikeMl is offline  
Old 26th May 2009, 05:39 AM   #3
Default

Okay, I was worried my example was going to derail folks from the essential question. Here's a schematic to ponder. Notice that 12V at the base is driving a 5V load. Will this work? Why or why not? What are the voltages at the collector, emitter, and why?
Attached Thumbnails
Transistor Question-tq.png  
krich is offline  
Old 26th May 2009, 05:53 AM   #4
Default Transistor question

With some transistors you may get some of the base voltage leaking through from the base to the collector. This may or may not be a problem depending on the circuit it is connected to. In your example circuit your base resistor
is way too small I think 100 k would be a better value, that way the 12 v.
would have less effect on the circuit.
Brevor is offline  
Old 26th May 2009, 05:59 AM   #5
Default

Thanks Brevor. Do you think the LED will light?

I agree with your assessment on the base resisotr. I didn't do any calculations to make sure my resistor values were right because this is a purely hypothetical circuit diagram.
krich is offline  
Old 26th May 2009, 06:26 AM   #6
Default

Quote:
Do you think the LED will light?
Probably, Also with the circuit you show you should not have any problems with the higher input voltage because with the emitter grounded the base will never go above about .7 v. My warning about voltage feeding through to the collector would only happen if you had a resistor in the emitter circuit.
Brevor is offline  
Old 26th May 2009, 08:21 AM   #7
Default

Quote:
My warning about voltage feeding through to the collector would only happen if you had a resistor in the emitter circuit
How did you work this out?
colin55 is offline  
Old 26th May 2009, 03:19 PM   #8
Default

Quote:
Originally Posted by krich View Post
Okay, I was worried my example was going to derail folks from the essential question. Here's a schematic to ponder. Notice that 12V at the base is driving a 5V load. Will this work? Why or why not? What are the voltages at the collector, emitter, and why?
Think of it like this: the transistor is used as a switch. Its collector current (same as the LED current) is determined by the 220Ω resistor by Ohms Law Ic=E/R=(5-Vled-Vcsat)/220. The forward drop across the LED is ≈2V. The saturated collector voltage Vcsat of the NPN when is turned on is ≈0.2V, so I=(5-2-0.2)/220 ≈ 13mA.

In order to make the collector current of the NPN 13mA, it would take a base current Ib of at least Ic/β where β is the min. current gain of the NPN. Lets say that your NPN has a β of 100, so Ib=13mA/100 = 130uA.

The base current Ib = (12-Vbe)/Rb. Vbe of a turned on transistor is ≈ 0.7V, so substituting and rearranging gives Rb = 11.3/130e-6 = 86K. I would round that down to a commonly available value, like 47K...

So you see, the base resistor only needs to supply sufficient base current to turn on the transistor. The current gain of the transistor "amplifies" this current to switch a much higher current at its collector.

Look at the attached sim.
Attached Thumbnails
Transistor Question-npnswitch.jpg  
MikeMl is offline  
Old 26th May 2009, 04:43 PM   #9
Default

Quote:
Originally Posted by MikeMl View Post
In order to make the collector current of the NPN 13mA, it would take a base current Ib of at least Ic/β where β is the min. current gain of the NPN. Lets say that your NPN has a β of 100, so Ib=13mA/100 = 130uA.

The base current Ib = (12-Vbe)/Rb. Vbe of a turned on transistor is ≈ 0.7V, so substituting and rearranging gives Rb = 11.3/130e-6 = 86K. I would round that down to a commonly available value, like 47K...
When using a transistor for switching it is generally recommended to use a β no greater than 10 to insure that the transistor is well turned on with minimum collector-emitter voltage drop. (The higher β value is used when the transistor is being used as a linear amp.)

The base current would then be 1.3mA and the base resistor would be 11.3/1.3e-3 = 8.6kΩ.
__________________
Carl
Curmudgeon Elektroniker
crutschow is offline  
Old 26th May 2009, 04:54 PM   #10
Default

Quote:
Originally Posted by crutschow View Post
When using a transistor for switching it is generally recommended to use a β no greater than 10 to insure that the transistor is well turned on with minimum collector-emitter voltage drop. (The higher β value is used when the transistor is being used as a linear amp.)

The base current would then be 1.3mA and the base resistor would be 11.3/1.3e-3 = 8.6kΩ.
Gee Carl, you must have started when most transistors had a β of 20

Nowadays, you are had pressed to find a transistor with a β less than several hundred.

Also, most folks usually put a resistor between base to emitter to pull charge out of the base-emitter junction, and to guarantee turn-off at high temperatures, so the input resistor is chosen to supply base current + the shunt resistor current.
MikeMl is offline  
Old 26th May 2009, 05:03 PM   #11
Default

Place Rbe please.
Rb = 8K2, Rbe = 1K ;for slowspeed 12V input,
so the transistor turned in saturation on-state and turned off well through 1K Rbe.

Last edited by Blatman Bond; 26th May 2009 at 05:06 PM.
Blatman Bond is offline  
Old 26th May 2009, 05:04 PM   #12
Default

Or Rb = 10K, Rbe = 1K
or Rb = 8k2, Rbe = 1K
Blatman Bond is offline  
Old 26th May 2009, 05:19 PM   #13
Default

The ratio of R3 to R2 determines at what minimum input voltage the LED turns on. Your values didn't work (the NPN never fully turned on).

Look at my values:
Attached Thumbnails
Transistor Question-npnswitch1.jpg  
MikeMl is offline  
Old 26th May 2009, 05:38 PM   #14
Default

Quote:
Originally Posted by MikeMl View Post
So you see, the base resistor only needs to supply sufficient base current to turn on the transistor. The current gain of the transistor "amplifies" this current to switch a much higher current at its collector.

Look at the attached sim.
Thanks MikeMl for taking the time to simulate this for me. Is that a 12V source on the base (pulsed)?

So, from all the feedback on this, I needn't worry about 12V getting to my MCU and toasting a pin. I think most of my pins have clamping diodes, but still...

I noticed a second base resistor in the second simulation you did. Is that resistor placed as a "pull down" resistor to fully shut off the transistor? It also looks like it creates a potential divider, which will need to be taken into account when calculating the values. Am I on the right track?
krich is offline  
Old 26th May 2009, 05:50 PM   #15
Default

Quote:
Originally Posted by krich View Post
...
I noticed a second base resistor in the second simulation you did. Is that resistor placed as a "pull down" resistor to fully shut off the transistor? It also looks like it creates a potential divider, which will need to be taken into account when calculating the values. Am I on the right track?
Right on.

Since you said "slowly rising", I modeled the input as a sine wave which goes from 0V to 12V. See the red trace V(In) in the upper plot pane. Note that the transistor switches when the input crosses about 3V. If you want a different trip point, you can play with the R2/R3 ratio.
MikeMl is offline  
Reply

Tags
question, transistor

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
transistor and transistor array question? jokira247 Electronic Projects Design/Ideas/Reviews 9 25th April 2009 03:25 PM
Transistor question Electronman General Electronics Chat 8 4th March 2009 11:40 PM
Transistor question. Rumieus General Electronics Chat 14 4th September 2008 04:21 AM
Transistor Question ScuzZ General Electronics Chat 3 6th January 2007 02:15 PM
transistor question defcon31 General Electronics Chat 7 2nd January 2004 05:53 AM



All times are GMT. The time now is 02:38 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker