MOSFET DRIVER
Context
● You are developing an embedded application using one or more members of the 8051 family of microcontrollers.
● You are designing an appropriate hardware foundation for your application.
Problem
How do you control a DC load with high current requirements (up to around 100A) using a microcontroller?
Background
In BJT DRIVER [page 124] we saw that a bipolar junction transistor is a current- controlled switch. By contrast, a metal oxide semiconductor field effect transistor (MOSFET) is a voltage-controlled switch (Figure 7.29). With a gate voltage of 0, the device will block current flow between the drain and source, even when a potential of several hundred volts is applied.
MOSFET ‘switch-on’ times are similar to those of the BJT, but – unlike BJTs – the ‘switch-off’ time is also very fast (of the order of 50 ns). As a result the MOSFET is par- ticularly popular in applications requiring high switching frequencies (up to around 1 MHz), such as PWM-based speed control and pulse-rate modulation systems (see, for example, HARDW ARE PWM [page 808] and HARDW ARE PRM [page 742]).
One other important characteristic of MOSFETs is that the oxidised metal gate electrode electrically insulates the gate from the channel, which means there is essentially zero current flow between the gate and the channel during any part of the signal cycle. This gives MOSFETs an extremely large input impedance. It also means that the devices are sensitive to static: see ‘Reliability and Safety Issues’.
The (oxidized metal) gate electrode electrically insulates the gate from the channel, which means there is essentially zero current between the gate and the channel during any part of the signal cycle. This gives the MOSFET an extremely large input impedance. It also means that the devices are sensitive to static: see ‘Reliability and safety issues’.
Solution
None of the interface circuits so far considered allow us to switch high DC currents. MOSFETs provide a flexible and cost-effective solution to many high-power applications, able to switch currents of up to 100A or more. Such devices are frequently mounted in a package that allows effective use of heat sinks, to dissipate the heat generated during normal operation of the device (Figure 7.30).
Increasing numbers of MOSFETS can be driven directly from a processor port. However, in most cases it is necessary to drive the device with a higher voltage (12V +) than is available from the port itself. In addition, as we have discussed in con- nection with BJT DRIVER [page 124], it is generally good policy to have an extra layer of protection between the ports and any high-power load.
In these circumstances, a good solution is to use a ‘level-shifter’ IC, such as the cheap 74×06, as an interface between the port and the MOSFET (see Figure 7.31).
[Note: The chip contains six inverting buffers: these link A0 (the input to buffer 0) to /YO (the output from buffer 0), A1 to /Y1, and so on. Vcc should be connected to the 5V supply; the voltage at the buffer output can be up to 12V or, in the case of the 74F06A up to 30V, at up to approximately 100 mA.]
[Note: that a Logic 0 output is required to ‘switch on’ the load. Note that, as we are using the 74×06 for level shifting, the pull-up resistor is required; note that it is connected to the high-power supply rail.]
For example, see Figure 7.32. This illustrates the use of a useful MOSFET, the IRF540, linked to a port via 74×06. Note that that the inverting nature of the 74×06 allows us to ensure that we require ‘Logic 0’ to drive the load: again, this is good policy.
Note also that the IRF540 can switch loads of up to 3A at 100V (DC). Note that (in the N-channel version) it has a very low ‘on’ resistance (0.04 Ohms). This is impor- tant as the power loss in the MOSFET is determined by the relationship:
P = I2R
At 30A, even a low resistance translates into a substantial power loss. Remember that this power will be dissipated as heat and the larger the loss the greater the cool- ing requirements will be.
Pull-up resistors
When using this pattern, you may need to incorporate pull-up resistors in your hard- ware design. See NAKED LED [page 110] for further details.
Hardware resource implications
Every implementation of this pattern uses at least one port pin.
Reliability and safety implications
There are a number of crucial reliability and safety issues associated with the use of high-power DC loads: these are discussed in the pattern BJT DRIVER [page 124]. Please refer to this pattern for further information.
Handling MOSFETs
Because the oxide layer on the gate electrode is extremely thin, the MOSFET is suscep- tible to destruction by electrostatic discharges. Take suitable precautions when handling them.
Portability
These techniques work with all 8051s (and most other microcontroller and micro- processor families).
As usual, if working with port pins that do not have internal pull-up resistors, you need to include such resistors (10K will do) in your design.
Overall strengths and weaknesses MOSFETs have a large voltage and current capacity. MOSFETs have fast switching speeds.
MOSFETs are static sensitive.
At low currents, BJTs can be more cost-effective.
Solid-state relays, with inbuilt opto-isolation between low- and high-voltage sides of the system, can be more reliable: see SSR DRIVER ( DC ) [page 144].
Related patterns and alternative solutions
We can use power BJTs to do a similar job to the MOSFETs used here (see BJT DRIVER [page 124] for background details). However, BJTs tend to be more valuable at lower power levels.
A particular disadvantage of BJTs is that, when in saturation, the voltage drop across the emitter / collector terminals is about 1V. In some applications (for example, H-bridges used for DC motor control) two transistors are required in each ‘arm’ of the bridge, with the result that the voltage drop becomes around 2V: in typical 12V sup- plies, this represents a major loss. Using MOSFETs, this loss can be reduced by a factor of around 10. This combined with the general low cost and high switching speeds of the MOSFET solution help to explain why this approach is so popular.
Another alternative, when working with high-current and / or high-voltage loads, is the insulated gate bipolar transistor (IGBT). The IGBT combines some of the best features of BJT and MOSFET approaches. It has a low on-state resistance and a turn-off and turn-on time of around 1 µs.
Example: Lighting a lamp
Figure 7.33 shows the control of a 12V, 20W lamp using a MOSFET driver.
Note that even this comparatively low-voltage lamp has a large inrush current: the thermistor, Rt, is included in series with the lamp to reduce this current flow: see BJT DRIVER [page 124] for further details.