One of the peeps on the forum noted a 2n3904 transistor for powering a 8x8 LED board (same sort of a project). In my case, these do not need any individual controls, all turn on and all turn off from one Arduino digital pin.
I can't quite put my question in one simple line since I don't trust that my understanding of transistors is valid but people seem to be plugging transistors in the Arduino willy nally without doing any sort of math which gets me confused like: can any transistor be operated by an arduino directly (w/ a resistor for protection of course)? Does the resistor eat up ampage from the base pin connected to the ardiono in order to operate? For example the transistor mentioned above (datasheet link below too) was actually recommended by another user of one of the forum threads but checking into it, it doesn't say anything about how much ampage is required in the base pin to drive it... It gives the voltage though 0 - 6v where as 0 being fully closed and 6 being fully open (i think that's how it works) Some datasheets do sometimes have something called Base Draw, some Base Current and some don't even say anything about it.
2n3904 datasheet:
Please correct me if I'm wrong here as right now I am not sure if my knowledge and understanding of the transistors if adequate. From what I understand (which may just be wrong) A transistors datasheet would display a maximum ratings beyond which the component fails/burns. It's datasheet would state the Base voltage value which, I assume, is the value at which the transistor is completely open, passing through the entire Collector voltage. So the data sheet mentioned above has the Emitter-Base Voltage (IC = 0) which is 6v so I'm assuming it will be completely open when 6 volts are fed to its base pin. Now the arduino only provides 40 or 60 mA per pin and this particular datasheet doesn't mention how much ampage it needs. Then again I just might have it all wrong ...
Hi. Where to start... well firstly, the correct word is "current" not "ampage"!
There are two main designs of transistor. The first to be invented was the Base Junction Transistor or BJT. These come in two complimentary types, NPN and PNP. The transistor you refered to is an NPN.
BJTs are "current amplifiers". A small current flowing through the base allows a large current flowing through the collector/emitter. For example, 5mA flowing in the base might allow 500mA to flow through the collector/emitter. This would be a gain of 100. Its not the voltage of the base but the current flowing that switches it on.
The next type to be invented was the Field-Effect Transistor or FET. The gate is like a capacitor, and almost instantly charges up to the voltage applied to it. One charged, no more current flows into the gate. The voltage level on the gate determines the resistance of, and therefore the current that flows through, the source/drain. It takes a minimum voltage at the gate to allow any current at all to flow through the source/drain. Above a certain gate voltage, the resistance is at its minimum and the FET is fully on.
There are again two types of fet, P-Channel and N-Channel.
Hope i got all that right, if not, no doubt someone will take pleasure correcting me!
The short answer is that Arduino can drive any transistor, but not always directly. So i guess your question is what can it drive directly to keep component count down.
BJT requires a base current to switch C/E current, so the question is can the Arduino give enough base current. The max current from an Arduino output is 40mA in theory, but you should stick to 20~25mA in practice. So if you need to switch 250mA and the transistor's gain is 50, you need a base current of 250/50 = 5mA which is ok. In practice you want to allow a bit more base current to ensure the BJT is fully switched on so that its resistance is as low as possible which prevents overheating.
With a FET, which is switched on by voltage, you need to choose one that is fully switched on by the 5V that an Arduino output provides. Many FETS require a voltage of around 10V to switch on, but others have a lower on-voltage of only around 2.5V and these are what you need with Arduino. These FETs are described as having a "logic-level gate".