/ / Introduction
Semiconductor device with 3 leads:
- Emitter
- Base
- Collector
Transistors allow or restrict current flow with the application of voltage.
There are two types of transistors: bipolar and field-effect transistors (FETs). Unlike bopolar transistors, the leads of FETs are referred to as gate, source and drain.
Bipolar transistors can be divided into two categories: NPN and PNP.NPN transistors act like normally opened swtches. PNP transistors act like NC switches.
Function
Can amplify the current or can be used as a switch.
Operating Values
These values vary and you must refer to the datasheets.
Bi-Polar Transistors are composed of three layers:
- An Input Layer, the emitter
- A Control Layer, the base
- An Output Layer, the collector
Layers can be N-type (negative) or P-Type (positive).
Layers are formed by doping silicon with traces of impurities. Silicon treated with Boron produces negative type material. It is negative because it has a surplus of electrons. Doping the silicon with Phosphorous produces positive material, or material with a surplus of electron holes.
Silicon transistors are considered semiconductors because they conduct only a small amount of current unless a change in voltage is applied at a juncture.
When current is applied to the input layer, or the emitter of an NPN transistor, electrons flow to the P-type base and fill the positive material, or electron holes.
When the holes are filled, the material no longer conducts current. But when
a small voltage is applied to the control layer, or base, that current will produce additional holes which in turn allows current to flow from the emitter through the base to the collector.
The functional difference between a PNP transistor and an NPN transistor is the proper biasing (polarity) of the junctions when operating. For any given state of operation, the current directions and voltage polarities for each kind of transistor are exactly opposite each other.
Bipolar transistors work as current-controlled current regulators. In other words, transistors restrict the amount of current passed according to a smaller, controlling current. The main current that is controlled goes from collector to emitter, or from emitter to collector, depending on the type of transistor it is (PNP or NPN, respectively). The small current that controls the main current goes from base to emitter, or from emitter to base, once again depending on the kind of transistor it is (PNP or NPN, respectively). According to the standards of semiconductor symbology, the arrow always points against the direction of electron flow. (Figure below)

Bipolar transistors are called bipolar because the main flow of electrons through them takes place in two types of semiconductor material: P and N, as the main current goes from emitter to collector (or vice versa). In other words, two types of charge carriers -- electrons and holes -- comprise this main current through the transistor.
A point to remember is that collector current is always greater than base current, sometimes by many times.

If the collector current of a transistor is 0.12 amps and the gain is 40, what is the base current?
f the collector current of a transistor is 0.4 amps and the base current is 0.002 amps, what is the current gain?
3. If the collector current of a transistor is 0.5 amps and the gain is 100, what is the base current?
//Multiple LEDs

Each digital pin on the Arduino has an internal pull up resistor that can be turned on and off using the
digitalWrite() command when it is configured as an output. When it is HIGH, 5V sent to the pin and can deliver 40mA of current. This is adequate to power an LED, but most devices that you will want to power will require more current. A device that is trying to draw more current than this can cause the Arduino to shutdown and could easily damage the chip. There are many methods to increase the current that can be sources on an output pin. When a relatively small amount of additional current is needed, a
2N3904 NPN Transistor (or any similar type) can be used to accomplish this. In this example, you will connect four LEDs to one output pin using this simple transistor circuit.