EDN logo

Design Features


Protection techniques ensure µC reliability in power-control circuits

Richard J Valentine, Motorola Inc


Protecting the µC is critical in power-control applications. Protection methods range from limiting input voltages and noise spikes to preventing an out-of-control program from locking up the µC.

  Countless numbers of products contain microcontrollers (µCs) that manage critical control elements. In large motor-control systems, failure of the µC or other critical components to perform properly can cause serious injury to the users or bystanders. You need to take special steps to protect the µC in such systems. Because the µC manages most, if not all, of the control design's functions, understanding how to properly protect the µC will lead to more reliable controls. By incorporating numerous protection methods, you can greatly improve the reliability of the µC.

  Adequate protection comes in many forms. Various methods that limit voltage spikes—such as simple RC filters and voltage clamps—greatly increase the µC's reliability in power-laden designs. Depending on the application and EMI concerns, simple RC filters do not exhibit the abrupt voltage response of diodes or zener clamping devices. Setting the frequency response of each µC line using filter networks minimizes unwanted noise spikes from corrupting valid signals. In addition to controlling voltage levels, noise spikes and EMI, you need to deal with potential program bugs and environmental concerns.

Know the failure modes

  Fortunately, designing a reliable fault-tolerant µC-based product is not too difficult when you recognize the areas of inadequate protection. Figure 1a shows a typical power-control circuit and the problem areas; the circuit in Figure 1b incorporates various protection circuits to prevent those problems. Several potential failure modes can occur, including the following:

 c Intermittent power or sensor connection (loose wires or
connectors),

 c Reversal of power connections (user hookup error),

 c Power-stage transistor short (induced by poor thermal interface or short),

 c µC computational error (caused by undiscovered software bug),

 c Latent ESD damage to active components (static charge during assembly),

 c Motor-bearing failure (poor lubrication or excessive revolutions per minute),

 c Motor-shaft lockup due to external mechanical mishap (user misuse),

 c A few more that you can't imagine but will happen (unknown failure modes).

  "Unknown failure modes" is the most disconcerting category. You need to understand which part of the electronics system is the most potentially dangerous and then decide how to deal with it. In the motor-control example of Figure 1, the motor is the most hazardous element. In the case of an open sensor or software glitch, turning off the power stage, which turns off the motor, is appropriate. This action disables the motor, thereby stopping any mechanical movement that may cause harm. Such thinking is a good start but assumes that the power stage or the µC control device is not one of the parts that can fail.

  In addition to motor controllers, other µC-based designs that control ac loads or relays are also more prone to damage than, for instance, a µC in office computer equipment. Office computers typically use well-regulated power supplies, usually operate in a mild operating environment, and have probably been subjected to EMI design rules. A µC that drives a relay directly or indirectly is subject to voltage transients that the relay's inductive coil causes and to RF noise that arcing across the contacts of the relay generates.

  Even seemingly innocuous designs, such as driving an indicator lamp or LED, can cause problems. For instance, problems can occur if you install the lamp or LED where a person can touch them and induce sufficient ESD into the connecting wires that lead back to the µC. Also, battery-powered µC equipment is susceptible to several problems: ESD from the user, EMI from nearby high-powered electrical/electronic equipment, reverse battery hookups, and extreme temperature/humidity environments.

  In addition to system-related problems, µCs are susceptible to their own particular problems. Excessive voltage levels are exceptionally dangerous to semiconductors. Exceeding the semiconductor's breakdown-voltage threshold can burn a hole into the transistor's die in a few microseconds depending on the voltage spike's energy level. The exact failure effect correlates to the voltage fields and current densities in the semiconductor's structure. The typical µC data sheet for an MC68HC05 (or similar device), for example, lists maximum voltage and current levels that the µC can survive. An interesting aspect of these maximum ratings is that the µC can still succumb to an operational failure but not suffer permanent electrical damage when subjected to voltage or current levels that are within its maximum data sheet's specifications.

  Figure 2 illustrates a typical µC's I/O-port circuit design. Internal diodes connect from the port line to both supply voltage (VCC) and common (VSS). These diodes conduct and clamp the input voltage if the port-line voltage level exceeds VCC by about 0.5V or exceeds VSS by about –0.5V.

  Relying on the internal diodes to contain excessive voltage transients on the µC I/O lines is not recommended, especially if the clamp current levels are above a few microamps. When internal diodes operate as clamps, current has to flow through micron-sized pathways or metalization in the µC and out to the common or VCC bus. If several port lines are in a clamp mode, the total clamp current can reach levels that create significant voltage drops in the internal VCC or VSS pathways. These voltage drops can affect the µC logic states or, even worse, can generate enough heat to cause permanent damage to the µC's structure.

  Using the µC port lines to conduct clamp current can also lead to more trouble than just excessive power or voltage drops if the external voltage transients contain high frequencies. As Figure 2 shows, the µC internal clamp diodes are likely to be more complex bipolar elements that are subject to latch-up under certain conditions. These conditions include voltage transients of an RF nature that many wireless types of applications can generate.

  Externally generated noise spikes on any µC line can induce erratic operation. These spikes can cause the program to crash or lock up, can cause data-direction registers to change state, and can reset or corrupt internal timers. Noise spikes are a normal design consideration in any µC design. As a quick test, EMI experts recommend that you operate a high-powered cellular or mobile transceiver in close proximity to the µC prototype design. If the µC locks up or operates erratically, serious EMI lab testing is in order. Operating the µC prototype design near an automotive-ignition system gives a good indication of EMI tolerance. ESD test generators are also available that can apply ESD to the external wiring, switches, and control panel to verify ESD endurance.

