Free Electronics Course - Home Page Brunning Software - Home Page

Using a MOSFET as a Switch

Experiment E6.

A field effect transistor operates in a very similar way to the transistor that we have just experimented with except that the main current flow is controlled by an electrostatic field. An FET has the great advantage that no current flows into the control input (called the gate), the main current is turned on and off by the level of voltage on the gate.

FETs are available in many different types and with various drive level requirements. We are going to keep it simple and not get into these complications. The MOSFET that we will be using is a logic level MOSFET - they are designed to be driven directly from the output lines of microcontrollers - that is all we need to know!

For these experiments we will be using the BS270 N channel MOSFET. As it is designed for logic level inputs we know that when the gate is connected to ground it is turned off and when the gate is connected to 5 volts it is turned on. We do not need to use a resistor between the push button switch and the gate because the current is very very low whatever the input voltage (if kept within 0 to 5 volts).



BS270 MOSFET connections shown leads pointing upwards.

It is common for MOSFETs to have other lead layouts so be sure to check if you are using a different type.

Wiring the circuit.....

Switch off the 5 volt supply then follow these instructions:-

1. If you are following on from the previous experiment remove the 100uF capacitor C1. Remove the 100k resistor R1. Remove the transistor.

If you are starting with a blank plugboard follow instructions 1, 4, 5 & 6 for the experiment 5.


2. Bend and trim the leads of a 1M resistor as shown in the first experiment. Fit R1 between Y6 and I7 (letter I + 7).
3. Fit bare wire link from I3 to H7.
4. Fit a BS270 MOSFET with its gate in J7, source in Y9 and drain in J8.

Testing the circuit.....

Switch on the 5 volt supply to the programmer module. Press push button S1 and the LED will glow.

With the MOSFET the output current is switched on by raising the input voltage, the actual current which flows into the gate is so low that for all practical uses it can be treated as being zero. To illustrate this pull out the 1M resistor (R1) then press the push button switch. The LED will stay on when the button is released. There is a tiny amount of capacitance at the MOSFET input which gets charged up to 5 volts and the current is so low that it can take between an hour and several days to discharge this capacitance. Replace the 1M resistor (Y6 to I7) and the LED will immediately go out, and only light when the button is pressed.



2 minute on circuit.....

Switch off the 5 volt supply to the plugboard. Fit the capacitor as we did in experiment 5 as follows:-

7. Fit a 100uF capacitor with its short lead (-) in Z4 and long lead in J3.

Switch on the 5 volt supply.

Press the push button. The LED will stay on when the button is released and remain at full brightness for about a minute and a half then gradually fade away to zero.

In experiment E5 when we added the capacitor the LED stayed on for about half a minute after the button was released. With this circuit we have a 1M ohm resistor across the input circuit which is ten times higher resistance, but the input characteristics of the two devices are totally different so we cannot expect the on time an exact ratio of 10 times. However, if we now increased the resistor value to 10M ohms the on time would be multiplied by 10. (10M ohm is the largest practical resistor value for most circuits).


With the 5 volts on wait until the LED is completely off. Leave the 5 volt supply turned on. Pull out the 1M ohm resistor then press the push button. This time the LED will light and stay on for a very long time - maybe an hour or more. This proves that the gate takes virtually no current.

Switching high current.....

One of the most amazing characteristics of MOSFETs is that even the MOSFETs which handle very high current take no gate current. This means that we can use virtually the same circuit to switch 10 or even 100 amps as we have used to switch the LED on. The gate circuit can be the same but obviously if we are to switch high current we need to remove the LED and its series resistor and fit for example a DC motor in its place. Do remember that a motor is an inductive load so the MOSFET must be protected from inductive voltage surges. Modern high current MOSFETs have an internal high current diode which is wired to protect the main chip.

If you like this tutorial about MOSFETs you will also like our PIC programming course.
To read the introduction click:- Introduction to PIC programming course.

Using the plugboard. Reading Resistors What is a Resistor? Series and Parallel R What is a Capacitor? Discovering Semiconductors. Using a Transistor Using a MOSFET Logic Circuits. PIC
Micro
Next