Tutorial: Improving the transient immunity of your microcontroller-based embedded design - Part 4 - Embedded.com

Tutorial: Improving the transient immunity of your microcontroller-based embedded design – Part 4

Transient immunity problems in many advanced MCU-based electronicsdesigns often come to resemble the complex and completely unravelableGordian's Knot that faced Greece's Alexander the Great on his way toconquer Persia.

He dealt with his complexity issues by slicing through the knot withhis sword. In transient immunity design, the PCB power supply is thesword that can cut through many of the complexity issues. Solve thatknotty problem and many of a system's transient immunity problems canbe reduced significantly.

The transient protection in the power supply can be standalone or bedesigned to work in conjunction with protection at the power entrypoint. In either case, protection is required to prevent damage to thepower supply and logic components as well as to prevent any performancedegradation of the application.

Power supply designs typically fall into one of two categories:linear and switching. A basic representation of each type of powersupply is shown in Figure 1 below .Each design style has its own considerations for ensuring transientimmunity in the application.

Figure 1. Power supply types

Advances in power supply design technology have allowed thedevelopment of new low-cost versions of traditional power supplydesigns. While low-cost designs are very attractive, it must be notedthat the cost reductions are typically achieved at the expense of EMC.Therefore, the successful implementation of a low-cost design willrequire greater planning and expertise to meet the required immunityperformance levels.

Traditional Linear Power Supply
The linear AC-to-DC power supply can be approximated as a seriesresistance between the input and the output. Feedback control canoptionally be used to provide a specified output voltage by varying thevalue of the series resistance. Traditional linear power supplies havemany positive performance characteristics, such as excellent EMIperformance, but are limited in applications by efficiency, heatdissipation, and size. A block diagram of a generic linear power supplyis shown in Figure 2 below .

Figure 2. Generic linear power supply

When employed in a design, regulated supply and ground should not beDC connected to the AC mains unless required for functionality. Inaddition, there are four areas of a traditional linear power supplythat require consideration and, possibly, protection. These areas aredescribed as follows:

1. Thetransformer or the rectifier diodes, if a transformer is not used, needprotection from excessive primary common mode and differential modevoltages on the AC mains. Protection components include fuses orfusible resistors (RF) to limit current, varistors (MOV) to clamptransient voltages, line-to-line “X” capacitors (CX ) toshunt differential mode noise, line-to-ground “Y” capacitors (CY )to shunt common mode noise, and chokes to impede both common mode anddifferential mode noise.

These protection components also work together to form a series oflow-pass filters. An example of an AC mains EMI filter with bothdifferential and common mode filter elements is shown in Figure 3 and Figure 4,   below, for both 2-wire and 3-wirepower, respectively.

Figure 3. AC mains EMI filter for 2-wire power

Figure 4. AC mains EMI filter for 3-wire power

2. If atransformer (T) is used between the AC mains and the rectifier diodes(BR), the rectifier diodes need protection from excessive current andexcessive reverse voltage. Differential mode protection is achieved byusing a high-voltage, line-to-line aluminum electrolytic capacitor (CBulk ).The addition of line-to-line “X” capacitors (CX ) from thesecondary coil back to the primary reduces common mode noise.

In addition, for three-wire power systems, line-to-ground aluminumelectrolytic capacitors (CBulk_CM ) provide additional commonmode protection. Note that while the rectifiers are shown in afull-wave bridge configuration, a half-wave configuration is alsopossible. An example of a step-down and rectification circuit is shownin Figure 5 and Figure 6 below, for both 2-wire and 3-wirepower, respectively.

Figure 5. Transformer, rectifier and filter capacitors for 2-wire power

Figure 6. Transformer, rectifier and filter capacitors for 3-wire power

3 . The voltageregulator input (if used) and the filter capacitors need protectionfrom excessive voltage. Protection can be achieved by specifying ahigher working voltage for the filter capacitor and by using atransient voltage suppressor such as a zener diode (DZener )as shown in Figure 7, below .

Figure 7. Regulator and filter capacitors

4. The voltageregulator output (if used) and loads need protection from excessivevoltage and require bypassing to reduce noise as shown in Figure 7.Over voltage protection should be achieved by connecting a rectifierdiode (DRect ) from the voltage regulator output to the inputto discharge the regulated power rail during power-down. In addition,decoupling capacitors (CBulk , CBypass ) can beused to control noise on the secondary DC output. Transient voltagesuppressors (DZener ) can be added in parallel with thebypass capacitors if additional protection is needed.

Low-Cost Linear Power Supply
A low-cost version of the linear power supply is called a passive(capacitive/resistive) dropper power supply. This power supply type issuitable for current requirements in up to about 120mA. Diagramsshowing two possible embodiments of a passive dropper power supply areshown in Figure 8a and Figure 8b, below .