Protect against an out-of-control program

  You must also guard against an out-of-control program. Some op-codes exist that can invoke some µCs into a self-test mode. If, by chance, an out-of-control program or a "hole" in the program manages to allow the µC's program register to load and execute a special self-test code, the µC ignores its user program and performs a built-in self-test routine. Usually, only a complete power-down and normal start-up can reset the µC out of a self-test mode. Some programmers actually search all of their assembly object listings for any of these self-test data codes and rewrite the program to eliminate these particular codes. Raising a certain pin to an abnormal voltage level during a reset can also invoke unwanted self-test modes.

  Check with the µC manufacturer to verify how the self-test mode operates and then take steps to ensure that your system doesn't inadvertently invoke this mode during the application's normal operation. You can write some initialization routines to perform a limited circuit test of the application. If this test detects a failure, you can put the controller in a "service required" mode. Testing both critical input-sensor lines and power-stage control lines is recommended practice. Some applications dedicate a µC to perform just this function at all times.

  A technique to catch an out-of-control program is to add several "no-ops" instructions followed by a software interrupt at the end of each program sequence or subroutine. (The software interrupt halts other program activity, and you use it instead of a jump instruction.) The software-interrupt routine forces a reset of the µC and can toggle an I/O line to alert the user or programmer that a major program error has occurred. Another method to help ensure reliable µC operation is to use two identical µCs whose output lines are fed to an AND gate. Both µCs have to compute the same results and output the identical logic 1 signals before the AND gate will allow the logic 1 signal to pass though to a power-control stage or other critical output element.

  The normal watchdog routine, in which the program must periodically reset an internal or external timer, can also detect a program lockup. The no-op instructions followed by a software interrupt may detect a program fault faster than can the watchdog routine, depending on the watchdog timer's value. Other items that cause mysterious program faults are a poor reset-control circuit, floating interrupt lines, or power-supply brownouts. Often, the program runs fine in the development-system environment but fails after you electrically program the µC and run it in a stand-alone mode. In many cases, this failure results from an incorrect reset or interrupt design in the user's circuit. The development system usually has some type of built-in reset and interrupt-control circuits that allow the µC to operate.

  You should terminate all unused µC pins with pullup or pulldown resistors. Directly connecting unused lines to VSS or VCC can spell trouble if the µC inadvertently sets the port line's data-direction registers as outputs, which might happen with an out-of-control program or simple program error.

  Another reason to use termination resistors rather than direct connections is that, during reset, all of the µC port lines go to a high impedance, allowing output lines to float. This high impedance can wreak havoc if the output lines are directly driving a high-impedance power device, such as a power MOSFET. Any slight leakage or EMI can turn on the MOSFET during the reset period, which lasts until the µC starts executing the port-initialization code. Note that some µCs include internal I/O-port-termination resistors to minimize this problem.

