brock

Thursday, June 7, 2012

8051 stepper motor interface

Connecting Unipolar stepper using L293D





There are actually many ways you can interface a stepper motor to your controller, out of them the most usedinterfaces are:
Interface using L293D - H-Bridge Motor Driver
Interface using ULN2003/2004 - Darlington Arrays

We will dicuss both connection techniques one by one. The above mentioned methods need 4 controller pins for interface.

As you see in the circuit above the four pins "Controller pin 1",2,3 and 4 will control the motion and direction of thestepper motor according to the step sequece programmed in the controller.

Connecting Unipolar stepper using ULN2003/2004










As already discussed in case of L293D, Here in this circuit too the four pins "Controller pin 1",2,3 and 4 will control themotion and direction of the stepper motor according to the step sequece sent by the controller.


code


/*Program to interface stepper motor*/



#include //include at89c51 microcontoller header file

#include"lcd.h"



sbit sw1=P1^0;  
sbit sw2=P1^1; 
sbit sw3=P1^2; 
 //connect p0.0 to switch
#define motor P0 //connect lower nibble of port0 to stepper motor

void delay_ms(unsigned int);

unsigned char dir;
int i=0;
void main(void)
{
init_lcd();
display_lcd("STEPPER MOTOR");
cmd_lcd(0xc0);
display_lcd("CONTROLLING");
delay_ms(2000);
while(1) //infinite loop
{
if(sw1==0)
{
   cmd_lcd(0x01);
   display_lcd("FORWARD");
  dir=0;
}
if(sw2==0)
{
   dir=1;
   cmd_lcd(0x01);
   display_lcd("REVERSE");

}
if(sw3==0)
{
dir=2;
  cmd_lcd(0x01);
   display_lcd("STOP");
  P0=0x00;
}
  if(dir==0)
  {
     for(i=0;i<12;i++)
     {
           motor=0xc0;   //for CCW direction "C639"
delay_ms(12);
     motor=0x60;
delay_ms(12);
motor=0x30;
delay_ms(12);
        motor=0x90;
delay_ms(12);
}
  }
    if(dir==1)
  {
     for(i=0;i<12;i++)
     {
         motor=0x90;   //for CCW direction "C639"
delay_ms(12);
     motor=0x30;
delay_ms(12);
motor=0x60;
delay_ms(12);
        motor=0xc0;
delay_ms(12);
 }
  }

}
}


Bipolar Junction Transistor Tutorial



Bipolar Transistor Basics


In the Diode tutorials we saw that simple diodes are made up from two pieces of semiconductor material, either silicon or germanium to form a simple PN-junction and we also learnt about their properties and characteristics. If we now join together two individual signal diodes back-to-back, this will give us two PN-junctions connected together in series that share a common P or N terminal. The fusion of these two diodes produces a three layer, two junction, three terminal device forming the basis of aBipolar Junction Transistor, or BJT for short.
Transistors are three terminal active devices made from different semiconductor materials that can act as either an insulator or a conductor by the application of a small signal voltage. The transistor's ability to change between these two states enables it to have two basic functions: "switching" (digital electronics) or "amplification" (analogue electronics). Then bipolar transistors have the ability to operate within three different regions:
  • 1. Active Region   -   the transistor operates as an amplifier and Ic = β.Ib
  •  
  • 2. Saturation   -   the transistor is "fully-ON" operating as a switch and Ic = I(saturation)
  •  
  • 3. Cut-off   -   the transistor is "fully-OFF" operating as a switch and Ic = 0
The word Transistor is an acronym, and is a combination of the words Transfer Varistor used to describe their mode of operation way back in their early days of development. There are two basic types of bipolar transistor construction, PNP and NPN, which basically describes the physical arrangement of the P-type and N-type semiconductor materials from which they are made.
The Bipolar Transistor basic construction consists of two PN-junctions producing three connecting terminals with each terminal being given a name to identify it from the other two. These three terminals are known and labelled as the Emitter ( E ), the Base ( B) and the Collector ( C ) respectively
Typical Bipolar Transistor
Bipolar Transistor
Bipolar Transistors are current regulating devices that control the amount of current flowing through them in proportion to the amount of biasing voltage applied to their base terminal acting like a current-controlled switch. The principle of operation of the two transistor types PNP and NPN, is exactly the same the only difference being in their biasing and the polarity of the power supply for each type.





Bipolar Transistor Construction

Transistor Construction

The construction and circuit symbols for both the PNP and NPN bipolar transistor are given above with the arrow in the circuit symbol always showing the direction of "conventional current flow" between the base terminal and its emitter terminal. The direction of the arrow always points from the positive P-type region to the negative N-type region for both transistor types, exactly the same as for the standard diode symbol.

Bipolar Transistor Configurations

As the Bipolar Transistor is a three terminal device, there are basically three possible ways to connect it within an electronic circuit with one terminal being common to both the input and output. Each method of connection responding differently to its input signal within a circuit as the static characteristics of the transistor vary with each circuit arrangement.
  • 1. Common Base Configuration   -   has Voltage Gain but no Current Gain.
  •  
  • 2. Common Emitter Configuration   -   has both Current and Voltage Gain.
  •  
  • 3. Common Collector Configuration   -   has Current Gain but no Voltage Gain.

The Common Base (CB) Configuration

As its name suggests, in the Common Base or grounded base configuration, the BASE connection is common to both the input signal AND the output signal with the input signal being applied between the base and the emitter terminals. The corresponding output signal is taken from between the base and the collector terminals as shown with the base terminal grounded or connected to a fixed reference voltage point. The input current flowing into the emitter is quite large as its the sum of both the base current and collector current respectively therefore, the collector current output is less than the emitter current input resulting in a current gain for this type of circuit of "1" (unity) or less, in other words the common base configuration "attenuates" the input signal.

The Common Base Transistor Circuit

Common Base Configuration
This type of amplifier configuration is a non-inverting voltage amplifier circuit, in that the signal voltagesVin and Vout are in-phase. This type of transistor arrangement is not very common due to its unusually high voltage gain characteristics. Its output characteristics represent that of a forward biased diode while the input characteristics represent that of an illuminated photo-diode. Also this type of bipolar transistor configuration has a high ratio of output to input resistance or more importantly "load" resistance (RL) to "input" resistance (Rin) giving it a value of "Resistance Gain". Then the voltage gain (Av) for a common base configuration is therefore given as:

Common Base Voltage Gain

Common Base Voltage Gain
Where: Ic/Ie is the current gain, alpha (α) and RL/Rin is the resistance gain.
The common base circuit is generally only used in single stage amplifier circuits such as microphone pre-amplifier or radio frequency (Rf) amplifiers due to its very good high frequency response.

The Common Emitter (CE) Configuration

In the Common Emitter or grounded emitter configuration, the input signal is applied between the base, while the output is taken from between the collector and the emitter as shown. This type of configuration is the most commonly used circuit for transistor based amplifiers and which represents the "normal" method of bipolar transistor connection. The common emitter amplifier configuration produces the highest current and power gain of all the three bipolar transistor configurations. This is mainly because the input impedance is LOW as it is connected to a forward-biased PN-junction, while the output impedance is HIGH as it is taken from a reverse-biased PN-junction.

The Common Emitter Amplifier Circuit

Common Emitter Configuration

In this type of configuration, the current flowing out of the transistor must be equal to the currents flowing into the transistor as the emitter current is given as Ie = Ic + Ib. Also, as the load resistance (RL) is connected in series with the collector, the current gain of the common emitter transistor configuration is quite large as it is the ratio of Ic/Ib and is given the Greek symbol of Beta, (β). As the emitter current for a common emitter configuration is defined as Ie = Ic + Ib, the ratio of Ic/Ie is called Alpha, given the Greek symbol of α. Note: that the value of Alpha will always be less than unity.
Since the electrical relationship between these three currents, IbIc and Ie is determined by the physical construction of the transistor itself, any small change in the base current (Ib), will result in a much larger change in the collector current (Ic). Then, small changes in current flowing in the base will thus control the current in the emitter-collector circuit. Typically, Beta has a value between 20 and 200 for most general purpose transistors.
By combining the expressions for both Alphaα and Betaβ the mathematical relationship between these parameters and therefore the current gain of the transistor can be given as:

Relationship between Alpha and Beta
Common Emitter Current Gain

Where: "Ic" is the current flowing into the collector terminal, "Ib" is the current flowing into the base terminal and "Ie" is the current flowing out of the emitter terminal.
Then to summarise, this type of bipolar transistor configuration has a greater input impedance, current and power gain than that of the common base configuration but its voltage gain is much lower. The common emitter configuration is an inverting amplifier circuit resulting in the output signal being 180oout-of-phase with the input voltage signal.

The Common Collector (CC) Configuration

In the Common Collector or grounded collector configuration, the collector is now common through the supply. The input signal is connected directly to the base, while the output is taken from the emitter load as shown. This type of configuration is commonly known as a Voltage Follower or Emitter Followercircuit. The emitter follower configuration is very useful for impedance matching applications because of the very high input impedance, in the region of hundreds of thousands of Ohms while having a relatively low output impedance.

