1.2 Drive Transistor Failure

An external transistor is used to switch the relay position. If the transistor fails short, these failures could be detected by matching the internal output value of the I/O pin (LATx) with the actual value of the I/O pin (PORTx). For instance, if the internal output value of LATx is ‘1’, but the transistor is shorted to ground, then the output state seen by the digital logic (PORTx) is ‘0’.

CAUTION: If the relay coil is driven by a higher voltage than the microcontroller, a short between the drain and gate could expose the microcontroller to a voltage that exceeds its absolute maximum rating. If this failure mode is anticipated, current-limiting resistors, Zener diodes and/or other protection devices can protect the I/O pins.