Understand the basis of EMI problems

  Dealing with EMI problems is a large part of ensuring a reliable product. Realizing what causes EMI requires a review of some fundamentals. Familiarity with the limitations of various CAD tools and µC-development systems is also important.

  You normally control an inductive load using a device, such as a relay/contactor or power transistor, to switch the current through the inductor. A µC output-port line can also directly control low-power loads. The difficult aspect of switching inductive loads is that, when an inductive load is switched off, a collapsing magnetic field builds up a counter voltage (CEMF) whose amplitude is related to the inductance, coil current, coil resistance, and the rate at which the current switches off. The formula to calculate the inductive kickback voltage is

EPEAK=L(di/dt),

where EPEAK is the kickback voltage, L is the inductance in henries, di is the current amplitude delta in amperes, and dt is the time period of the switching event in seconds.

  Putting this formula into practice reveals that the fast µC switching speeds—typically 50 nsec—and miniature 5V relays or any inductive load can generate a significant kickback voltage. Miniature 5V relays typically have coil inductances of tens of millihenries. Generally, lower coil currents mean more windings, which results in higher inductance values. A test of three generic 5V miniature relays indicated the following coil resistance and inductance values: 55V with 26 mH, 70V with 65 mH, and 250V with 77 mH. Using the previous formula, theoretical peak voltages of over 20,000V are possible if these miniature relays switch at 50-nsec speeds. Adding a simple clamp diode across the coil is the usual fix, but introduces another set of problems.

  When you initially energize the relay coil, its current rises at a slope mostly controlled by the coil's inductance and resistance values and by the applied voltage. The inductor's current continues to ramp up, with the dc resistance generally limiting the maximum level. If the coil's pulse width is too narrow, the coil current may not reach its maximum value, which reduces the kickback voltage. This lower voltage may not correctly operate the relay mechanism.

  You should keep track of the maximum inductance values of any component that electronic devices switch. This statement holds true for so-called "noninductive" devices, such as lamps or resistors. All components have a certain amount of inductance, which will become critical when the switching edges are too fast.

  When an open-collector (bipolar type) or open-drain (MOSFET type) µC output line switches any inductor, the inductor's kickback voltage can easily exceed the transistor's breakdown-voltage rating and may cause a secondary-breakdown failure. Once the transistor enters secondary breakdown, its blocking voltage diminishes, and the remaining inductive energy literally burns a hole into the silicon chip. Some power transistors, such as avalanche-rated power MOSFETs, act like zener diodes if the blocking voltage exceeds nominal. These transistors do not fail until their power-dissipation rating exceeds the maximum.

PC-board layout affects EMI

  Most designers use software layout tools to design pc boards, and several such programs use an autorouter to connect the traces. This method works fine for low-speed and low-current circuits. However, big problems usually occur when an autorouter places high-speed and high-current lines without some guidance from an EMI-knowledgeable engineer. Some companies actually require that experienced EMI engineers operate the layout tools.

  A few general rules can help minimize EMI difficulties in pc-board layouts:

 c Make high-current switching lines as short and as wide as possible.

 c Use the "three-to-one" layout rule: the trace width should not be less than one-third of its length.

 c Route clock lines or high-speed lines near VCC or VSS.

 c Slow switching edges if possible.

 c Carefully route ADC lines; don't mix the reference pins with the VCC and VSS current-carrying traces.

 c Follow the pc-board-layout rules that the µC data sheet or application note recommends.

  When analyzing EMI problems, remember the basics: the maximum frequency and amplitude of the generated or received signal; the time and place that the EMI occurs (such as, failures occur every time a high-power radar antenna swings into sight or when the circuit is near high-voltage power-distribution lines); the impedance of the suspicious network; and the physical aspects of the traces or wiring.

  Clock and oscillator circuits can be potential EMI problems. Most µC manufacturers usually recommend a particular oscillator pc-board layout. Recent µCs use low-power oscillator designs to minimize radiated emissions. Placing a small metal shield around the entire µC and associated components can also be effective to minimize EMI problems.

  Be sure to adequately decouple the VCC line, because this line conducts high-frequency currents. The placement and values of the µC's VCC decoupling capacitors are somewhat critical. The capacitors should be close to the VCC and VSS pins.

