Active ESD Protection for Microcontrollers (EE Tip #129)

Microcontrollers need to be protected from of electrostatic discharge (ESD). You can use the circuit described in this post when you have an application requires a greater degree of ESD protection than what you get from an IC on its I/O pins. Although there are many ESD clamping devices out there, they don’t typically enable you to precisely limit voltage overshoots and undershoots.

Normally, when dealing with a microcontroller or other digital circuit the connections on the device are protected against electrostatic dis­charge. Nevertheless engineers are 4ever taking special precautions when handling such devices to avoid the risks of ESD: the lab will have an anti-static covering on the floor, and nylon clothes and shoes with soles made of insulating material are avoided. And, in case that is not enough, it is normal to wear an anti-static wrist band when moving devices from their anti-static bags to the anti-static bench surface. But what exactly do we mean when we talk about ESD?

HUMAN BODY MODEL

The first model for static discharge, mentioned as early as the 19thcentury, was the “human body model” (HBM). This takes as its starting point a voltage of up to 40 kV, a body capaci­tance of a few hundred picofarads, and a (skin) resistance of 1.5 kΩ. We find that even with a static voltage of only 10 kV, as might easily be acquired by walking across an artificial fiber car­pet in shoes with synthetic soles, it is possible to discharge through a fingertip at peak cur­rents of up to 20 A! The discharge also hap­pens in a very short period, perhaps measured in nanoseconds.

The HBM was adopted in the electronics industry in the 1970s with the introduction of sensitive JFET devices in space applications. The compo­nents were tested using a simple RC circuit like the one shown in Figure 1. The discharge cur­rent depends only on the resistance in the cir­cuit, and the damped discharge curve is largely free of oscillation and is accurately reproducible.

Figure 1—Standard test circuit and current waveform for the human body model

Figure 1—Standard test circuit and current waveform for the human body model

There are also other models that deal with dis­charge through a sensitive component, for exam­ple when a low-resistance electrical connection is made between two devices (the “machine model,” or MM), or when a static charge present on the device itself is discharged (the “charged device model,” or CDM)…

ESD CLAMP CIRCUITS

Figure 2 shows the typical protection circuitry provided on a microcontroller’s I/O port. This example is from an Atmel ATmega. Other microcontrol­lers and logic devices use similar arrangements. Two bipolar protection diodes conduct discharge currents that could cause undershoots or overshoots to one of the supply rails, either VCC or ground. However, the diodes take about 6 ns before they conduct fully.

Figure 2—Typical ESD protection circuit, as found in an Atmel microcontroller

Figure 2—Typical ESD protection circuit, as found in an Atmel microcontroller

Since ESD transients can sometimes be considerably shorter than this, it is possible that the CMOS circuit structures will be damaged long before the diodes spring into action. The parasitic capacitance of the pin is around 6 pF, and this is quickly charged up by the energy in the electrostatic discharge. Unfortunately, we cannot increase this capacitance with­out increasing the impedance of the pin, which is not desirable.

Standard ESD protection circuits like this one are designed to meet the particular requirements set by the ESD Association. However, it is becoming apparent that the traditional models are not appropriate for modern applications. Recent efforts have been directed toward developing a new “system level model” (SLM), which takes into account the different aspects of the older models. This model employs two stored charges that are discharged in different ways, creating a high-amplitude current pulse that decays very quickly plus a low-amplitude pulse that dies away more slowly. The energy transferred in a dis­charge under the SLM can be very much higher than that in the traditional models (Figure 3).

Figure 3—Current waveform under the system-level model

Figure 3—Current waveform under the system-level model

It is readily apparent that the conventional I/O pin circuitry on the IC is not sufficient to provide ESD protection under this model. Also, the con­tinuing industry pressure to make smaller and more complex structures makes it very difficult for design engineers even to maintain current levels of ESD protection, let alone improve on them. In other words: the silicon area needed to provide ESD protection in accordance with the SLM is simply not available! For this reason, external ESD clamp circuits are becoming more rele­vant. If a component provides only a low level of ESD protection (or even none at all) it is possible to add such a circuit at the points most at risk. The clamp circuits usually use so-called transient suppression diodes (transils or tranzorbs) which, like Zener diodes, start to conduct at a specified threshold voltage. However, unlike Zener diodes, they react quickly and can withstand much higher current transients. There are many variations on the circuit design, but none has exceptional performance and none offers precise clamping of voltage undershoots and overshoots.

STATE-OF-THE-ART ESD CLAMPING

If we are in the lucky position of not having to worry about the last cent of materials cost or the last square millimeter of board area, we can easily cre­ate a state-of-the-art active ESD protection circuit from discrete components (Figure 4).

Figure 4—This protection circuit clamps voltage transients outside defined upper and lower thresholds

Figure 4—This protection circuit clamps voltage transients outside defined upper and lower thresholds

The transistor circuit forms a kind of regulated voltage divider. The current through the two resistors R2 and R3 is such that the voltages across them are just enough that transistors T1 and T4 start to conduct and T2 and T3 are just short of saturation. So we have one base-emitter voltage (about 600 mV) across each of these two resistors, which means in turn that the emitters of T2 and T3 are 600 mV below VCC and above ground respectively. The circuit as shown is suitable for a 5 V supply; R1 can be changed to suit supplies of 3.3 V or 2.7 V if needed.

What is the point of this complexity? If the I/O pin is high (at +5 V) the upper 1N4148 switching diode will conduct fully as its cathode is at only 4.4 V. If a positive voltage transient should occur it will be conducted by the 1N4148, without switching delay, to the positive rail by 1N5817 Schottky diode D2, which acts quickly and has a low forward voltage. The same thing happens with polarities reversed when a negative voltage transient (below ground) occurs. Hence the digital inputs and outputs are protected against voltage excursions outside the range of the supply rails. In addition, voltage peaks are limited by the use of suppression inductors. The Murata BLM series inductor presents a relatively high impedance to signals in the 100 MHz range and so can significantly reduce the level of transients.

Although the approach we have described works well with digital levels, it is not suitable for use with signals destined for the analog-to-digital converter (ADC) on a microcontroller. In this case a reverse-biased diode between the signal and each supply rail is required to clamp overshoots and undershoots, with a pair of 10 kΩ series resistors to limit the transient current.

The series-connected capacitors C2 and C3 present a low-impedance path for transients between VCC and ground, and hence spikes on the supply rails will also be conducted away.—P. Kruger, “Active ESD Protection,” Elektor January/February 2014

Editor’s note: This article originally appeared in Elektor January/February 2014. It was shortened and updated for publication on CircuitCellar.com, which is an Elektor International Media Publication.

 

RESOURCES

www.teseq.de/de/de/service_support/technical_information/01_Transient_ immunity_testing_e.pdf

www.ti.com/lit/sg/sszb130b/sszb130b.pdf

www.semtech.com/circuit-protection/esd-protection/

www.murata.com/products/emc/basic/feature/bl_intro.html

Op-Amp Versus Comparator (EE Tip #128)

Practically every lecture course or textbook on electronics describes how to use an operational amplifier as a comparator. Here we look at the possibility in more detail, and see how it can often be a very poor idea.

The idea behind the comparator configuration is simple. An op-amp has a very high open-loop DC gain which means that even a tiny differential input voltage will drive the output to one extreme or the other. If the voltage at the non-inverting (“+”) input is greater than that at the inverting (“–“) input the output goes high; otherwise the output goes low. In other words the two voltages are compared and the output is a binary indication of which of the two is the greater.

Figure 1: SPICE simulation results: an LT1028 op-amp pressed into service as a comparator versus a real comparator type LT1720.

Figure 1: SPICE simulation results: an LT1028 op-amp pressed into service as a comparator versus a real comparator type LT1720.

So the op-amp looks like the perfect device to use as a comparator. But why then do there exist special-purpose comparator devices? Looked at from the outside, op-amps and comparators appear indistinguishable. Besides power connections, they both have “+” and “–” inputs and a single output. Taking a look at the internal circuit diagram, again the two devices appear broadly very similar (although a comparator device with an open-collector or open-drain output does look more obviously different from an op-amp). The big difference, which is not apparent without looking at the circuit more closely, is that the output stages of operational amplifiers are designed for linear operation, with the general aim of amplifying the input signal with as little distortion as possible (assuming that some negative feedback is provided), but in the case of a comparator the output circuit is designed to operate in saturation, that is, to switch between the upper and lower output voltage limits without the provision of external feedback. Comparators often also offer a ground connection in addition to the usual power connections, and provide digital logic levels at their outputs while accepting symmetrical analogue input signals.

What do these differences mean in practice? Comparators can react very quickly to changes in their input voltages with short propagation delays and output rise- and fall-times all specified by the manufacturer.

In contrast, because op-amps are not expected to be used in this mode, manufacturers tend not to give explicit specifications for propagation delay and rise- and fall-times (although they do normally specify slew rate), and these characteristics can be considerably poorer for op-amps than for comparators. To take an extreme example, a low-power op-amp might have a propagation delay measured in milliseconds, whereas a comparator might react in nanoseconds: a million times faster.

There is a further problem with op-amps. Many devices exhibit significantly increased power consumption when the output is in saturation, the resulting power dissipation on occasion being enough to destroy the device. Also, many op-amps (those not advertised as having “rail-to-rail outputs”) are not capable of driving their outputs close to the supply rails, for example having a maximum output voltage of 3 V with a 5-V supply. There can also be restrictions on the inputs. Some op-amps are equipped with antiparallel diodes across their input terminals, which prevent differential input voltages of more than about 0.6 V, whereas comparators’ inputs are often allowed to vary over the whole supply range.

Of course, there are many noncritical applications where an op-amp will work perfectly acceptably as a comparator, but it is not a practice to be recommended. The skeptic should lash up a quick test with a comparator and an op-amp side-by-side, each fed with a squarewave signal with rapid edges. Some of the potential pitfalls are shown up more easily in simulation, such as the possibility of an op-amp being so slow that it entirely misses a narrow pulse. It is hard to guarantee circuit performance, current consumption, and even the survival of the device.

The illustrations show a SPICE simulation of a relatively nimble op-amp (an LT1028 with a minimum slew rate of 11 V/µs) and a type LT1720 comparator. It is clear that the comparator responds sooner and with a much shorter rise-time. Its output swings all the way to +5 V rather than the 3 V managed by the op-amp. The situation is similar when the output swings low: the op-amp is much slower and only reaches an output voltage of –3 V rather than –5 V. The original squarewave is hardly recognizable at the op-amp’s output. Although the LT1028 cannot achieve its maximum specified gain with a –5-V supply, it is still a factor of at least 20 faster than an LM324 (with a slew rate of 0.5 V/µs); what the latter would make of our squarewave would not be a pretty sight. The op-amp fails to cope at all with shorter pulses, which are then effectively “swallowed,” while the comparator continues to handle them without difficulty.

Worthwhile further reading on this subject is Texas Instruments application note SLOA067 by Bruce Carter entitled “Op Amps and Comparators—Don’t Confuse Them!.”— Michael Holzl, Elektor January 2011

CircuitCellar.com is an Elektor International Media publication.

Build an Adequate Test Bench (EE Tip #127)

It’s in our makeup as engineers that we want to test our newly received boards as soon as possible. We just can’t wait to connect them to a power supply and then use our test bench equipment (e.g., generators, oscilloscopes, switches or LEDs, and so on) for simulation.

Circuit Cellar columnist Robert Lacoste's workspace in Chaville, France.

Circuit Cellar columnist Robert Lacoste’s clean, orderly workspace in Chaville, France.

But due to our haste, the result is usually a PCB under test lying on a crowded workbench in the middle of a mesh of test cables, alligator clamps, prototyping boards, and other probes. Experience shows that the probability of a short circuit or mismatched connection is high during this phase of engineering excitement.

Test Board

Rather than requiring a mesh of test wires, it is often wise to develop a small test PCB that will drastically simplify the test phase. Here the ancillary board provided a clean way to connect a Microchip Technology ICD3 debugger, a JTAG emulator, a debug analyzer, and a power supply input.

Take your time: prepare a real test bench to which you can connect your board. It could be as simple as a clean desk with properly labeled wires, but you might also need to anticipate the design of a test PCB in order to simplify the cabling.—Robert Lacoste, “Mixed-Signal Designs,” CC25:25th Anniversary Issue, 2013. 

 

A Wire Is an Inductor (EE Tip #126)

I’m confident you know that you should keep wires and PCB tracks as short as possible. But I’m also sure that you will underestimate this problem fairly frequently.

Remember that 1 cm of a 0.25-mm-wide PCB track is roughly equivalent to an inductance of 10 nH. If this 10 nH is paired with, say, a 10-pF capacitor, that gives a resonant frequency as low as 500 MHz, which is easily below the third or fifth harmonics of the clock frequencies commonly seen on modern high-speed digital boards. Similarly, a 1-cm-long track will jeopardize the performances of any RF system such as a 2.4-GHz transceiver. There is only one solution: keep tracks and wires as short as possible. If you can’t, then use impedance-matched tracks.

Remember this rule especially for the ground connections: any grounded pad of any part working in high frequencies should be directly connected by avia to the underlying ground plane. And this via must be as close as possible to the pad, not some millimeters away.

Just yesterday I did a design review of a customer’s RF PCB. A small 0402 inductance was grounded through a via that was 3 mm away. It was a bad idea because the inductance was as low as 1 nH. Those 3 mm changed its value completely.—Robert Lacoste, “Mixed-Signal Designs,” CC25:25th Anniversary Issue, 2013. 

Wireless Product Regulations (EE Tip #123)

Are you working on a wireless design that you’d like to bring to market? If so, be sure to anticipate regulatory constraints right from the start. Planning upfront will save you a lot of time, money, and hassle.

Electrical engineer Robert Lacoste notes:

Unless you’re working on a prototype that won’t ever leave your lab, there is a high probability that you will need to comply with some regulations. FCC and CE are the most common, but you’ll also find local regulations as well as product-class requirements for a broad range of products, from toys to safety devices to motor-based machines. (Refer to my article “CE Marking in a Nutshell,” Circuit Cellar 257, for more information.CE Mark

Let’s say you design a wireless gizmo for the U.S. market and later find that your customers want to use it in Europe. This means you lose years of work, as well as profits, because you overlooked your customers’ needs and the regulations in place in different locales.

When designing a wireless gizmo that will be used outside the U.S., having adequate information from the start will help you make good decisions. An example would be selecting a worldwide-enabled band like the ubiquitous 2.4 GHz. Similarly, don’t forget that EMC/ESD regulations require that nearly all inputs and outputs should be protected against surge transients. If you forget this, your beautiful, expensive prototype may not survive its first day at the test lab.

Lacoste’s full article appeared in Circuit Cellar’s anniversary issue, CC25.