As for a traditional linear AC-to-DC power supply, this supply typecan be approximated as a series resistance between the input and theoutput with a zener diode (DZener ) to establish the outputvoltage. This low-cost linear power supply design eliminates theconversion efficiency, heat dissipation, and parts cost of thetraditional design style; however, at the cost of increasing thecomplexity of achieving EMC.

Figure 8a. Passive dropper power supply (buck regulator)

Figure 8b. Passive dropper power supply (inverting regulator)

EMC complexity is increased in these designs because one of the ACmains lines actually becomes one terminal of the regulated DC powersupply. This is to say that either the VDD or VSS pin(s) of amicrocontroller are directly connected to the AC mains. As a result,the microcontroller will be subjected to all disturbances on the ACmains. This situation can easily cause microcontroller susceptibilityproblems unless the proper measures are taken.

It is highly recommended that point of entry power filtering, asshown for a traditional linear power supply in Figure 3 and Figure 4 , be used. If the powerentry point is not filtered, using a passive dropper power supply willrequire the designer to expend a maximum of time and effortimplementing the necessary immunity controls. For the protection of anyattached DC-DC regulators, utilize the protection recommended fortraditional linear power supplies shown in Figure 7.

An additional problem with this power supply type is thatapplication self-compatibility becomes a real issue ” particularly inapplications with relays that switch AC mains power to inductive loadssuch as motors and compressors. Unless the transients generated bythese switched loads are properly suppressed, the microcontroller willalso be subjected to them as well.

Traditional Switching Power Supply
The switching AC-to-DC power supply varies the duty cycle of a seriesswitch according to feedback from the output. Traditional switchingpower supplies deliver higher efficiency at the expense of higher noiseon the DC output. A block diagram of a generic linear power supply isshown in Figure 9, below . For switching powersupplies, it is important to optically isolate the feedback loop toensure the regulated supply and ground are isolated from the mains tomaximize immunity performance.

Figure 9. Generic switching power supply

When employed in a design, regulated supply and ground should notbe DC connected to the AC mains unless required for functionality. Inaddition, there are four areas of a traditional switching power supplythat require consideration and, possibly, protection. These areas aredescribed as follows:

1. The rectifierdiodes need protection from excessive primary common mode anddifferential mode voltages on the AC mains. Protection components andEMI filter designs are the same as for linear power supplies as shownin Figure 3 and Figure 4 .

2. While notrequired specifically for protection, the rectified voltage must befiltered and smoothed. Differential mode filtering is achieved by usinga high-voltage, line-to-line aluminum electrolytic capacitor (CBulk )as shown in Figure 10 , below .

In addition, for three-wire power systems, line-to-ground aluminumelectrolytic capacitors (CBulk_CM ) provide additional commonmode filtering as shown in Figure 11,below .

Figure 10. Rectifier and filter capacitors for 2-wire power

Figure 11. Rectifier and filter capacitors for 3-wire power

3. The switch,controller, and feedback circuitry will need protection as specified orrecommended by the manufacturer of the switching controller. Careshould be taken to ensure that the regulated supply and ground are notDC connected to the AC mains unless required for functionality. Useoptical isolation in the feedback circuit whenever possible, or asrecommended by manufacturer of the switching controller.

4. The voltageregulator input (if used) and the filter capacitors need protectionfrom excessive voltage. Protection can be achieved by specifying ahigher working voltage for the filter capacitor and by using atransient voltage suppressor such as a zener diode (DZener )as shown in Figure 12 , below .

Figure 12. Regulator and output protection

5. The voltageregulator output (if used) and loads need protection from excessivevoltage and require bypassing to reduce noise as shown in Figure 12 . Over voltage protectionshould be achieved by connecting a rectifier diode (DRect )from the voltage regulator output to the input to discharge theregulated power rail during power-down. In addition, decouplingcapacitors (CBulk , CBypass ) can be used controlnoise on the secondary DC output. Transient voltage suppressors (DZener )can be added in parallel with the bypass capacitors if additionalprotection is needed.

Low-Cost Switching Power Supply
A low-cost version of the traditional switching power supply called anon-isolated switching power supply, designed as an alternative to thepassive (capacitive/resistive) dropper power supply, is also available.

This power supply is suitable for current requirements up to about400mA but may increase as the switching technology improves. Diagramsshowing two possible embodiments of a non-isolated switching powersupply are shown in Figure 13 and Figure 14, below . This low-cost switchingpower supply design reduces the parts cost and layout complexity of thetraditional design style; once again, at the cost of increasing thecomplexity of achieving EMC.

Figure 13. Non-isolated switching power supply (buck regulator)

Figure 14. Non-isolated switching power supply (inverting regulator)