Program bugs can bite

  An external voltage spike that upsets the µC's internal logic can cause an out-of-control program. Undetected errors in the program can also cause a failure. Programs in µCs tend to be hand-packed to minimize ROM size and increase throughput. Unfortunately, errors can creep in. Even programs written in high-level languages can fail if there is a bug in the complier, for instance.

  Most µC-control designs deal with external events and generally use timers as part of some calculation. When a timer generates an interrupt or an external event needs servicing, the normal program flow halts, and the µC processes the interrupt. Because external events can interrupt the user's program at any time and thus can halt the main routine or its subroutines (depending on preset control logic), these routines can get lost during one of these numerous interruptions. This problem can happen if too many subroutines are nested together, allowing the program stack RAM to read/write into normal user RAM.

  If a random glitch does occur during the course of debugging a µC program or testing the µC system, you should not dismiss the problem without recording the conditions that were present. If another random glitch occurs again, you can compare it to the first to determine if the events that caused the glitch are truly random. The µC-development tools can help if they are capable of real-time analysis. Most low-cost µC-development systems are adequate for preliminary program development but lack the sophistication to show exactly what is happening inside the µC's CPU and control registers during reset, interrupts, and timer rollovers.

Watch for a sagging VCC

  Some µCs may not recover well if the VCC sags momentarily. This situation is different from a normal power-down/power-up condition when the VCC drops to zero and then goes back to its normal value. The µC's internal power-on reset usually can deal with a normal voltage swing from zero to full VCC. However, if VCC slowly sags by 50% and then slowly rises to normal, the µC may not recover. External µC- supervisory devices, such as the MC34160, MC34164 (both from Motorola, Tempe, AZ), MAX814 (Maxim Integrated Products, Sunnyvale, CA), and CS-8151 (Cherry Semiconductor, East Greenwich, RI), can monitor the VCC bus and generate a reset when VCC sags.

  A good test to determine whether the µC is vulnerable to brownout is to run the µC at normal voltage, slowly decrease the VCC until µC errors occur, and then raise the VCC slowly back to normal. If the program does not recover, a power-supply-supervisory design is necessary. Supervisory devices are frequently worth the extra cost in µC power-control designs, and you should design these devices in from the beginning. If rigorous testing shows the supervisory circuit is not necessary, simply don't assemble the parts onto the pc board. Some small wasted space is better than having to redesign the board later to add the supervisory circuit. If you use a low-voltage detection and supervisory device, its operation should match the µC's minimum VCC specifications. For example, if the µC is rated to operate at 5V±10%, the supervisory device should force the µC into a reset mode if the VCC sags below 4.5V.

Account for the operating environment

  Temperature, thermal shocks, and moisture all affect the long-term reliability of most active electronic components, including µCs. To a high degree, the µC package and internal die-mounting methods determine how well the µC will hold up long-term in a stressful environment with many power-control systems. A low-cost plastic package may suffice for applications in an office environment, but for automotive under-the-hood or motor controls in a factory setting, superior µC packages are necessary.

  Some design methods can also increase the µC's chances of survival in a hostile environment. Using the lowest clock frequency possible keeps the µC's power dissipation low. Using a heat sink or other cooling device on the µC helps to reduce the µC's die temperature. Potting or encapsulating the µC provides added protection against moisture or external chemical contamination.

  Conducting extreme temperature testing of a µC-based product determines the exact failure points. If the failure points are close—within 20% for example—to the expected worst-case operating temperatures, a redesign is probably necessary. In CMOS semiconductor devices, high temperatures increase leakage currents; cold temperatures decrease switching and internal propagation delay times. Always assume that the product will operate in a worst-case temperature condition and design accordingly. An operating- temperature range of –40 to +858C is a reasonable prospect for many products.