The Common Collector Transistor Circuit

Common Collector Configuration

The common emitter configuration has a current gain approximately equal to the β value of the transistor itself. In the common collector configuration the load resistance is situated in series with the emitter so its current is equal to that of the emitter current. As the emitter current is the combination of the collector AND the base current combined, the load resistance in this type of transistor configuration also has both the collector current and the input current of the base flowing through it. Then the current gain of the circuit is given as:

The Common Collector Current Gain


Common Collector Gain
Common Collector Current Gain

This type of bipolar transistor configuration is a non-inverting circuit in that the signal voltages of Vin andVout are in-phase. It has a voltage gain that is always less than "1" (unity). The load resistance of the common collector transistor receives both the base and collector currents giving a large current gain (as with the common emitter configuration) therefore, providing good current amplification with very little voltage gain.

Bipolar Transistor Summary

Then to summarise, the behaviour of the bipolar transistor in each one of the above circuit configurations is very different and produces different circuit characteristics with regards to input impedance, output impedance and gain whether this is voltage gain, current gain or power gain and this is summarised in the table below.

Bipolar Transistor Characteristics

The static characteristics for a Bipolar Transistor can be divided into the following three main groups.
Input Characteristics:- Common Base  - ΔVEB / ΔIE
 Common Emitter  - ΔVBE / ΔIB
Output Characteristics:- Common Base  - ΔVC / ΔIC
 Common Emitter  - ΔVC / ΔIC
Transfer Characteristics:- Common Base  - ΔIC / ΔIE
 Common Emitter  - ΔIC / ΔIB

with the characteristics of the different transistor configurations given in the following table:
CharacteristicCommon
Base
Common
Emitter
Common
Collector
Input ImpedanceLowMediumHigh
Output ImpedanceVery HighHighLow
Phase Angle0o180o0o
Voltage GainHighMediumLow
Current GainLowMediumHigh
Power GainLowVery HighMedium

In the next tutorial about Bipolar Transistors, we will look at the NPN Transistor in more detail when used in the common emitter configuration as an amplifier as this is the most widely used configuration due to its flexibility and high gain. We will also plot the output characteristics curves commonly associated with amplifier circuits as a function of the collector current to the base current.

The NPN Transistor


In the previous tutorial we saw that the standard Bipolar Transistor or BJT, comes in two basic forms. An NPN (Negative-Positive-Negative) type and a PNP (Positive-Negative-Positive) type, with the most commonly used transistor type being the NPN Transistor. We also learnt that the transistor junctions can be biased in one of three different ways - Common BaseCommon Emitter and Common Collector. In this tutorial we will look more closely at the "Common Emitter" configuration using NPN Transistorswith an example of the construction of a NPN transistor along with the transistors current flow characteristics is given below.

An NPN Transistor Configuration

NPN Transistor
(Note: Arrow defines the emitter and conventional current flow, "out" for an NPN transistor.)
The construction and terminal voltages for an NPN transistor are shown above. The voltage between the Base and Emitter ( VBE ), is positive at the Base and negative at the Emitter because for an NPN transistor, the Base terminal is always positive with respect to the Emitter. Also the Collector supply voltage is positive with respect to the Emitter ( VCE ). So for an NPN transistor to conduct the Collector is always more positive with respect to both the Base and the Emitter.
NPN Bipolar Transistor
NPN Transistor Connections
Then the voltage sources are connected to an NPN transistor as shown. The Collector is connected to the supply voltage VCC via the load resistor, RL which also acts to limit the maximum current flowing through the device. The Base supply voltage VB is connected to the Base resistor RB, which again is used to limit the maximum Base current.
We know that the transistor is a "current"operated device (Beta model) and that a large current ( Ic ) flows freely through the device between the collector and the emitter terminals when the transistor is switched "fully-ON". However, this only happens when a small biasing current ( Ib ) is flowing into the base terminal of the transistor at the same time thus allowing the Base to act as a sort of current control input.
The transistor current in an NPN transistor is the ratio of these two currents ( Ic/Ib ), called the DC Current Gain of the device and is given the symbol of hfe or nowadays Beta, ( β ). The value of β can be large up to 200 for standard transistors, and it is this large ratio between Ic and Ib that makes the NPN transistor a useful amplifying device when used in its active region as Ib provides the input and Icprovides the output. Note that Beta has no units as it is a ratio.
Also, the current gain of the transistor from the Collector terminal to the Emitter terminal, Ic/Ie, is calledAlpha, ( α ), and is a function of the transistor itself (electrons diffusing across the junction). As the emitter current Ie is the product of a very small base current plus a very large collector current, the value of alpha α, is very close to unity, and for a typical low-power signal transistor this value ranges from about 0.950 to 0.999

α and β Relationship in a NPN Transistor

Alpha-Beta Relationship
By combining the two parameters α and β we can produce two mathematical expressions that gives the relationship between the different currents flowing in the transistor.
Alpha and Beta Relationship

The values of Beta vary from about 20 for high current power transistors to well over 1000 for high frequency low power type bipolar transistors. The value of Beta for most standard NPN transistors can be found in the manufactures datasheets but generally range between 50 - 200.
The equation above for Beta can also be re-arranged to make Ic as the subject, and with a zero base current ( Ib = 0 ) the resultant collector current Ic will also be zero, ( β x 0 ). Also when the base current is high the corresponding collector current will also be high resulting in the base current controlling the collector current. One of the most important properties of the Bipolar Junction Transistor is that a small base current can control a much larger collector current. Consider the following example.

Example No1

An NPN Transistor has a DC current gain, (Beta) value of 200. Calculate the base current Ib required to switch a resistive load of 4mA.
Base Current Calculation
Therefore, β = 200, Ic = 4mA and Ib = 20µA.
One other point to remember about NPN Transistors. The collector voltage, ( Vc ) must be greater and positive with respect to the emitter voltage, ( Ve ) to allow current to flow through the transistor between the collector-emitter junctions. Also, there is a voltage drop between the Base and the Emitter terminal of about 0.7v (one diode volt drop) for silicon devices as the input characteristics of an NPN Transistor are of a forward biased diode. Then the base voltage, ( Vbe ) of a NPN transistor must be greater than this 0.7V otherwise the transistor will not conduct with the base current given as.
Base Current Equation
Where:   Ib is the base current, Vb is the base bias voltage, Vbe is the base-emitter volt drop (0.7v) andRb is the base input resistor. Increasing IbVbe slowly increases to 0.7V but Ic rises exponentially.

Example No2

An NPN Transistor has a DC base bias voltage, Vb of 10v and an input base resistor, Rb of 100kΩ. What will be the value of the base current into the transistor.
Base Current Calculation
Therefore, Ib = 93µA.

The Common Emitter Configuration.

As well as being used as a semiconductor switch to turn load currents "ON" or "OFF" by controlling the Base signal to the transistor in ether its saturation or cut-off regions, NPN Transistors can also be used in its active region to produce a circuit which will amplify any small AC signal applied to its Base terminal with the Emitter grounded. If a suitable DC "biasing" voltage is firstly applied to the transistors Base terminal thus allowing it to always operate within its linear active region, an inverting amplifier circuit called a single stage common emitter amplifier is produced.
One such Common Emitter Amplifier configuration of an NPN transistor is called a Class A Amplifier. A "Class A Amplifier" operation is one where the transistors Base terminal is biased in such a way as to forward bias the Base-emitter junction. The result is that the transistor is always operating halfway between its cut-off and saturation regions, thereby allowing the transistor amplifier to accurately reproduce the positive and negative halves of any AC input signal superimposed upon this DC biasing voltage. Without this "Bias Voltage" only one half of the input waveform would be amplified. This common emitter amplifier configuration using an NPN transistor has many applications but is commonly used in audio circuits such as pre-amplifier and power amplifier stages.
With reference to the common emitter configuration shown below, a family of curves known as theOutput Characteristics Curves, relates the output collector current, (Ic) to the collector voltage, (Vce) when different values of Base current, (Ib) are applied to the transistor for transistors with the same βvalue. A DC "Load Line" can also be drawn onto the output characteristics curves to show all the possible operating points when different values of base current are applied. It is necessary to set the initial value of Vce correctly to allow the output voltage to vary both up and down when amplifying AC input signals and this is called setting the operating point or Quiescent PointQ-point for short and this is shown below.

Single Stage Common Emitter Amplifier Circuit

Common Emitter Amplifier

Output Characteristics Curves of a Typical Bipolar Transistor

Collector Characteristics

