# Transistor as a switch

1. May 2, 2009

### noagname

After doing some research, I am still confused is a transistor a switch or an amplifier. If it can be used as a switch how do I find the part that will work with the gate voltage that I give it. mouser.com wasn't really helping me in finding the right part.

2. May 2, 2009

### Bob S

What voltage do you want to switch, and what current? Would an NPN open collector work?

3. May 2, 2009

### vk6kro

Not quite sure what you are asking.

A transistor can be used as a switch, but it can't be substituted for a switch in any position in a circuit.
It has to have its own voltage requirements satisfied.

What it means is that a transistor, as well as being an amplifier, can be turned off so it doesn't carry any current ....... or turned on so it carries as much current as a series resistor will allow.

Picture a transistor with its emitter earthed, its collector connected to a resistor which goes to a voltage supply.

If it has no base current. it will be drawing no collector current so there will be no voltage drop across the resistor so its collector will be at the same voltage as the supply.

If if has enough base current to make the voltage on the collector about half of the supply voltage it will work as an amplifier as long as you only vary the input by a small amount.

If it has a lot of base current, it will draw as much current as the series ("load") resistor will allow. It is then said to be saturated. The resistor will then have nearly all of the supply voltage across it and the transistor will have only a very small voltage across it.

If you fed a large square wave into this transistor, you could turn a relay (instead of the resistor ) on and off just like a switch could. The square wave itself may not have had enough power to do this by itself so that is why you use a transistor to do the switching.

So, "switching" mainly refers to this non linear mode where the transistor is overdriven to alternate between fully off and fully conducting.

Last edited: May 3, 2009
4. May 2, 2009

### dlgoff

http://en.wikipedia.org/wiki/Bipolar_junction_transistor#Regions_of_operation"

Last edited by a moderator: Apr 24, 2017
5. May 4, 2009

### noagname

so I understand what you are talking about, so how would I find a transistor for my purpose. Where my circuit has an output of 3 volts. I need those 3 volts to go to base and then the collector and emitter "open and close" when it receives the 3 volts or doesn't.

6. May 4, 2009

### waht

Any general purpose transistor like the PN2222

7. May 4, 2009

### noagname

really? even though my emitter and collector will be a completely different voltage

8. May 4, 2009

### dlgoff

When the transistor (NPN) is in saturation, there is a voltage between the emitter and collector. It's typically 0.05 to 0.2 volts. See the second schematic of these http://hyperphysics.phy-astr.gsu.edu/HBASE/electronic/transwitch.html" [Broken].

Last edited by a moderator: May 4, 2017
9. May 12, 2009

### noagname

How do I get it in saturation with a 2.7v(not 3v, circuit changed) going to base or am I completely off

10. May 12, 2009

### Bob S

2.7 volts is more than enough to switch a bipolar transistor. 0.8 volts is enough. If you use a differential pair or a comparator, it requires much less. Why don't you post a circuit diagram of your driving circuit, and what voltage you want to switch. Is the voltage you want to switch ground referenced, or VCC referenced?

11. May 12, 2009

### vk6kro

If you are using low voltages like 2.7 volts, you could choose a transistor with a high Hfe, like 400 or more. Something like a BC548 or 2N3904.

Hfe figures are available on the data sheet for the type of transistor. This is a gain figure for the transistor and tells you how much greater the collector current is than the base current.

Using this gain figure of 400 and a supply of 2.7 volts and a 1k load resistor. you would need to put a 330K resistor, in series with the base, from the previous stage.
You could use a smaller resistor, but there is usually some voltage from the previous stage, even when there is supposed to be none, and this could be enough to turn the transistor on if the resistor was smaller.

Last edited: May 13, 2009
12. May 13, 2009

### Bob S

You should run the switch transistor into saturation. See Digoff's common emitter configuration. Decide whether you want a pull-up or a pull-down switch, then use a NPN or PNP configuration.

13. May 15, 2009

### noagname

now I am starting to get a little confused. Looking at the second schematic, in my circuit I don't have the same source going to base and collector, also their is no load between the collector and emitter. I need it to act like a light switch. and what does the 1k resistor do?

Last edited by a moderator: May 4, 2017
14. May 15, 2009

### victorb

Transistor can be used as a current control switch, when you apply current (IB) to pin B, then it will allow hfe * IB to flow from C to E.

In the circuit, the 1k resistor is used to control the IB (10V-0.6V)/1K
Normally I will refer to datasheet for the hfe value (normally it's very wide), and use higher IB (higher IB will burn a little bit more energy, but you have to check your control pin's max output current and don't set the IB higher than that) so that the transistor can allow my desired amount of current to flow through even I picked a low tolerance hfe transistor.

When select the transistor for switch purpose, I think you have to look at its IC, VCE max first.

15. May 15, 2009

### vk6kro

Sounds like you have a project in mind.

Maybe you could draw it on paper and include the place you want to have a switch and maybe someone can help with a solution. Take a digital photo of it and then reduce it to 300 K or so and attach it to a post.

Transistors are not the only devices that can act as switches.

We may have jumped ahead a little with the explanations.

You need to think about it.
What would happen if you had two resistors in series then made one of them very small? What would that do to the voltage at the junction of the resistors?
Now make that resistor very big. What happens then?

A transistor is just like the changing resistor and it changes just because its base current is changing.
It doesn't care where the base current comes from. If there is a source of voltage and a resistance to limit the current, it will change its resistance according to the base current.

16. May 16, 2009

### cabraham

A transistor can be defined as the following:

"a 3-terminal semiconductor device useful for amplification and/or switching".

This is my own definition, which I believe is comprehensive. Note the "and/or" statement. When used as a switch, a transistor can also ampplify simultaneously. If I use a microprocessor whose i/o pins can supply 3.3V & 2.0 mA, but I need to drive a buzzer which requires 12V & 100 mA, I need some type of booster device, bjt or MOSFET.

Using either device as a switch provides current gain & voltage gain as well. The 3.3V output of the micro is insufficient to drive a 12V buzzer, & likewise for the 2.0 mA output current capability. But the transistor buffer & its associated power supply provide a boosted current and voltage so that the buzzer can be turned on & off, i.e. acting as a switch, while providing both current gain and voltage gain.

Does this help?

Claude

17. May 16, 2009

### Bob S

I suggest you use an NPN transistor in a common emmiter configuration (emitter grounded), and pull down the neg input to buzzer with the NPN open collector. Radio shack has a TIP31 or TIP3055 that probably have more than enough gain with a 100 ma collector current. Their TIP120 is a Darlington that has much more gain, and 3 volts on the base should be enough to turn it on.

Depending on whether your microprocessor 2 ma output is better at current sourcing or current sinking, you might want a resistor pullup to your Vcc.

Last edited: May 16, 2009