Simulation can catch some problems

  Circuit-simulation programs can help to evaluate the results of excessive voltage spikes or other possible abnormalities if you know where these voltage spikes or events will occur. The simulation program's accuracy is limited by the model's specifications and, in general, you can't totally trust such programs to find all the potential problem areas. Many semiconductor models are not 100% complete or up-to-date and may not have been thoroughly tested in unusual modes of operation.

  Thus, simulation programs are powerful tools for developing circuits and even system-level designs, but they cannot guarantee that the actual product is totally perfect. In some cases, the simulation results that do show problem areas are not immediately obvious. Generally, trouble spots occur on or near signal transitions. You should examine these areas on at least a 1-msec scale with a minimum simulation resolution of 10 nsec.

  Because simulation can't reveal all problems, hardware debugging is inevitable. Unfortunately, digital oscilloscopes can hide or filter out fast, narrow voltage spikes. Always search for voltage spikes with a timebase setting that can reliably show 10- to 50-nsec signals. Using a slow 100-msec timebase often does not show the trouble spots. Using an analog oscilloscope to catch a fast single event mixed in with a lower frequency repetitious signal isn't easy. Digital scopes are very good at capturing fast single-event signals, provided that you properly set the scope. You can miss fast nonrepetitive pulses when the digital scope is set to display a much slower repetitive-type signal. You may have to use different types of oscilloscope to look for different signals. Three types of oscilloscopes good for debugging µC-control designs are a 120-MHz analog storage scope; a general-purpose, 150-MHz digital scope; and a 2-GHz digital scope. You can also use a spectrum analyzer for EMI testing.

Consider the circuit-design solutions

  Fortunately, you can protect your circuit against potential overvoltage, EMI, low-voltage, program, and environmental problems. Design methods that can minimize these problems start with a basic principle: use lowpass filters on every µC line to set the upper frequency limit, depending on the application. Without these filters, the µC lines act as antennas, and the µC's internal logic circuits and program stability suffer.

  Voltage spikes from noninductive sources can couple by parasitic capacitance into the µC lines by various means: poor pc-board layouts, insufficient isolation between µC lines to the power-control stage, or mounting the µC too close to a high-voltage field source. One starting point in protecting the µC-input lines would be to assume that all µC lines can be exposed to voltage spikes similar in magnitude to the worst-case voltage levels in the system. For example, in an automotive application, any line that leads to the outside can be exposed to either vehicle ground or full battery voltage. In a motor-control application, the µC external lines may be subject to full ac-line voltages.

  Magnetic coupling can also be a problem if the µC's lines or the µC itself is located near an intense magnetic-field source, such as a high-power transformer or high current power conductors. You can use metal shields to reduce magnetic coupling.

 
 Figure 3 shows protection methods for µC-input lines. The basic method is to use zener or Schottky diodes for voltage clamping and series resistors for current limiting. You should also include the capacitor to form the RC filter. These methods work well for µC-input lines. Set the RC filter's time constant for the lowest frequency possible.

 Input ports, such as timer inputs, are sometimes set to toggle on switching edges and require a minimum dv/dt to operate correctly. For this type of input, the RC-filter method may not suffice, and a buffer element may be necessary (Figure 4a). The buffer consists of a comparator with high gain, and a trip point is set approximately midway between VCC and VSS. You can modify the comparator design to allow hysteresis, which has the effect of a Schmitt trigger; the circuit converts an input signal, such as a sine wave, with slow rise and fall times plus some noise into a pulse with fast switching edges.