The most important factor to notice is the effect of Vce upon the collector current Ic when Vce is greater than about 1.0 volts. We can see that Ic is largely unaffected by changes in Vce above this value and instead it is almost entirely controlled by the base current, Ib. When this happens we can say then that the output circuit represents that of a "Constant Current Source". It can also be seen from the common emitter circuit above that the emitter current Ie is the sum of the collector current, Ic and the base current,Ib, added together so we can also say that Ie = Ic + Ib for the common emitter (CE) configuration.
By using the output characteristics curves in our example above and also Ohm´s Law, the current flowing through the load resistor, (RL), is equal to the collector current, Ic entering the transistor which inturn corresponds to the supply voltage, (Vcc) minus the voltage drop between the collector and the emitter terminals, (Vce) and is given as:
Collector Current Calculation
Also, a straight line representing the Dynamic Load Line of the transistor can be drawn directly onto the graph of curves above from the point of "Saturation" ( A ) when Vce = 0 to the point of "Cut-off" ( B ) when Ic = 0 thus giving us the "Operating" or Q-point of the transistor. These two points are joined together by a straight line and any position along this straight line represents the "Active Region" of the transistor. The actual position of the load line on the characteristics curves can be calculated as follows:
Collector Current Calculation
Then, the collector or output characteristics curves for Common Emitter NPN Transistors can be used to predict the Collector current, Ic, when given Vce and the Base current, Ib. A Load Line can also be constructed onto the curves to determine a suitable Operating or Q-point which can be set by adjustment of the base current. The slope of this load line is equal to the reciprocal of the load resistance which is given as: -1/RL
Then we can define a NPN Transistor as being normally "OFF" but a small input current and a small positive voltage at its Base (B) relative to its Emitter (E) will turn it "ON" allowing a much large Collector-Emitter current to flow. NPN transistors conduct when Vc is much greater than Ve.

In the next tutorial about Bipolar Transistors, we will look at the opposite or complementary form of the NPN Transistor called the PNP Transistor and show that the PNP Transistor has very similar characteristics to their NPN transistor except that the polarities (or biasing) of the current and voltage directions are reversed.


The PNP Transistor



The PNP Transistor is the exact opposite to the NPN Transistor device we looked at in the previous tutorial. Basically, in this type of transistor construction the two diodes are reversed with respect to the NPN type giving a Positive-Negative-Positive configuration, with the arrow which also defines the Emitter terminal this time pointing inwards in the transistor symbol.
Also, all the polarities for a PNP transistor are reversed which means that it "sinks" current into its Base as opposed to the NPN transistor which "sources" current through its Base. The main difference between the two types of transistors is that holes are the more important carriers for PNP transistors, whereas electrons are the important carriers for NPN transistors. Then, PNP transistors use a small base current and a negative base voltage to control a much larger emitter-collector current. In other words for a PNP transistor, the Emitter is more positive with respect to the Base and also with respect to the Collector.
The construction of a "PNP transistor" consists of two P-type semiconductor materials either side of an N-type material as shown below.

A PNP Transistor Configuration

PNP Transistor
(Note: Arrow defines the emitter and conventional current flow, "in" for a PNP transistor.)
The construction and terminal voltages for an NPN transistor are shown above. The PNP Transistorhas very similar characteristics to their NPN bipolar cousins, except that the polarities (or biasing) of the current and voltage directions are reversed for any one of the possible three configurations looked at in the first tutorial, Common Base, Common Emitter and Common Collector.
PNP Bipolar Transistor
PNP Transistor Connections
The voltage between the Base and Emitter ( VBE ), is now negative at the Base and positive at the Emitter because for a PNP transistor, the Base terminal is always biased negative with respect to the Emitter. Also the Emitter supply voltage is positive with respect to the Collector ( VCE ). So for a PNP transistor to conduct the Emitter is always more positive with respect to both the Base and the Collector.
The voltage sources are connected to a PNP transistor are as shown. This time the Emitter is connected to the supply voltage VCC with the load resistor, RL which limits the maximum current flowing through the device connected to the Collector terminal. The Base voltage VB which is biased negative with respect to the Emitter and is connected to the Base resistor RB, which again is used to limit the maximum Base current.
To cause the Base current to flow in a PNP transistor the Base needs to be more negative than the Emitter (current must leave the base) by approx 0.7 volts for a silicon device or 0.3 volts for a germanium device with the formulas used to calculate the Base resistor, Base current or Collector current are the same as those used for an equivalent NPN transistor and is given as.
PNP Transistor Base Current
Generally, the PNP transistor can replace NPN transistors in most electronic circuits, the only difference is the polarities of the voltages, and the directions of the current flow. PNP transistors can also be used as switching devices and an example of a PNP transistor switch is shown below.

A PNP Transistor Circuit

PNP transistor Circuit
The Output Characteristics Curves for a PNP transistor look very similar to those for an equivalent NPN transistor except that they are rotated by 180o to take account of the reverse polarity voltages and currents, (the currents flowing out of the Base and Collector in a PNP transistor are negative). The same dynamic load line can be drawn onto the I-V curves to find the PNP transistors operating points.

Transistor Matching

Complementary Transistor
Complementary Transistors
You may think what is the point of having a PNP Transistor, when there are plenty of NPN Transistors available that can be used as an amplifier or solid-state switch?. Well, having two different types of transistors "PNP" and "NPN", can be a great advantage when designing amplifier circuits such as the Class B Amplifier which uses "Complementary" or "Matched Pair" transistors in its output stage or in reversible H-Bridge motor control circuits were we want to control the flow of current evenly in both directions.
A pair of corresponding NPN and PNP transistors with near identical characteristics to each other are calledComplementary Transistors for example, a TIP3055 (NPN transistor) and the TIP2955 (PNP transistor) are good examples of complementary or matched pair silicon power transistors. They both have a DC current gain, Beta, ( Ic/Ib ) matched to within 10% and high Collector current of about 15A making them ideal for general motor control or robotic applications.
Also, class B amplifiers use complementary NPN and PNP in their power output stage design. The NPN transistor conducts for only the positive half of the signal while the PNP transistor conducts for negative half of the signal. This allows the amplifier to drive the required power through the load loudspeaker in both directions at the stated nominal impedance and power resulting in an output current which is likely to be in the order of several amps shared evenly between the two complementary transistors.

Identifying the PNP Transistor

We saw in the first tutorial of this transistors section, that transistors are basically made up of two Diodes connected together back-to-back. We can use this analogy to determine whether a transistor is of the PNP type or NPN type by testing its Resistance between the three different leads, EmitterBaseand Collector. By testing each pair of transistor leads in both directions with a multimeter will result in six tests in total with the expected resistance values in Ohm's given below.
  • 1. Emitter-Base Terminals - The Emitter to Base should act like a normal diode and conduct one way only.
  •  
  • 2. Collector-Base Terminals - The Collector-Base junction should act like a normal diode and conduct one way only.
  •  
  • 3. Emitter-Collector Terminals - The Emitter-Collector should not conduct in either direction.

Transistor resistance values for a PNP transistor and a NPN transistor

Between Transistor TerminalsPNPNPN
CollectorEmitterRHIGHRHIGH
CollectorBaseRLOWRHIGH
EmitterCollectorRHIGHRHIGH
EmitterBaseRLOWRHIGH
BaseCollectorRHIGHRLOW
BaseEmitterRHIGHRLOW

Then we can define a PNP Transistor as being normally "OFF" but a small output current and negative voltage at its Base (B) relative to its Emitter (E) will turn it "ON" allowing a much large Emitter-Collector current to flow. PNP transistors conduct when Ve is much greater than Vc.
In the next tutorial about Bipolar Transistors instead of using the transistor as an amplifying device, we will look at the operation of the transistor in its saturation and cut-off regions when used as a solid-state switch. Bipolar transistor switches are used in many applications to switch a DC current "ON" or "OFF" such as LED’s which require only a few milliamps at low DC voltages, or relays which require higher currents at higher voltages.


The Transistor as a Switch



When used as an AC signal amplifier, the transistors Base biasing voltage is applied in such a way that it always operates within its "active" region, that is the linear part of the output characteristics curves are used. However, both the NPN & PNP type bipolar transistors can be made to operate as "ON/OFF" type solid state switches by biasing the transistors base differently to that of a signal amplifier. Solid state switches are one of the main applications for the use of transistors, and transistor switches can be used for controlling high power devices such as motors, solenoids or lamps, but they can also used in digital electronics and logic gate circuits.
If the circuit uses the Bipolar Transistor as a Switch, then the biasing of the transistor, either NPN or PNP is arranged to operate the transistor at both sides of the " I-V " characteristics curves we have seen previously. The areas of operation for a transistor switch are known as the Saturation Region and theCut-off Region. This means then that we can ignore the operating Q-point biasing and voltage divider circuitry required for amplification, and use the transistor as a switch by driving it back and forth between its "fully-OFF" (cut-off) and "fully-ON" (saturation) regions as shown below.

Operating Regions

Transistor Switch Operating Regions

The pink shaded area at the bottom of the curves represents the "Cut-off" region while the blue area to the left represents the "Saturation" region of the transistor. Both these transistor regions are defined as:

1. Cut-off Region

Here the operating conditions of the transistor are zero input base current ( IB ), zero output collector current ( IC ) and maximum collector voltage ( VCE ) which results in a large depletion layer and no current flowing through the device. Therefore the transistor is switched "Fully-OFF".

Cut-off Characteristics

