Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an application where I want many small signal relays driven by an I/O expander chip. In this case, I have selected the Microchip MCP23017 (Datasheet) as an I2C to GPIO expander. I have also selected low-current reed relays with the intent that I drive the relays directly from the I/O pin. (5mA coil current, 24mA I/O current). Normally, with a relay, I would expect to use a clamping diode across the coil to protect the output device - this is standard practice. However, I noticed this bit in the datasheet of the expander, where the absolute maximum clamp current is specified:

Excerpt from Datasheet Absolute Maximum Ratings, Page 27

With my coil current of 5mA, I'm not close to the maximum rating, which to me, suggests that I'm OK with omitting the normal external clamp diode. However, nowhere else in the datasheet is the clamping current mentioned, which (again, to me) suggests that the internal diodes should not be used during normal operation.

Do I play it safe and put in the external clamping diode, or do I assume that if it's less than the Absolute Maximum Ratings, it's safe?

share|improve this question
I don't think it is a good idea to rely on these diodes, these only turn on when the input goes higher than Vcc+0.3v or lower than GND-0.3v (although the datasheet you refer to says >Vcc or <gnd (?) ) while a clamping diode across the relay would turn on at about 0.6v – alexan_e Feb 20 '14 at 16:35

Absolute maximum specs are only to not damage the chip. They do not guarantee correct operation. I would not try to extrapolate from absolute maximum to normal operating.

My advice is to add a small Schottky diode for each relay. You need very little voltage and current capability, so a phyisically small diode should do it.

Clamping current is a area where it is a especially bad idea to be a test pilot. There are various topologies for dealing with clamping current, and some have more significant effect on normal operation than others. For example, old PICs like the 16F877 had a rather liberal clamping current spec and you could get away with a lot. Newer PICs have tightened down on the normal operating spec to the point where it's clear they don't want the clamps to ever come on during normal operation. This is not a place you want to guess what you can get away with.

share|improve this answer

It's not a really good thing to do.

Absolute maximum ratings are just that- while it's probably not going to fail, it might cause current to spill out of the inputs or otherwise not operate normally (reset the communications or something else weird). There is no guarantee of normal operation outside the recommended range.

That said, you'd probably 'get away with it' with good layout etc. Still, dual Schottky diodes are inexpensive and small and there would be no worries that latchup (and destruction of the chip) might happen with some pattern of simultaneous relay turn-offs at high ambient temperature or something like that. It's possible that even the abs-max spec only applies to a single output at a time and multiples may cause cumulative current to flow in the parasitic structures that cause latch-up.

A single field failure will cost way more than a reel of dual diodes, just to put it in perspective.

share|improve this answer

The Microchip PIC devices I've worked with have included fairly robust diodes to VDD and VSS, and some of Microchip's app-note designs have even relied upon such diodes, but in general there is no guarantee that sourcing or sinking current through the protection diodes will not cause unwanted effects. For example, I have observed a shift-register input chip (a 74HC165 I think) whose inputs were "paired up", and behaved as though it used a PNP transistor to protect each pair of inputs (one input wired to the emitter, and the other to the collector; VDD tied to the base). The board's external inputs were connected to the device with resistors on the order of 10K. Connecting an input to 9 volts drive about 400uA into the pin. Not enough to damage the part, but about 300uA of that voltage flowed out through the adjacent input (which was driven to ground through a 10K resistor), pulling it up to 3 volts and causing it to erroneously read high.

In practice, almost every device may be characterized as having a certain amount of current which could be externally sourced or sinked without external clamping without disrupting operation, and a certain voltage beyond VDD which may safely be driven without current limiting, but for whatever reason few manufacturers give any spec as to what those guaranteed-safe levels might be. I doubt any chip's operation would be disrupted by an unclamped one-fempto-ampere current source, nor by having an input driven one microvolt above the rail, so there should be some level of current and voltage the manufacturers could specify as being unconditionally safe; even if the manufacturers wanted to be extremely conservative (e.g. current 50uA; voltage 50mV) that would be more helpful than having no spec whatsoever. For example, if one reads typical data sheet in the strictest possible fashion, it wouldn't even guarantee that operation wouldn't be disrupted by having the supply drop to 4.9998 volts while an input was at 5.0000 volts. In practice, chips are going to tolerate inputs 0.0002 volts above the rail without operational consequences, but a lot of data sheets don't even guarantee that.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.