Buffer serial-data lines

  For serial-data lines that must work in an electrically noisy environment, you can also use a twisted-wire-pair transceiver to clean up noisy input signals (Figure 4b). This receiver design has high common-mode noise rejection and a low impedance. The differential line drivers and receivers operate from –-7 to +12V common mode, making this design suitable for many electrically noisy environments, such as a motor-speed and angular-position sensor.

  In Figure 4b, the speed-sensor transmitter circuit uses a slotted optical switch, a high-performance line-driver IC, and a TO-220-sized 5V regulator. The slotted optodetector uses Schmitt-trigger logic, which provides hysteresis for noise immunity and pulse shaping. The twisted-wire pair connects to the receiving circuit that uses a quad differential line-receiver IC. The receivers connect to the motor drive's µC-input port. A simple lowpass RC filter slightly slows the speed sensor's signal, which helps to clean up the signal in the presence of strong RF fields.

  In addition to input lines, you should also pay particular attention to interrupt and reset lines to minimize the chances of extraneous voltage spikes. You can program some µCs to respond to either edge-triggered or level-sensitive external interrupts. Using the level-sensitive option allows more noise immunity at the expense of reduced response time to an external event that forces an interrupt.

  To check some of these input connections, you can program the µC to perform some simple debugging steps. (You can also use a real-time development system if available.) One debugging method to verify that an external event or any particular routine is functioning correctly is to toggle an unused output port when a particular event happens. For example, if an external pulse is supposed to drive an internal µC counter whose value is used to perform some calculation, you want to know that the input pulse increments the counter only once. A noisy input pulse may advance the timer incorrectly. If an output pulse occurs every time the µC increments its counter, an external oscilloscope can verify the operation. You may also discover that both an errant program routine and a poor pulse input are toggling the timer.

General output-line considerations

  As previously discussed, connecting a µC directly to an inductive load usually requires voltage-clamping networks to protect the µC's internal silicon structures. Leaving out some form of voltage-transient protection may result in minor erratic program operation or, in the worst case, µC or other device failures. Even an µC indirectly driving an inductive load is subject to some degree of voltage-transient energy that propagates through the load-control power transistor and back into the µC's output-port line.

  Sometimes, the power device fails first because of its inadequate protection against excessive CEMF or other load faults. If the power-device design does not limit the actuator's CEMF voltage or protect against power-supply voltage spikes, the power device may self-destruct and allow high-energy levels to propagate through the more expensive and difficult-to-replace µC device.

  There are several CEMF-protection methods possible. One solution is to select a semiconductor switching device with sufficient voltage-breakdown rating so that it never enters a secondary-breakdown condition. Unfortunately, the word "never" is subject to Murphy's law, and the transistor probably is subject to some degree of overvoltage stress during its lifetime. If the power MOSFET shorts out with a drain-to-gate short (as happens in many cases), the µC-output line is subjected to the MOSFET's full-drain voltage, which could be several hundred volts.

  Figure 5a illustrates protection for µC-output lines against excessive positive and negative voltage transients. A Schottky barrier diode in series with the output line to the MOSFET provides isolation against positive-going voltages from the MOSFET's drain-to-gate path. This scheme does compromise the circuit's operation by lowering the available gate voltage by one Schottky-diode drop and does not allow the gate to discharge through the µC output.

  A pulldown resistor discharges the gate. This resistor's value can't be too low or the µC output gets loaded down too far to ensure a sufficient gate-bias level. A typical 5V-type output can supply 0.8 mA at a level of 4.2V. The corresponding load value is 5250V, which leaves only about 3.9V gate bias after you subtract the Schottky-diode drop. A resistor in series with the gate limits the maximum current from the MOSFET and establishes a passive element that mostly controls the MOSFET's turn-on switching time. A variation on this method is to add an active turn-off element (Figure 5b).

  One additional note about directly driving a MOSFET: The gate-input capacitance can draw a high peak current from the µC. You need to select the value of the series-resistor value to limit the µC peak current to under 10 mA. The MOSFET's turn-on switching time depends on how fast its gate-input capacitance charges up, which may require a significant current peak for a large MOSFET. The µC output thus requires a buffer stage to drive large MOSFETs.

  Several MOSFET and insulated-gate bipolar-transistor drivers are available for interfacing the µC-output line to drive MOSFETs or similar power devices. There are many other IC devices available for driving lamps, relays, LEDs, or displays that easily interface to the µC.