Cut-off Transistor
  • The input and Base are grounded (0v)
  • Base-Emitter voltage VBE < 0.7v
  • Base-Emitter junction is reverse biased
  • Base-Collector junction is reverse biased
  • Transistor is "fully-OFF" (Cut-off region)
  • No Collector current flows ( IC = 0 )
  • VOUT = VCE = VCC = "1"
  • Transistor operates as an "open switch"
Then we can define the "cut-off region" or "OFF mode" when using a bipolar transistor as a switch as being, both junctions reverse biased, VB < 0.7v and IC = 0. For a PNP transistor, the Emitter potential must be negative with respect to the Base.

2. Saturation Region

Here the transistor will be biased so that the maximum amount of base current is applied, resulting in maximum collector current resulting in the minimum collector emitter voltage drop which results in the depletion layer being as small as possible and maximum current flowing through the transistor. Therefore the transistor is switched "Fully-ON".

Saturation Characteristics

Saturation Transistor
  • The input and Base are connected to VCC
  • Base-Emitter voltage VBE > 0.7v
  • Base-Emitter junction is forward biased
  • Base-Collector junction is forward biased
  • Transistor is "fully-ON" (saturation region)
  • Max Collector current flows (IC = Vcc/RL)
  • VCE = 0 (ideal saturation)
  • VOUT = VCE = "0"
  • Transistor operates as a "closed switch"
Then we can define the "saturation region" or "ON mode" when using a bipolar transistor as a switch as being, both junctions forward biased, VB > 0.7v and IC = Maximum. For a PNP transistor, the Emitter potential must be positive with respect to the Base.
Then the transistor operates as a "single-pole single-throw" (SPST) solid state switch. With a zero signal applied to the Base of the transistor it turns "OFF" acting like an open switch and zero collector current flows. With a positive signal applied to the Base of the transistor it turns "ON" acting like a closed switch and maximum circuit current flows through the device.
An example of an NPN Transistor as a switch being used to operate a relay is given below. With inductive loads such as relays or solenoids a flywheel diode is placed across the load to dissipate the back EMF generated by the inductive load when the transistor switches "OFF" and so protect the transistor from damage. If the load is of a very high current or voltage nature, such as motors, heaters etc, then the load current can be controlled via a suitable relay as shown.

Basic NPN Transistor Switching Circuit

NPN Transistor as a Switch

The circuit resembles that of the Common Emitter circuit we looked at in the previous tutorials. The difference this time is that to operate the transistor as a switch the transistor needs to be turned either fully "OFF" (cut-off) or fully "ON" (saturated). An ideal transistor switch would have infinite circuit resistance between the Collector and Emitter when turned "fully-OFF" resulting in zero current flowing through it and zero resistance between the Collector and Emitter when turned "fully-ON", resulting in maximum current flow. In practice when the transistor is turned "OFF", small leakage currents flow through the transistor and when fully "ON" the device has a low resistance value causing a small saturation voltage ( VCE ) across it. Even though the transistor is not a perfect switch, in both the cut-off and saturation regions the power dissipated by the transistor is at its minimum.
In order for the Base current to flow, the Base input terminal must be made more positive than the Emitter by increasing it above the 0.7 volts needed for a silicon device. By varying this Base-Emitter voltage VBE,  the Base current is also altered and which in turn controls the amount of Collector current flowing through the transistor as previously discussed. When maximum Collector current flows the transistor is said to be Saturated. The value of the Base resistor determines how much input voltage is required and corresponding Base current to switch the transistor fully "ON".

Example No1

Using the transistor values from the previous tutorials of:  β = 200, Ic = 4mA and Ib = 20uA, find the value of the Base resistor (Rb) required to switch the load fully "ON" when the input terminal voltage exceeds 2.5v.
Transistor Switch Base Resistance
The next lowest preferred value is: 82kΩ, this guarantees the transistor switch is always saturated.

Example No2

Again using the same values, find the minimum Base current required to turn the transistor "fully-ON" (saturated) for a load that requires 200mA of current when the input voltage is increased to 5.0V. Also calculate the new value of Rb.
transistor Base current:
Transistor Base Current
transistor Base resistance:
Transistor Base Resistance

Transistor switches are used for a wide variety of applications such as interfacing large current or high voltage devices like motors, relays or lamps to low voltage digital logic IC's or gates like AND gates orOR gates. Here, the output from a digital logic gate is only +5v but the device to be controlled may require a 12 or even 24 volts supply. Or the load such as a DC Motor may need to have its speed controlled using a series of pulses (Pulse Width Modulation). transistor switches will allow us to do this faster and more easily than with conventional mechanical switches.

Digital Logic Transistor Switch

Digital Logic Transistor Switch
The base resistor, Rb is required to limit the output current from the logic gate.

PNP Transistor Switch

We can also use PNP transistors as switches, the difference this time is that the load is connected to ground (0v) and the PNP transistor switches power to it. To turn the PNP transistor as a switch "ON" the Base terminal is connected to ground or zero volts (LOW) as shown.

PNP Transistor Switching Circuit

PNP Transistor as a Switch

The equations for calculating the Base resistance, Collector current and voltages are exactly the same as for the previous NPN transistor switch. The difference this time is that we are switching power with a PNP transistor (sourcing current) instead of switching ground with an NPN transistor (sinking current).

Darlington Transistor Switch

Sometimes the DC current gain of the bipolar transistor is too low to directly switch the load current or voltage, so multiple switching transistors are used. Here, one small input transistor is used to switch "ON" or "OFF" a much larger current handling output transistor. To maximise the signal gain, the two transistors are connected in a "Complementary Gain Compounding Configuration" or what is more commonly called a "Darlington Configuration" were the amplification factor is the product of the two individual transistors.
Darlington Transistors simply contain two individual bipolar NPN or PNP type transistors connected together so that the current gain of the first transistor is multiplied with that of the current gain of the second transistor to produce a device which acts like a single transistor with a very high current gain for a much smaller Base current. The overall current gain Beta (β) or Hfe value of a Darlington device is the product of the two individual gains of the transistors and is given as:
Darlington Transistor Current Gain
So Darlington Transistors with very high β values and high Collector currents are possible compared to a single transistor switch. For example, if the first input transistor has a current gain of 100 and the second switching transistor has a current gain of 50 then the total current gain will be 100 x 50 = 5000. An example of the two basic types of Darlington transistor are given below.

Darlington Transistor Configurations

Darlington Transistor Switch

The above NPN Darlington transistor switch configuration shows the Collectors of the two transistors connected together with the Emitter of the first transistor connected to the Base of the second transistor therefore, the Emitter current of the first transistor becomes the Base current of the second transistor. The first or "input" transistor receives an input signal, amplifies it and uses it to drive the second or "output" transistors which amplifies it again resulting in a very high current gain. As well as its high increased current and voltage switching capabilities, another advantage of a Darlington transistor switch is in its high switching speeds making them ideal for use in inverter circuits and DC motor or stepper motor control applications.
One difference to consider when using Darlington transistors over the conventional single bipolar types when using the transistor as a switch is that the Base-Emitter input voltage ( VBE ) needs to be higher at approx 1.4v for silicon devices, due to the series connection of the two PN junctions.

Transistor as a Switch Summary

Then to summarise when using a Transistor as a Switch.
  • Transistor switches can be used to switch and control lamps, relays or even motors.
  • When using the bipolar transistor as a switch they must be either "fully-OFF" or "fully-ON".
  • Transistors that are fully "ON" are said to be in their Saturation region.
  • Transistors that are fully "OFF" are said to be in their Cut-off region.
  • When using the transistor as a switch, a small Base current controls a much larger Collector load current.
  • When using transistors to switch inductive loads such as relays and solenoids, a "Flywheel Diode" is used.
  • When large currents or voltages need to be controlled, Darlington Transistors can be used.
In the next tutorial about Transistors, we will look at the operation of the junction field effect transistor known commonly as an JFET. We will also plot the output characteristics curves commonly associated with JFET amplifier circuits as a function of Source voltage to Gate voltage.

The Field Effect Transistor

