I need a general purpose transistor to use as a switch, so when you apply 12v to the base it switches what it's connected to on the collector and emitter. I will be using it for the cd rom eject button, and my motherboards power button... Could someone please name some part numbers I might be able to use, I looked at my electronics store today, but theres so many I have no idea what to get. One last thing, the base cannot pull more than 100mA, I don't know if this is important or not but if it is, there you go.
General purpose transistors include the 2N3904 and its opposite, the 2N3906; both of these transistors only cost a few pennies. The web pagesI have pointed you to have data sheets on the transistors in case you are interested in seeing their specifications. The main reason there are so many different types of transistors, aside from them being NPN or PNP, is because there are different applications that require different stipulations: one transistor may be fast at switching, one may be good at amplifying, or one may do both equally well. Also, the two transistors I have pointed you to are bipolar. This website will show you how to hook up the transistor to act as a switch as well as the theory behind it. Hope that helps some at least.
Thank you. That is very helpful. "The base-emitter junction behaves like a diode." So then I need to make sure it's connected the right way or it might now act as a switch then right?
Yes, you will need to connect the right "polarity" to it or unpredictable results might happen or the transistor won't work (it most likely won't damage the transistor, it will just not work until it is corrected) - this is where you choose whether you want PNP or NPN, or construct an active signal inversion. The hfe of a transistor in relation to the current in between the emitter and collector is dependent upon the amount of current applied to the base. This is why you can control the amount of current flowing between emitter and collector/emitter and collector. Think of this as a water hose and that turn thing, can't remember the name, the more you turn the more water comes out until a particular point is reached. This particular point is when the transistor is fully on. Turning the "Turn thing" half way where there is only a trickle comes out is an example of how a transistor controls current flowing through it. It takes very little effort to control the flow of water, same as a very little current can control a much larger amount of current. If you need to control higher currents without using too much current for the base of the transistor, you can build a darlington pair. For Leds and other low current devices, it is usually not needed. Also, as you probably already know, you need at least some voltage to be able to turn on a transistor, in the case of a bi-polar transistor, for the materials it is made of - it needs to be at least 0.6v.
Cool thanks for your help. I'm basically just going to be using these transistors to connect the pins on my motherboards power header, and the cd roms eject button. So I suppose I will just have to match up which side of the switch is ground to the right pin on the transistor (collector/emitter). In case your wondering, I'm using a touch circuit in combination with this, thats why I need to use transistors. When you touch the plate, 12v is outputted down a wire, this will be the base of the transistor... Which side should ground be connected to on an NPN transistor? (collector/emitter) Emitter I'm guessing???
Correct, you can think of the current flowing opposite of the arrow direction. This website contains a visual illustration.
I know you've answered all that already but one last thing I swear What do you mean by opposite the arrow? Does current run from ground to +(whatever) voltage? I thought this depended on whethere the electrons were positive or negative.
It's okay, ask as many as you want - that is why I visit this forum in the first place. Simply put:Currently, it is accepted that electrons flow from negative to positive, hence from the ground, to the transistor, to the load, and to the positive supply. Back in the olden days, can't remember exactly, it was stipulated that electrons flowed from positive to negative; this is why schematics are often drawn in the form of positive supply on top to negative supply, ground, on bottom. Both of these ideas are used in electronics but usually the idea that electrons come from ground and go to the positive supply is used. This website will offer you an abundance of elucidation on this topic. This one will just deal with the question in a brief manner. Notice the NPN transistor: Since the above says that current flows from ground to the positive supply, then it is transversing from the emitter to the collector, or opposite of the arrow. In order not to become confused about this, I always treat current as flowing from negative to positive unless if there is a special case. Electrons are always negative charged, hence they are part of the lepton family - electromagnetic force. A positive charged electron is called a positron or anti-electron which is the form of anti-matter. There are such things as positivily charged electrons but they are rarely ever in nature because of violent results that happen when an anti-particle meets its opposite. Positive charged particles called protons are made up of quarks and something called a gluon. The quarks are: up, up, down or +2/3; +2/3; -1/3 charge or 1 whole positive charge. Hope that clears up some things for you.
Yes that would work. Make sure to have a resistor in series with the base pin of the transistor to protect it and to properly bias the base to emitter. A value of 1K ohm would be sufficient.
I find that the easiest way to remember how to hook up a transistor is to remember for both of them, the Ic=Ib+Ie, that is collector current is equal to the sum of the base current and the emitter current. That and also remember npn turns on when you push current into the base, pnp turn on when you pull current out of the base. That may help you. Also NPN=Never Points iN to help you remember the schematic symbols
A resistor is often needed in series with the base connection to limit the base current IB and prevent the transistor being damaged. When a transistor is used as a switch it must be either OFF or fully ON. In the fully ON state the voltage VCE across the transistor is almost zero and the transistor is said to be saturated because it cannot pass any more collector current IC. The output device switched by the transistor is usually called the 'load'. http://www.kpsec.freeuk.com/trancirc.htm So I need a resistor. But also, the voltage needs to be perfect for this specific transistor so that the transistor is fully saturated when on? Also what's this bias thing you speak of?
Usually just adding a direct tie to the supply current will not fully turn on the transistor because of base activation requirements but I'm not too keen on explaining it so this website will elucidate it for you. Generally in my own understandings:Say for example your load has 1000 ohms resistence and I would like to only pull about 5 mA. Assuming that the beta is 100 for the sake of simplicity, we will then need about 0.05mA to turn the transistor fully on. Therefore you take the supply current, we are working with the 5vsb, 5V/0.05mA=100K ohms. Since the transistor is operating at fully on, base current is not "really" important so a value smaller than 100K ohms can be used. You can look at this value you get as some sort of limit to how high of a resister you can put in series with the base transistor. Generally Speaking in a nutshell: "The base bias resistor is a very high value so that only a very small current flows into the base. This is all the transistor needs as it amplifies the base current at least 100 times and allows the higher current to flow through the LOAD resistor. "
Okay, so what I need is a 2N3904 and 1k resistor as well as the circuit I'm using in the first place right? The motherboard and the touch circuit will be running off of separate power supplies, and thus will have separate grounds, will this be okay?
All you need is a 1K ohm resistor and a NPN transistor. The grounds of both, the computer's and the touch circuit, will have to be shared since the transistor does not isolate the control and the one being controlled current. Since they are both DC, just attach the grounds together. This is similiar to you attaching an external powered router to your computer. The grounds are shared so that signals may have a return but the power supplies come from different sources. If you need isolation then either an opto-isolator or a relay is needed.