Reduce EMI in power control

  Figure 6a shows a switching circuit in which a µC drives a simple power-control stage. An avalanche-rated power MOSFET handles the relay's inductive kickback voltage. Unfortunately, this design generates significant EMI that can affect the µC and other nearby sensitive devices (Figure 6b). Two conditions in this switching circuit contribute to EMI: the µC output's high-speed transitions, which drive the power MOSFET, and the inductive kickback voltage, which causes the MOSFET to avalanche (act like a zener diode).

  Slowing the switching edges of the µC output that drives the MOSFET's gate helps minimize EMI because the MOSFET's switching times are no longer in the RF range. A µC-output signal can be less than 100 nsec. If the power MOSFET switches at anywhere near this speed, serious EMI will result.

  One simple method to slow the signal's edges is to add a series resistor and a gate-to-source capacitor. This scheme is similar to the RC filter for the µC's input lines. To minimize the chance of parasitic RF oscillations during switching, the series resistor value should be 1 kV or less, and the gate-to-source capacitor value should be fairly large—0.01 to 1.0 mF—to slow the gate-drive signal-transition times. You should connect the gate-drive source lines close to the source lead and place these lines out of the source lead's load-current path.

  Figure 6c shows the positive results of adding a 0.1-mF gate capacitor. This RC network is a low-cost fix but does introduce a timing delay and extra power dissipation in the MOSFET. The extra power dissipation occurs because of the power MOSFET's slow turn-off and may require increased heat sinking for the MOSFET.

  You should note one other point about using a RC filter in the MOSFET's gate drive. A typical power MOSFET exhibits high transconductance, which means only a small gate-voltage variation is necessary to turn the load on or off. The gate-voltage variation equals the load current divided by the MOSFET's forward transconductance. For example, a MTP3055EL's forward transconductance (gFS) is 5.0 mhos minimum. If the load current is 0.2A, then the DVGS is only 0.04V (DVGS=0.2/5). Therefore, only a small portion of the gate- voltage transition time affects the switching times of the load, and a large gate-to-source capacitor is necessary to slow the gate-voltage transition time. Unfortunately, slowing the power MOSFET may not eliminate EMI, because switching relays or similar type loads with very slow switching is usually not possible.

  The other EMI source is from the inductive-kickback voltage. Adding an external diode, which is sometimes called a "freewheeling" diode, across the relay stops the power MOSFET from avalanching and removes a significant spike at VD. You might think that this step would significantly reduce EMI. However, the diode's switching is so fast that the EMI is still as high as that in Figure 6b. (Using the freewheeling diode in addition to capacitor CG results in EMI levels between those in Figures 6b and 6c.) The freewheeling diode also slows the solenoid's or relay's mechanical turn-off performance.

  Replacing the freewheeling diode with an RC snubber reduces EMI and allows a good turn-off mechanical response. The snubber capacitor's value should be large enough to prevent the power MOSFET from avalanching. The specific application determines the exact value of the RC snubber. However, a 1-mF metal-film capacitor and 10V resistor are good starting values.

  Thus, by adding an RC filter to the gate drive to slow the power transistor's switching and an RC snubber across the load to contain the inductive kickback voltage, the µC can drive a power MOSFET with minimal chance for EMI. Figure 6d shows the low EMI that results from using both techniques.

Protect the ADC inputs

  Reducing errors in µC ADC ports is especially important for applications that constantly monitor the ADC inputs for slight variations. You can trace many ADC errors back to several causes: poor pc-board layout, insufficient filter capacitors, improper placement of the filter capacitors, and a high ADC source impedance.

