APPLICATION NOTE 4850

Microcontroller Controls Current-Loop AFE Protection

By: Anatoly Andrusevich

Abstract: The fragile current-shunt resistor in the analog front end of an isolated 0–20mA precision current loop can be protected by a fast fuse or an automatic current-limiting switch. The circuit shown, however, is faster than a fuse, requires no replacement, and (unlike the switch) provides microprocessor control with an option to log the fault events. The circuit includes a comparator (MAX9910), a microprocessor supervisor with watchdog timer (MAX6706), a D-type flip-flop, an NOR gate, an OR gate, and a solid-state relay.

A similar version of this article appeared in the August 26, 2010 issue of EDN magazine.

The 0–20mA current loop remains a reliable means of communication in industrial applications. For systems that include a high-precision analog front end (AFE), the current-shunt resistor must also be a stable and high-precision device. Precision shunts, however, are fragile, and they can be damaged by an accidental direct connection to the current-loop power supply. You must then replace the shunt and recalibrate the system. To avoid that expense, consider the microcontroller-controlled protection circuit of Figure 1.

Figure 1. This circuit protects the isolated analog front end (AFE) of a current loop. For simplicity, we don't show the power and ground connections (+5Viso and GNDiso) for IC2, IC4, IC5, and IC6.
Figure 1. This circuit protects the isolated analog front end (AFE) of a current loop. For simplicity, we don't show the power and ground connections (+5Viso and GNDiso) for IC2, IC4, IC5, and IC6.

A shunt can be protected with a fast fuse, or by limiting the current, i.e., by turning off the loop with an automatic switch, then turning it back on after a specified period. The Figure 1 approach offers several advantages over these methods.

It's much faster than fuse protection. The slowest device in Figure 1 (IC1) requires less than 500µs to switch off. It offers a higher-precision switching threshold than does the fuse, and of course there's no fuse to replace. Unlike "switch off with auto-retry" protection, it provides microcontroller control of the protection circuit, plus an option to log the event, thereby providing a record that the protection circuit was invoked.

Moreover, the Figure 1 protection has virtually no effect on the AFE: input current is less than 30pA, thanks to the IC2 buffer, and the on-resistance of IC1 is less than 2Ω. No additional isolated data channels or microcontroller I/O ports are needed. To prevent damage during system installation or repair, the loop is turned off after power-up and also when no power is applied. The protection algorithm is implemented with a power-fail comparator and watchdog circuit, available as separate outputs on IC3 (MAX6706), together with a D-type flip-flop (IC6). At power-up the flip-flop is in the RESET state and the current loop is open, due to a high-level RESET signal from IC3 driving the NOR gate (IC4). After the first low-to-high transition on the SCK line, a rising edge from IC3's WDO output sets the flip-flop and pulls current through the solid-state relay (IC1), thus connecting the input to the loop.

In the event of a loop-current overload (i.e., greater than about 27mA), a high level from the power-fail comparator (PFO on IC3) resets the flip-flop and switches off IC1. Thanks to the IC5 gate, the microcontroller sees only "ones" at the MISO output, which means overcurrent. To switch the loop on again, the microcontroller must stop the SCK line for at least 2.4 seconds. Then, the next low-to-high transition on SCK reconnects the current loop.