Introduction In a generic electronic system there are some inputs that are controlled by the end user. These inputs are read by electronics and acted upon by using outputs. The inputs can come from a myriad of sources: buttons, switches, sensors, relays, and communication devices, to name a few. In certain environments and situations, these input signals can pose a threat to the electronics reading them – especially if those electronics are designed without thought of protection. One such environment is the world of industrial electronics. An important aspect of designs for this environment is interfacing sensitive electronics with inputs coming from the harsh conditions of a factory floor. Usually, inputs are read by some sort of intelligent processor such as a microcontroller, FPGA, or state machine. In cases like these, it is imperative to protect the processor from the inputs, while still providing a usable signal for the processor to read. Problem definition In a typical factory system there may be buttons on a control panel located remotely from the central processing unit. The buttons are connected to central processing via long wires. Unfortunately this can lead to inadvertent electronic failure. Long wires can act as an inductor and when a button is opened or closed, large voltage spikes can show up on the electronic paths. Figure 1 shows a simplified diagram of this situation. Figure 1: Simplified electronic system. In order to discuss approaches to overcoming this problem, a more specific example will be used. Typical microcontrollers have input impedance on the order of 20 MΩ. In addition, system voltages range from 1.2 V to 5.0 V. In this case, we will assume a 5 V system. Figure 2 shows Figure 1 reconfigured as a simplified electronic model. Figure 2: Input model into a simplified electronic model. Using this model, it is easy to see the problems with unprotected inputs. Any large voltage that shows up on input pin is presented directly to the interior electronics (microcontroller). Regardless of how this voltage is produced (ESD, induced EMI, switch closure, user error), this can damage the microcontroller, and perhaps cause the entire system to fail. Because of this, different protection strategies must be implemented to create a robust system. Figure 3: Simple switch circuit. When the position of the switch is changed, a large voltage is induced over the 25 feet of wire, and it appears at the microcontroller. This is demonstrated in Figure 4. Note the minimum voltage caused by the inductive ringing is -5.88V. This is more than large enough to cause serious problems within an electronic system. Figure 4: Switch from open to ground. Protection approaches Figure 5: Enhanced microcontroller input model. Even if the diodes are not destroyed, a large ESD spike can induce a current surge through the microcontroller’s power bus, which can corrupt internal registers and settings leading to unpredictable behavior. With all of this in mind, the first attempt to protect the input pin is found within current limiting. Figure 6: Current limit protection for an input. This type of protection works well for short wire connection lengths and enclosed wire runs (little chance of EMI, etc.). Figure 7 shows how this circuit works to implement the protection. In Figure 7, the ringing edges from the induced voltage are clipped at -0.810 V. Figure 7: Current limit circuit results. Filtering Figure 8: Low pass filter protection for an input. With this type of circuit, a little more thought must be applied to component selection. Because of the frequency limiting characteristics of the circuit in Figure 8, the value of the resistor and the capacitor must be sized so that the microcontroller does not miss any signals. The simple equation shown in Figure 9 can be used to determine the value of the resistor and the capacitor. Figure 9: Equation for determining the resistor and capacitor values in a low pass filter circuit used for a digital input. To calculate the value of R and C, use the following steps:
Figure 10: RC filter performance. One added advantage to the RC filter circuit for a digital input is that it also rejects spurious/fast inputs that could cause false readings on the microcontroller. Unfortunately, for large ESD events and long wire runs, there can still be voltage spikes in the microcontroller because the circuit is relying on the clipping action of the internal diodes. This leads to the next approach. Figure 11: External clipping diode circuit. Figure 12 shows the results of this circuit with the input switch circuit. The yellow trace is the positive side of the capacitor, while the green trace is where the resistor meets the Schottky diodes. Note the negative spike is -0.650 V, which is below the forward bias voltage of the microcontroller. A voltage of this level on a well-designed PCB should not cause any problems. Figure 12: External diode protection results. So for the most ruggedized digital input protection, a combination of external resistors, capacitors, and diodes should be used.
The input clipping diode to ground is to protect from less than zero volt spikes. The input clipping diode to the positive bus is removed in favor of the zener diode after the current limiting resistor. This provides a known voltage for the input pin and reduces the amount of current shunted to the power bus. In addition, all of the connections on the input are now to ground, which can ease PCB routing. Note, in this case, the current limiting resistor must be sized small enough to provide enough current to allow zener breakdown at the correct voltage (about 1 mA minimum). Figure 14 shows the operation of this circuit, using a switched 12 V input. Figure 14: Reading large input voltage digital inputs. Conclusion |
|