Poor pc-board layout: The most single important design goal is to not mix the ADC grounds and VCC reference into traces that conduct high pulse currents. Figure 7 illustrates both a poor and good layout for ADC µC signals. Note how the improved version splits the power traces back to their source points.

Insufficient filter capacitors: Forgetting that all lines, traces, wires, or internal device leads are always inductive leads to noisy VCC and commons if you don't use filter capacitors of sufficient size and type. In some cases, a separate regulator or power-supply diode isolator is necessary to supply the VREF+ pin of the ADC.

Improper placement of filter capacitors: You need to place bypass or decoupling capacitors as close as possible to the source of the high-frequency noise. For a µC design, this means bypass capacitors right at the µC's VCC and VSS pins, in addition to the voltage-regulator output and input pins.

High ADC source impedance: The µC ADC stage does exhibit a slight leakage current, usually less than 10 mA. Thus, to maintain a 1-bit accuracy (0.01953V) for an 8-bit, 5V channel, the total input resistance must not exceed 1.9 kV (RINPUT=0.0195V/10 mA). Check the µC's data sheet for the exact ADC leakage current. Adding a simple RC filter to the input is acceptable if the filter's time constant is well below the sample rate required by the application. Remember that you need to keep the RC filter's resistor value plus the voltage source's impedance low to minimize errors.

Isolate µC lines

  Connecting an µC's output or input lines to a high-voltage power stage requires the use of excellent isolation devices. Optoisolators, such as those in Figure 8, provide a high degree of isolation from high-voltage waveforms in large motor drives or power-line-conditioning equipment. The important specification for any isolation device, besides its maximum isolation voltage, is the common-mode voltage rejection. If there is a large amount of internal capacitance in the optoisolator input-to-output path, the chances are high that enough energy will couple through the optoisolator to cause trouble with a µC line.

  To save costs, some designs allow the µC to float on a high-voltage bus. This scheme saves the cost of isolating the µC from the high-voltage bus but requires some form of isolation to the user-operated inputs. The additional difficulty with this method is in field servicing. The technician may accidentally ground out the µC's common with catastrophic results. As a matter of principle, if the µC is accessible for debugging, connecting test probes to it should not represent a lethal hazard for the service personnel.

Stabilize the power supply

  The µC's stability is only as good as its power supply. Power-control circuits can have intermittent power connections or users that play with the power switch. Another common problem is reversed power connections caused by battery reversal or improper hookups. Reversing the VCC and VSS on a µC is usually catastrophic to the µC die. Figure 9 shows some simple methods to protect against fluctuating power and reversed power voltages. Adding a zener diode rated just below the maximum µC operating voltage across the µC's VCC and VSS pins is good insurance against a shorted regulator or other mishap that would allow excessive µC supply voltage.

  A good principle to follow is to physically set the supply's maximum current level. You can use small, surface-mount fuses for this task. In some cases, two different-sized fuses are necessary: one large fuse for the power stage and a small fuse for the control logic.

  Adding a series resistor to the power-supply-regulator input also limits the maximum peak-current levels. For example, a µC design that requires only 0.01A from a 12V supply could use a 5V regulator with a 100V, 2W series resistor in its 12V input side. The 100V resistor would normally drop 1V but would limit the maximum current to 0.12A in a short-circuit condition. More important, by also adding a zener-diode transient suppressor to the regulator's input, the resistor limits the zener's maximum peak current when the 12V supply is subjected to serious voltage spikes.

Author's biography


Richard J Valentine is a member of the technical staff of Motorola Inc's Semiconductor Products Sector (Tempe, AZ). He helps develop semiconductor products for industrial and automotive electronic systems. He holds two patents, has written more than 45 technical articles, and is developing a motor-control handbook.

| EDN Access | feedback | subscribe to EDN! |
| Table of Contents |


Copyright © 1996 EDN Magazine. EDN is a registered trademark of Reed Properties Inc, used under license.