In the Bipolar Junction Transistor   tutorials, we saw that the output Collector current of the transistor is proportional to input current flowing into the Base terminal of the device, thereby making the bipolar transistor a "CURRENT" operated device (Beta model). The Field Effect Transistor, or simplyFET however, uses the voltage that is applied to their input terminal, called the Gate to control the current flowing through them resulting in the output current being proportional to the input voltage. As their operation relies on an electric field (hence the name field effect) generated by the input Gatevoltage, this then makes the Field Effect Transistor a "VOLTAGE" operated device.
Field Effect Transistor
Typical Field Effect Transistor
The Field Effect Transistor is a three terminal unipolar semiconductor device that has very similar characteristics to those of their Bipolar Transistor counterparts ie, high efficiency, instant operation, robust and cheap and can be used in most electronic circuit applications to replace their equivalent bipolar junction transistors (BJT) cousins.
Field effect transistors can be made much smaller than an equivalent BJT transistor and along with their low power consumption and power dissipation makes them ideal for use in integrated circuits such as the CMOS range of digital logic chips.
We remember from the previous tutorials that there are two basic types of Bipolar Transistor construction, NPN and PNP, which basically describes the physical arrangement of the P-type and N-type semiconductor materials from which they are made. This is also true of FET's as there are also two basic classifications of Field Effect Transistor, called the N-channel FET and the P-channel FET.
The field effect transistor is a three terminal device that is constructed with no PN-junctions within the main current carrying path between the Drain and the Source terminals, which correspond in function to the Collector and the Emitter respectively of the bipolar transistor. The current path between these two terminals is called the "channel" which may be made of either a P-type or an N-type semiconductor material. The control of current flowing in this channel is achieved by varying the voltage applied to theGate. As their name implies, Bipolar Transistors are "Bipolar" devices because they operate with both types of charge carriers, Holes and Electrons. The Field Effect Transistor on the other hand is a "Unipolar" device that depends only on the conduction of electrons (N-channel) or holes (P-channel).
The Field Effect Transistor has one major advantage over its standard bipolar transistor cousins, in that their input impedance, ( Rin ) is very high, (thousands of Ohms), while the BJT is comparatively low. This very high input impedance makes them very sensitive to input voltage signals, but the price of this high sensitivity also means that they can be easily damaged by static electricity. There are two main types of field effect transistor, the Junction Field Effect Transistor or JFET and the Insulated-gate Field Effect Transistor or IGFET), which is more commonly known as the standard Metal Oxide Semiconductor Field Effect Transistor or MOSFET for short.

The Junction Field Effect Transistor

We saw previously that a bipolar junction transistor is constructed using two PN-junctions in the main current carrying path between the Emitter and the Collector terminals. The Junction Field Effect Transistor (JUGFET or JFET) has no PN-junctions but instead has a narrow piece of high-resistivity semiconductor material forming a "Channel" of either N-type or P-type silicon for the majority carriers to flow through with two ohmic electrical connections at either end commonly called the Drain and theSource respectively.
There are two basic configurations of junction field effect transistor, the N-channel JFET and the P-channel JFET. The N-channel JFET's channel is doped with donor impurities meaning that the flow of current through the channel is negative (hence the term N-channel) in the form of electrons. Likewise, the P-channel JFET's channel is doped with acceptor impurities meaning that the flow of current through the channel is positive (hence the term P-channel) in the form of holes. N-channel JFET's have a greater channel conductivity (lower resistance) than their equivalent P-channel types, since electrons have a higher mobility through a conductor compared to holes. This makes the N-channel JFET's a more efficient conductor compared to their P-channel counterparts.
We have said previously that there are two ohmic electrical connections at either end of the channel called the Drain and the Source. But within this channel there is a third electrical connection which is called the Gate terminal and this can also be a P-type or N-type material forming a PN-junction with the main channel. The relationship between the connections of a junction field effect transistor and a bipolar junction transistor are compared below.

Comparison of connections between a JFET and a BJT

Bipolar TransistorField Effect Transistor
Emitter - (E)     >>     Source - (S)
Base - (B)     >>     Gate - (G)
Collector - (C)     >>     Drain - (D)     
The symbols and basic construction for both configurations of JFETs are shown below.
JFET Symbols
The semiconductor "channel" of the Junction Field Effect Transistor is a resistive path through which a voltage VDS causes a current ID to flow. The JFET can conduct current equally well in either direction. A voltage gradient is thus formed down the length of the channel with this voltage becoming less positive as we go from the Drain terminal to the Source terminal. The PN-junction therefore has a high reverse bias at the Drain terminal and a lower reverse bias at the Source terminal. This bias causes a "depletion layer" to be formed within the channel and whose width increases with the bias.
The magnitude of the current flowing through the channel between the Drain and the Source terminals is controlled by a voltage applied to the Gate terminal, which is a reverse-biased. In an N-channel JFET this Gate voltage is negative while for a P-channel JFET the Gate voltage is positive. The main difference between the JFET and a BJT device is that when the JFET junction is reverse-biased the Gate current is practically zero, whereas the Base current of the BJT is always some value greater than zero.

Bias arrangement for an N-channel JFET and corresponding circuit symbols.

Depletion-mode JFET Construction
The cross sectional diagram above shows an N-type semiconductor channel with a P-type region called the Gate diffused into the N-type channel forming a reverse biased PN-junction and it is this junction which forms the depletion region around the Gate area when no external voltages are applied. JFETs are therefore known as depletion mode devices. This depletion region produces a potential gradient which is of varying thickness around the PN-junction and restrict the current flow through the channel by reducing its effective width and thus increasing the overall resistance of the channel itself. The most-depleted portion of the depletion region is in between the Gate and the Drain, while the least-depleted area is between the Gate and the Source. Then the JFET's channel conducts with zero bias voltage applied (i.e. the depletion region has near zero width).
With no external Gate voltage ( VG = 0 ), and a small voltage ( VDS ) applied between the Drain and the Source, maximum saturation current ( IDSS ) will flow through the channel from the Drain to the Source restricted only by the small depletion region around the junctions.
If a small negative voltage ( -VGS ) is now applied to the Gate the size of the depletion region begins to increase reducing the overall effective area of the channel and thus reducing the current flowing through it, a sort of "squeezing" effect takes place. So by applying a reverse bias voltage increases the width of the depletion region which in turn reduces the conduction of the channel. Since the PN-junction is reverse biased, little current will flow into the gate connection. As the Gate voltage ( -VGS ) is made more negative, the width of the channel decreases until no more current flows between the Drain and the Source and the FET is said to be "pinched-off" (similar to the cut-off region for a BJT). The voltage at which the channel closes is called the "pinch-off voltage", ( VP ).

JFET Channel Pinched-off

JFET Channel

In this pinch-off region the Gate voltage, VGS controls the channel current and VDS has little or no effect.

JFET Model
JFET Model
The result is that the FET acts more like a voltage controlled resistor which has zero resistance when VGS = 0 and maximum "ON" resistance ( RDS ) when the Gate voltage is very negative. Under normal operating conditions, the JFET gate is always negatively biased relative to the source.
It is essential that the Gate voltage is never positive since if it is all the channel current will flow to the Gate and not to the Source, the result is damage to the JFET. Then to close the channel:
  • No Gate voltage ( VGS ) and VDS is increased from zero.
  • No VDS and Gate control is decreased negatively from zero.
  • VDS and VGS varying.
The P-channel Junction Field Effect Transistor operates the same as the N-channel above, with the following exceptions: 1). Channel current is positive due to holes, 2). The polarity of the biasing voltage needs to be reversed.
The output characteristics of an N-channel JFET with the gate short-circuited to the source is given as

Output characteristic V-I curves of a typical junction FET.

JFET Characteristics Curves
The voltage VGS applied to the Gate controls the current flowing between the Drain and the Source terminals. VGS refers to the voltage applied between the Gate and the Source while VDS refers to the voltage applied between the Drain and the Source. Because a Junction Field Effect Transistor is a voltage controlled device, "NO current flows into the gate!" then the Source current ( IS ) flowing out of the device equals the Drain current flowing into it and therefore ( ID = IS ).
The characteristics curves example shown above, shows the four different regions of operation for a JFET and these are given as:
  • Ohmic Region - When VGS = 0 the depletion layer of the channel is very small and the JFET acts like a voltage controlled resistor.
  •  
  • Cut-off Region - This is also known as the pinch-off region were the Gate voltage, VGS is sufficient to cause the JFET to act as an open circuit as the channel resistance is at maximum.
  •  
  • Saturation or Active Region - The JFET becomes a good conductor and is controlled by the Gate-Source voltage, ( VGS ) while the Drain-Source voltage, ( VDS ) has little or no effect.
  •  
  • Breakdown Region - The voltage between the Drain and the Source, ( VDS ) is high enough to causes the JFET's resistive channel to break down and pass uncontrolled maximum current.
The characteristics curves for a P-channel junction field effect transistor are the same as those above, except that the Drain current ID decreases with an increasing positive Gate-Source voltage, VGS.
The Drain current is zero when VGS = VP. For normal operation, VGS is biased to be somewhere between VP and 0. Then we can calculate the Drain current, ID for any given bias point in the saturation or active region as follows:
Drain current in the active region.
JFET Drain Current
Note that the value of the Drain current will be between zero (pinch-off) and IDSS (maximum current). By knowing the Drain current ID and the Drain-Source voltage VDS the resistance of the channel ( ID ) is given as:
Drain-Source channel resistance.
JFET Channel Resistance
Where: gm is the "transconductance gain" since the JFET is a voltage controlled device and which represents the rate of change of the Drain current with respect to the change in Gate-Source voltage.

JFET Amplifier

Just like the bipolar junction transistor, JFET's can be used to make single stage class A amplifier circuits with the JFET common source amplifier and characteristics being very similar to the BJT common emitter circuit. The main advantage JFET amplifiers have over BJT amplifiers is their high input impedance which is controlled by the Gate biasing resistive network formed by R1 and R2 as shown.

Biasing of JFET Amplifier

JFET Amplifier