As for the passive dropper power supply, EMC complexity is increasedin these designs because one of the AC mains actually becomes oneterminal of the regulated DC power supply.

This is to say that either the VDD or VSS pin(s) of amicrocontroller are directly connected to the AC mains. As a result,the microcontroller will be subjected to all disturbances on the ACmains. This situation can easily cause microcontroller susceptibilityproblems unless the proper measures are taken.

It is highly recommended that power point of entry filtering, asshown for a traditional linear power supply in Figure 3 and Figure 4 , be used. If the powerentry point is not filtered, using a non-isolated switching powersupply will either require strict compliance with the schematic andlayout recommendations of the switching controller manufacturer orrequire the designer to expend significant time and effort implementingthe necessary immunity controls. For the protection of any attachedDC-DC regulators, utilize the protection recommended for traditionallinear power supplies shown in Figure7.

An additional problem with this power supply type is thatapplication self-compatibility becomes a real issue ” particularly inapplications with relays that switch AC mains power to inductive loadssuch as motors and compressors. Unless the transients generated bythese switched loads are properly suppressed, the microcontroller willalso be subjected to them as well.

PCB Floorplan
Before a PCB layout begins, care must be taken to properly placecomponents. Low-level analog, high-speed digital, and noisy circuits(relays, high-current switchers, etc.) must be separated from eachother to limit coupling between the PCB subsystems to a minimum. Beginthe PCB design by partitioning the available board space into separatefunctional areas as shown in Figure15, below .

Figure 15. PCB Segmentation

Each regulated DC power domain is isolated by its own decouplingfilter (DF). The decoupling filter is typically a low-pass filter withboth series and parallel elements as shown in Figure 16, below. The serieselements, or blocks, are chosen based on the functional and EMCrequirements and are typically resistors, inductors, or ferrite beads.The parallel components, or shunts, are capacitors.

Figure 16. Generic Decoupling Filter

Each digital logic component, such as the MCU, or other sensitivecircuit block should be provided with a high-frequency bypass capacitor(BP) as shown in Figure 15.

The bypass capacitor, in addition to providing a local source ofcharge to reduce emissions, serves to limit transients at the protecteddevice's power pins. In addition, low-pass filters (LPF) should beprovided for each input and output to prevent noise that is coupled toconnected cables from disturbing circuitry on the PCB.

When placing components, consider the potential routing of tracesbetween the different functional areas, particularly clocks and otherhigh-speed signals. The layout should be iteratively reviewed andcorrected until all EMI risks have been addressed.

PCB Power Distribution
After the initial PCB segmentation and component placement is complete,the power distribution system should be defined. The design of thepower distribution system is the most important part of ensuring PCBEMC since it is the basis for all EMC controls. The ground and supplynets should be implemented as planes or short, wide traces. The ground(VSS) system should be defined first and the supply (VDD) systemsecond.

To design a successful grounding scheme, the designer must be awareof the paths that ground currents will take to identify possiblecommon-mode impedance problems, reduce loop areas, and prevent noisyreturn currents from interfering with low-level circuits.

A good methodology is to start with a ground plane and selectivelyremove copper for power and signals. Avoid the use of vias and wirejumpers to connect different areas of ground. Vias and wire jumpers addinductance that can create common impedance noise between circuits thatcould cause functional degradation.

Ensure that all MCU pins tied to VSS are connected using a plane orshort, wide trace to provide a common reference with a minimal voltagedifferential between any two connections. Such voltage differentialsgenerate noise currents in the ground system of the PCB and the MCU.

After the ground system has been routed on the PCB, the supplysystem should be designed. Supply lines should run parallel to theground lines on the same or adjacent layers if physically possible. Ifnot, do not compromise the ground layout for the sake of the supplylayout. Supply system noise can be decoupled with filters, but theground system cannot. If discrete inductance is required, wire jumperscan potentially be used.

Some additional design guidelines include:

* Isolatedigital, analog, high current, and PCB I/O grounds from each other .
* Connect differentgrounds at single point, typically at the power supply.
* Consider addingimpedance in the ground path only when necessary .

When routing the ground and supply distribution systems, it isimportant to consider the location and connection of any filtering ordecoupling components. Creating a good power distribution system is aniterative process that will require several passes.

Figure 17. Routing Regulated Power off the PCB

In the case where regulated power (VDD and/or VSS) is routed off thePCB using a connector, it should be isolated from filtered DC power asshown in Figure 17, above. Capacitors should be connected between the connector supply pins andunfiltered DC power. The typical value of the capacitors (C) is 1-100nFwhile the typical value of inductance (L) is 100 microH-100 milliH.

Next in Part 5:  Defensivesoftware design
To read Part 1, go to: Definingthe Problem
To read Part 2, go to: HardwareTechniques – The basic circuit building blocks
To read Part 3, go to: System power and  s

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.