Sunday, October 14, 2012

Current Limiting the I2C Bus

The latest project I've been working on requires a remote temperature sensor that's reasonably accurate while operating in harsh environments where short circuits are possible.  After looking at the options available I decided to use the MCP9808 digital temperature sensor from Microchip.  It has a maximum error of plus minus 0.5 degrees Celsius over the range I am interested in, it's not too expensive, and it's digital interface means I haven't got to use an ADC.  On the down side, the i2C bus isn't really designed for board to board connection and is prone to lock-up.  However, with a few precautions I believe I can overcome these issues.

To prevent the bus locking up the main micro-controller, I'm using a smaller micro as a transceiver.  If the bus locks up due to a short circuit or any other reason the main micro can still operate and cut power to the damaged transceiver channel.  Even with this precaution it's still necessary to limit the short circuit current between the exposed i2c lines to prevent damage to the transceiver.

The simplest and most cost effective way to do this is to place a 100 ohm resistor on any exposed active lines.  With a 3.3V supply, a short on any of these lines will be limited to a current of 33 mA, which is within spec of the transceiver micro.  A short between two of the active lines will be limited to 16.5 mA.

The 100 ohm resistor on Vcc will cause the supply voltage of the sensor to slightly sag, but the current drawn by the sensor is so small that it doesn't really matter.  Just to be sure I've prototyped the design on a breadboard and it works as expected.

To further protect the i2c bus, I intend to put diodes on the SDA and SCL line to clamp ESD spikes. For what I'm using it for these measures should adequately protect the bus.

Current Limited i2c Bus
Current limited i2c bus interface

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.