This common source (CS) amplifier circuit is biased in class A mode by the voltage divider network formed by R1 and R2. The voltage across the Source resistor RS is generally set at one fourth VDD, (VDD /4 ). The required Gate voltage can then be calculated using this RS value. Since the Gate current is zero, ( IG = 0 ) we can set the required DC quiescent voltage by the proper selection of resistors R1 andR2.
The control of the Drain current by a negative Gate potential makes the Junction Field Effect Transistoruseful as a switch and it is essential that the Gate voltage is never positive for an N-channel JFET as the channel current will flow to the Gate and not the Drain resulting in damage to the JFET. The principals of operation for a P-channel JFET are the same as for the N-channel JFET, except that the polarity of the voltages need to be reversed.
In the next tutorial about Transistors, we will look at another type of Field Effect Transistor called aMOSFET whose Gate connection is completely isolated from the main current carrying channel.

The Metal Oxide FET - MOSFET

As well as the Junction Field Effect Transistor (JFET), there is another type of Field Effect Transistor available whose Gate input is electrically insulated from the main current carrying channel and is therefore called an Insulated Gate Field Effect Transistor or IGFET. The most common type of insulated gate FET which is used in many different types of electronic circuits is called the Metal Oxide Semiconductor Field Effect Transistor or MOSFET for short.
The IGFET or MOSFET is a voltage controlled field effect transistor that differs from a JFET in that it has a "Metal Oxide" Gate electrode which is electrically insulated from the main semiconductor N-channel or P-channel by a thin layer of insulating material usually silicon dioxide (commonly known as glass). This insulated metal gate electrode can be thought of as one plate of a capacitor. The isolation of the controlling Gate makes the input resistance of the MOSFET extremely high in the Mega-ohms (  ) region thereby making it almost infinite.
As the Gate terminal is isolated from the main current carrying channel "NO current flows into the gate"and just like the JFET, the MOSFET also acts like a voltage controlled resistor were the current flowing through the main channel between the Drain and Source is proportional to the input voltage. Also like the JFET, this very high input resistance can easily accumulate large amounts of static charge resulting in the MOSFET becoming easily damaged unless carefully handled or protected.
Like the previous JFET tutorial, MOSFETs are three terminal devices with a GateDrain and Source and both P-channel (PMOS) and N-channel (NMOS) MOSFETs are available. The main difference this time is that MOSFETs are available in two basic forms:
  • 1. Depletion Type   -   the transistor requires the Gate-Source voltage, ( VGS ) to switch the device "OFF". The depletion mode MOSFET is equivalent to a "Normally Closed" switch.
  •  
  • 2. Enhancement Type   -   the transistor requires a Gate-Source voltage, ( VGS ) to switch the device "ON". The enhancement mode MOSFET is equivalent to a "Normally Open" switch.
The symbols and basic construction for both configurations of MOSFETs are shown below.
MOSFET Symbols

The four MOSFET symbols above show an additional terminal called the Substrate and is not normally used as either an input or an output connection but instead it is used for grounding the substrate. It connects to the main semiconductive channel through a diode junction to the body or metal tab of the MOSFET. In discrete type MOSFETs, this substrate lead is connected internally to the source terminal. When this is the case, as in enhancement types it is omitted from the symbol. The line between the drain and source connections represents the semiconductive channel. If this is a solid unbroken line then this represents a "Depletion" (normally closed) type MOSFET and if the channel line is shown dotted or broken it is an "Enhancement" (normally open) type MOSFET. The direction of the arrow indicates either a P-channel or an N-channel device.

Basic MOSFET Structure and Symbol

MOSFET Construction
The construction of the Metal Oxide Semiconductor FET is very different to that of the Junction FET. Both the Depletion and Enhancement type MOSFETs use an electrical field produced by a gate voltage to alter the flow of charge carriers, electrons for N-channel or holes for P-channel, through the semiconductive drain-source channel. The gate electrode is placed on top of a very thin insulating layer and there are a pair of small N-type regions just under the drain and source electrodes.
We saw in the previous tutorial, that the gate of a JFET must be biased in such a way as to reverse-bias the PN-junction but with a insulated gate MOSFET device no such limitations apply so it is possible to bias the gate of a MOSFET in either polarity, +ve or -ve. This makes MOSFETs especially valuable as electronic switches or to make logic gates because with no bias they are normally non-conducting and this high gate input resistance means that very little or no control current is needed as MOSFETs are voltage controlled devices. Both the P-channel and the N-channel MOSFETs are available in two basic forms, the Enhancement type and the Depletion type.

Depletion-mode MOSFET

The Depletion-mode MOSFET, which is less common than the enhancement types is normally switched "ON" without the application of a gate bias voltage making it a "normally-closed" device. However, a gate to source voltage ( VGS ) will switch the device "OFF". Similar to the JFET types. For an N-channel MOSFET, a "positive" gate voltage widens the channel, increasing the flow of the drain current and decreasing the drain current as the gate voltage goes more negative. In other words, for an N-channel depletion mode MOSFET: +VGS means more electrons and more current. While a -VGS means less electrons and less current. The opposite is also true for the P-channel types. Then the depletion mode MOSFET is equivalent to a "normally-closed" switch.

Depletion-mode N-Channel MOSFET and circuit Symbols

Characteristics Curves for Depletion mode MOSFET

Circuit Symbols for Depletion mode MOSFET
The depletion-mode MOSFET is constructed in a similar way to their JFET transistor counterparts were the drain-source channel is inherently conductive with the electrons and holes already present within the N-type or P-type channel. This doping of the channel produces a conducting path of low resistance between the Drain and Source with zero Gate bias.

Enhancement-mode MOSFET

The more common Enhancement-mode MOSFET is the reverse of the depletion-mode type. Here the conducting channel is lightly doped or even undoped making it non-conductive. This results in the device being normally "OFF" when the gate bias voltage is equal to zero.
A drain current will only flow when a gate voltage ( VGS ) is applied to the gate terminal greater than the threshold voltage ( VTH ) level in which conductance takes place making it a transconductance device. This positive +ve gate voltage pushes away the holes within the channel attracting electrons towards the oxide layer and thereby increasing the thickness of the channel allowing current to flow. This is why this kind of transistor is called an enhancement mode device as the gate voltage enhances the channel.
Increasing this positive gate voltage will cause the channel resistance to decrease further causing an increase in the drain current, ID through the channel. In other words, for an N-channel enhancement mode MOSFET: +VGS turns the transistor "ON", while a zero or -VGS turns the transistor "OFF". Then, the enhancement-mode MOSFET is equivalent to a "normally-open" switch.

Enhancement-mode N-Channel MOSFET and circuit Symbols

Characteristics Curves for Enhancement mode MOSFET

Circuit Symbols for Enhancement mode MOSFET
Enhancement-mode MOSFETs make excellent electronics switches due to their low "ON" resistance and extremely high "OFF" resistance as well as their infinitely high gate resistance. Enhancement-mode MOSFETs are used in integrated circuits to produce CMOS type Logic Gates and power switching circuits in the form of as PMOS (P-channel) and NMOS (N-channel) gates. CMOS actually stands forComplementary MOS meaning that the logic device has both PMOS and NMOS within its design.

The MOSFET Amplifier

Just like the previous Junction Field Effect transistor, MOSFETs can be used to make single stage class A amplifier circuits with the Enhancement mode N-channel MOSFET common source amplifier being the most popular circuit. The depletion mode MOSFET amplifiers are very similar to the JFET amplifiers, except that the MOSFET has a much higher input impedance. This high input impedance is controlled by the gate biasing resistive network formed by R1 and R2. Also, the output signal for the enhancement mode common source MOSFET amplifier is inverted because when VG is low the transistor is switched "OFF" and VD (Vout) is high. When VG is high the transistor is switched "ON" and VD (Vout) is low as shown.

Enhancement-mode N-Channel MOSFET Amplifier

MOSFET Amplifier

The DC biasing of this common source (CS) MOSFET amplifier circuit is virtually identical to the JFET amplifier. The MOSFET circuit is biased in class A mode by the voltage divider network formed by resistors R1 and R2. The AC input resistance is given as RIN = RG = 1MΩ.
Metal Oxide Semiconductor Field Effect Transistors are three terminal active devices made from different semiconductor materials that can act as either an insulator or a conductor by the application of a small signal voltage. The MOSFETs ability to change between these two states enables it to have two basic functions: "switching" (digital electronics) or "amplification" (analogue electronics). Then MOSFETs have the ability to operate within three different regions:
  • 1. Cut-off Region   -  with VGS < Vthreshold   the gate-source voltage is lower than the threshold voltage so the transistor is switched "fully-OFF" and IDS = 0, the transistor acts as an open circuit
  •  
  • 2. Linear (Ohmic) Region   -  with VGS > Vthreshold   and VDS > VGS the transistor is in its constant resistance region and acts like a variable resistor whose value is determined by the gate voltage, VGS
  •  
  • 3. Saturation Region   -  with VGS > Vthreshold the transistor is in its constant current region and is switched "fully-ON". The current IDS = maximum as the transistor acts as a closed circuit


MOSFET Summary

The Metal Oxide Semiconductor FET, MOSFET has an extremely high input gate resistance with the current flowing through the channel between the source and drain being controlled by the gate voltage. Because of this high input impedance and gain, MOSFETs can be easily damaged by static electricity if not carefully protected or handled. MOSFETs are ideal for use as electronic switches or as common-source amplifiers as their power consumption is very small. Typical applications for MOSFETs are in Microprocessors, Memories, Calculators and Logic CMOS Gates etc.
Also, notice that a dotted or broken line within the symbol indicates a normally "OFF" enhancement type showing that "NO" current can flow through the channel when zero gate-source voltage VGS is applied. A continuous unbroken line within the symbol indicates a normally "ON" Depletion type showing that current "CAN" flow through the channel with zero gate voltage. For P-channel types the symbols are exactly the same for both types except that the arrow points outwards. This can be summarised in the following switching table.
MOSFET typeVGS = +veVGS = 0VGS = -ve
N-Channel DepletionONONOFF
N-Channel EnhancementONOFFOFF
P-Channel DepletionOFFONON
P-Channel EnhancementOFFOFFON

So for N-channel enhancement type MOSFETs, a positive gate voltage turns "ON" the transistor and with zero gate voltage, the transistor will be "OFF". For a P-channel enhancement type MOSFET, a negative gate voltage will turn "ON" the transistor and with zero gate voltage, the transistor will be "OFF". The voltage point at which the MOSFET starts to pass current through the channel is determined by the threshold voltage VTH of the device and is typical around 0.5V to 0.7V for an N-channel device and -0.5V to -0.8V for a P-channel device.
In the next tutorial about Field Effect Transistors instead of using the transistor as an amplifying device, we will look at the operation of the transistor in its saturation and cut-off regions when used as a solid-state switch. Field effect transistor switches are used in many applications to switch a DC current "ON" or "OFF" such as LED’s which require onlly a few milliamps at low DC voltages, or motors which require higher currents at higher voltages.

The MOSFET as a Switch

We saw previously, that the N-channel, Enhancement-mode MOSFET operates using a positive input voltage and has an extremely high input resistance (almost infinite) making it possible to interface with nearly any logic gate or driver capable of producing a positive output. Also, due to this very high input (Gate) resistance we can parallel together many different MOSFETs until we achieve the current handling limit required. While connecting together various MOSFETs may enable us to switch high currents or high voltage loads, doing so becomes expensive and impractical in both components and circuit board space. To overcome this problem Power Field Effect Transistors or Power FET's were developed.
We now know that there are two main differences between field effect transistors, depletion-mode only for JFET's and both enhancement-mode and depletion-mode for MOSFETs. In this tutorial we will look at using the Enhancement-mode MOSFET as a Switch as these transistors require a positive gate voltage to turn "ON" and a zero voltage to turn "OFF" making them easily understood as switches and also easy to interface with logic gates.
The operation of the enhancement-mode MOSFET can best be described using its I-V characteristics curves shown below. When the input voltage, ( VIN ) to the gate of the transistor is zero, the MOSFET conducts virtually no current and the output voltage, ( VOUT ) is equal to the supply voltage VDD. So the MOSFET is "fully-OFF" and in its "cut-off" region.

MOSFET Characteristics Curves

Enhancement mode MOSFET

The minimum ON-state gate voltage required to ensure that the MOSFET remains fully-ON when carrying the selected drain current can be determined from the V-I transfer curves above. When VIN is HIGH or equal to VDD, the MOSFET Q-point moves to point A along the load line. The drain current IDincreases to its maximum value due to a reduction in the channel resistance. ID becomes a constant value independent of VDD, and is dependent only on VGS. Therefore, the transistor behaves like a closed switch but the channel ON-resistance does not reduce fully to zero due to its RDS(on) value, but gets very small.
Likewise, when VIN is LOW or reduced to zero, the MOSFET Q-point moves from point A to point B along the load line. The channel resistance is very high so the transistor acts like an open circuit and no current flows through the channel. So if the gate voltage of the MOSFET toggles between two values, HIGH and LOW the MOSFET will behave as a "single-pole single-throw" (SPST) solid state switch and this action is defined as:

1. Cut-off Region

Here the operating conditions of the transistor are zero input gate voltage ( VIN ), zero drain current IDand output voltage VDS = VDD Therefore the MOSFET is switched "Fully-OFF".

Cut-off Characteristics

Cut-off MOSFET Switch
  • The input and Gate are grounded (0v)
  • Gate-source voltage less than threshold voltage VGS < VTH
  • MOSFET is "fully-OFF" (Cut-off region)
  • No Drain current flows ( ID = 0 )
  • VOUT = VDS = VDD = "1"
  • MOSFET operates as an "open switch"
Then we can define the "cut-off region" or "OFF mode" of a MOSFET switch as being, gate voltage,VGS < VTH and ID = 0. For a P-channel Enhancement MOSFET, the Gate potential must be more positive with respect to the Source.

2. Saturation Region

In the saturation or linear region, the transistor will be biased so that the maximum amount of gate voltage is applied to the device which results in the channel resistance RDS(on) being as small as possible with maximum drain current flowing through the MOSFET switch. Therefore the MOSFET is switched "Fully-ON".

Saturation Characteristics

Saturation MOSFET Switch
  • The input and Gate are connected to VDD
  • Gate-source voltage is much greater than threshold voltage VGS > VTH
  • MOSFET is "fully-ON" (saturation region)
  • Max Drain current flows ( ID = VDD / RL )
  • VDS = 0V (ideal saturation)
  • Min channel resistance RDS(on) < 0.1Ω
  • VOUT = VDS = 0.2V (RDS.ID)
  • MOSFET operates as a "closed switch"
Then we can define the "saturation region" or "ON mode" of a MOSFET switch as gate-source voltage,VGS > VTH and ID = Maximum. For a P-channel Enhancement MOSFET, the Gate potential must be more negative with respect to the Source.
By applying a suitable drive voltage to the gate of an FET, the resistance of the drain-source channel,RDS(on) can be varied from an "OFF-resistance" of many hundreds of kΩ's, effectively an open circuit, to an "ON-resistance" of less than 1Ω, effectively a short circuit. We can also drive the MOSFET to turn "ON" faster or slower, or pass high or low currents. This ability to turn the power MOSFET "ON" and "OFF" allows the device to be used as a very efficient switch with switching speeds much faster than standard bipolar junction transistors.

An example of using the MOSFET as a switch

MOSFET as a Switch
In this circuit arrangement an Enhancement-mode N-channel MOSFET is being used to switch a simple lamp "ON" and "OFF" (could also be an LED). The gate input voltage VGSis taken to an appropriate positive voltage level to turn the device and therefore the lamp either fully "ON", ( VGS = +ve ) or at a zero voltage level that turns the device fully "OFF", (VGS = 0 ).
If the resistive load of the lamp was to be replaced by an inductive load such as a coil, solenoid or relay a "flywheel diode" would be required in parallel with the load to protect the MOSFET from any self generated back-emf.
Above shows a very simple circuit for switching a resistive load such as a lamp or LED. But when using power MOSFETs to switch either inductive or capacitive loads some form of protection is required to prevent the MOSFET device from becoming damaged. Driving an inductive load has the opposite effect from driving a capacitive load. For example, a capacitor without an electrical charge is a short circuit, resulting in a high "inrush" of current and when we remove the voltage from an inductive load we have a large reverse voltage build up as the magnetic field collapses, resulting in an induced back-emf in the windings of the inductor.
For the power MOSFET to operate as an analogue switching device, it needs to be switched between its "Cut-off Region" where VGS = 0 and its "Saturation Region" were VGS(on) = +ve. The power dissipated in the MOSFET ( PD ) depends upon the current flowing through the channel ID at saturation and also the "ON-resistance" of the channel given as RDS(on). For example.

Example No1

Lets assume that the lamp is rated at 6v, 24W and is fully "ON", the standard MOSFET has a channel "ON-resistance" ( RDS(on) ) value of 0.1ohms. Calculate the power dissipated in the MOSFET switch.
The current flowing through the lamp is calculated as:
MOSFET Switch Channel Current
Then the power dissipated in the MOSFET will be given as:
MOSFET Switch Power Dissipation

You may think, well so what!, but when using the MOSFET as a switch to control DC motors or high inrush current devices the "ON" channel resistance ( RDS(on) ) is very important. For example, MOSFETs that control DC motors, are subjected to a high in-rush current when the motor first begins to rotate, because the motors starting current is only limited by the very low resistance value of the motors windings. Then a high RDS(on) channel resistance value would simply result in large amounts of power being dissipated and wasted within the MOSFET itself resulting in an excessive temperature rise, which if not controlled could result in the MOSFET becoming very hot and damaged due to a thermal overload.
A lower value RDS(on) on the other hand, is also a desirable parameter as it helps to reduce the channels effective saturation voltage ( VDS(sat) = ID x RDS(on) ) across the MOSFET. Power MOSFETs generally have a RDS(on) value of less than 0.01Ω.
One of the main limitation of a MOSFET is the maximum current it can handle. So the RDS(on) parameter is an important guide to the switching efficiency of the MOSFET and is simply the ratio of VDS / ID when the transistor is turned "ON". When using a MOSFET or any type of field effect transistor for that matter as a solid-state switching device it is always advisable to select ones that have a very low RDS(on) value or at least mount them onto a suitable heatsink to help reduce any thermal runaway and damage. Power MOSFETs used as a switch generally have surge-current protection built into their design, but for high-current applications the bipolar junction transistor is a better choice.

Power MOSFET Motor Control

Because of the extremely high input or gate resistance that the MOSFET has, its very fast switching speeds and the ease at which they can be driven makes them ideal to interface with op-amps or standard logic gates. However, care must be taken to ensure that the gate-source input voltage is correctly chosen because when using the MOSFET as a switch the device must obtain a low RDS(on)channel resistance in proportion to this input gate voltage. Low threshold type MOSFETs may not switch "ON" until a least 3V or 4V has been applied to its gate and if the output from the logic gate is only +5V logic it may be insufficient to fully drive the MOSFET into saturation. Using lower threshold MOSFETs designed for interfacing with TTL and CMOS logic gates that have thresholds as low as 1.5V to 2.0V are available.
Power MOSFETs can be used to control the movement of DC motors or brushless stepper motors directly from computer logic or by using pulse-width modulation (PWM) type controllers. As a DC motor offers high starting torque and which is also proportional to the armature current, MOSFET switches along with a PWM can be used as a very good speed controller that would provide smooth and quiet motor operation.

Simple Power MOSFET Motor Controller

MOSFET as a Switch

As the motor load is inductive, a simple flywheel diode is connected across the inductive load to dissipate any back emf generated by the motor when the MOSFET turns it "OFF". A clamping network formed by a zener diode in series with the diode can also be used to allow for faster switching and better control of the peak reverse voltage and drop-out time. An additional silicon or zener diode D1 can also be placed across the channel of a MOSFET switch when using inductive loads, such as motors, solenoids, etc, for suppressing overvoltage switching transients and noise giving extra protection to the MOSFET switch if required. Resistor R2 is used as a pull-down resistor to help pull the TTL output voltage down to 0V when the MOSFET is switched "OFF".

P-channel MOSFET Switch

Thus far we have looked at the N-channel MOSFET as a switch were the MOSFET is placed between 
P-channel mosfet switch
P-channel MOSFET Switch
the load and the ground. This also allows the gate drive or switching signal to be referenced to ground (low-side switching). But in some applications we require the use of P-channel enhancement-mode MOSFET were the load is connected directly to ground and the MOSFET switch is connected between the load and the positive supply rail (high-side switching) as we do with PNP transistors.
In a P-channel device the conventional flow of drain current is in the negative direction so a negative gate-source voltage is applied to switch the transistor "ON". This is achieved because the P-channel MOSFET is "upside down" with its source terminal tied to the positive supply +VDD. Then when the switch goes LOW, the MOSFET turns "ON" and when the switch goes HIGH the MOSFET turns "OFF".
This upside down connection of a P-channel enhancement mode MOSFET switch allows us to connect it in series with a N-channel enhancement mode MOSFET to produce a complementary or CMOS switching device as shown across a dual supply.

Complementary MOSFET Motor Controller

Complementary MOSFET Switch
The two MOSFETs are configured to produce a bi-directional switch from a dual supply with the motor connected between the common drain connection and ground reference. When the input is LOW the P-channel MOSFET is switched-ON as its gate-source junction is negatively biased so the motor rotates in one direction. Only the positive +VDD supply rail is used to drive the motor.
When the input is HIGH, the P-channel device switches-OFF and the N-channel device switches-ON as its gate-source junction is positively biased. The motor now rotates in the opposite direction because the motors terminal voltage has been reversed as it is now supplied by the negative -VDD supply rail. Then the P-channel MOSFET is used to switch the positive supply to the motor for forward direction (high-side switching) while the N-channel MOSFET is used to switch the negative supply to the motor for reverse direction (low-side switching).
There are a variety of configurations for driving the two MOSFETs with many different applications. Both the P-channel and the N-channel devices can be driven by a single gate drive IC as shown. However, to avoid cross conduction with both MOSFETs conducting at the same time across the two polarities of the dual supply, fast switching devices are required to provide some time difference between them turning "OFF" and the other turning "ON". One way to overcome this problem is to drive both MOSFETs gates separately. This then produces a third option of "STOP" to the motor when both MOSFETs are "OFF".
MOSFET 1MOSFET 2Motor Function
OFFOFFMotor Stopped (OFF)
ONOFFMotor Rotates Forward
OFFONMotor Rotates Reverse
ONONNOT ALLOWED
Please note that it is important that no other combination of inputs are allowed atb the same time as this may cause the power supply to be shorted out, as both MOSFETs, FET1 and FET2 could be switched "ON" at the same time, (fuse = bang!).

Bipolar Junction Transistor Tutorial


Bipolar Junction Transistor
 
  • The Bipolar Junction Transistor (BJT) is a three layer device constructed form two semiconductor diode junctions joined together, one forward biased and one reverse biased.
  • There are two main types of bipolar junction transistors, the NPN and the PNP transistor.
  • Transistors are "Current Operated Devices" where a much smaller Base current causes a larger Emitter to Collector current, which themselves are nearly equal, to flow.
  • The arrow in a transistor symbol represents conventional current flow.
  • The most common transistor connection is the Common-emitter configuration.
  • Requires a Biasing voltage for AC amplifier operation.
  • The Base-Emitter junction is always forward biased whereas the Collector-Base junction is always reverse biased.
  • The standard equation for currents flowing in a transistor is given as:   IE = IB + IC
  • The Collector or output characteristics curves can be used to find either IbIc or β to which a load line can be constructed to determine a suitable operating point, Q with variations in base current determining the operating range.
  • A transistor can also be used as an electronic switch to control devices such as lamps, motors and solenoids etc.
  • Inductive loads such as DC motors, relays and solenoids require a reverse biased "Flywheel" diode placed across the load. This helps prevent any induced back emf's generated when the load is switched "OFF" from damaging the transistor.
  • The NPN transistor requires the Base to be more positive than the Emitter while the PNP type requires that the Emitter is more positive than the Base.

Field Effect Transistor Tutorial

  • Field Effect Transistors, or FET's are "Voltage Operated Devices" and can be divided into two main types: Junction-gate devices called JFET's and Insulated-gate devices calledIGFET´s or more commonly known as MOSFETs.
  • Insulated-gate devices can also be sub-divided into Enhancement types and Depletiontypes. All forms are available in both N-channel and P-channel versions.
  • FET's have very high input resistances so very little or no current (MOSFET types) flows into the input terminal making them ideal for use as electronic switches.
  • The input impedance of the MOSFET is even higher than that of the JFET due to the insulating oxide layer and therefore static electricity can easily damage MOSFET devices so care needs to be taken when handling them.
  • When no voltage is applied to the gate of an enhancement FET the transistor is in the "OFF" state similar to an "open switch".
  • The depletion FET is inherently conductive and in the "ON" state when no voltage is applied to the gate similar to a "closed switch".
  • FET's have very large current gain compared to junction transistors.
  • They can be used as ideal switches due to their very high channel "OFF" resistance, low "ON" resistance.
  • To turn the N-channel JFET transistor "OFF", a negative voltage must be applied to the gate.
  • To turn the P-channel JFET transistor "OFF", a positive voltage must be applied to the gate.
  • N-channel depletion MOSFETs are in the "OFF" state when a negative voltage is applied to the gate to create the depletion region.
  • P-channel depletion MOSFETs, are in the "OFF" state when a positive voltage is applied to the gate to create the depletion region.
  • N-channel enhancement MOSFETs are in the "ON" state when a "+ve" (positive) voltage is applied to the gate.
  • P-channel enhancement MOSFETs are in the "ON" state when "-ve" (negative) voltage is applied to the gate.

The Field Effect Transistor Family-tree

Field Effect Transistor Types

Biasing of the Gate for both the junction field effect transistor, (JFET) and the metal oxide semiconductor field effect transistor, (MOSFET) configurations are given as:
TypeJunction FETMetal Oxide Semiconductor FET
Depletion ModeDepletion ModeEnhancement Mode
BiasONOFFONOFFONOFF
N-channel0v-ve0v-ve+ve0v
P-channel0v+ve0v+ve-ve0v

Differences between a FET and a Bipolar Transistor

Field Effect Transistors can be used to replace normal Bipolar Junction Transistors in electronic circuits and a simple comparison between FET's and transistors stating both their advantages and their disadvantages is given below.
Field Effect Transistor (FET)Bipolar Junction Transistor (BJT)
1Low voltage gainHigh voltage gain
2High current gainLow current gain
3Very input impedanceLow input impedance
4High output impedanceLow output impedance
5Low noise generationMedium noise generation
6Fast switching timeMedium switching time
7Easily damaged by staticRobust
8Some require an input to turn it "OFF"Requires zero input to turn it "OFF"
9Voltage controlled deviceCurrent controlled device
10Exhibits the properties of a Resistor
11More expensive than bipolarCheap
12Difficult to biasEasy to bias