Opto-electronics i2c interface
What if you want to isolate a digital signal ? You use a optoisolator, of course.
What if you want to isolate a bi-directional
digital signal ? Optoisolators only handle one-way communication, so one won't work -- obviously you need (at least) 2.
Here's a really clever circuit that does this.
D1 left-+|>|+--------------+ | | (+5V)-R2--+ gnd | | | | +|<|+ \ / - | --- \(optoisolator chips) --- IC1 | IC2 / / \ +|>|+ - | | | | gnd +--R1-(+5V) | | +--------------+|<|+-----right D2 -|>|- == diode
Circuit by Jerry Steele (National Semiconductor), _EDN_ 1996 Jun 6 p 122. It
references "Isolate data acquisition on a
bidirectional bus" article by Jerry Steele in _Electronic Design_ 1995 Nov 6. ASCII schematic drawn by David Cary.
We assume that everything else on the (left) and (right) bus is a open-collector
pull-down device. (I don't *think* that it hurts if
there are other pull-up resistors besides the 4.3K R1 and R2 in this circuit).
To build a complete isolated bidirectional I2C bus, you build one of the above
circuits for the SDA line and another one for the
SCL line; and you need a isolated "gnd" and +5V power supply. Steele's component list looks like
4 HP HCPL2300 optocouplers.
4 resistors (~4.3K)
4 Schottky diodes (1N57212)
4 capacitors (~0.1 uF) to decouple +5 and gnd at each chip.
1 isolated 5V DC/DC converter (Maxim makes some nice ones).
"Assume an initial high state on the [left] serial-data (SDA) bus. The
normal rest state for both the SDA and SCL (serial clock)
lines of the I2C bus is high.
The LED in IC1, which has a current path from its anode via R2 [...], is off.
As a result, the [turned-off] IC1's output transistor
transmits (via IC2's photodiode in parallel with D2) [a high] to the [right] SDA [...]. Grounding the [left] SDA line causes
current to flow in IC1's LED, thereby activating IC1's output transistor. The transistor's low state transmits to [right SDA] via
[...] D2, [...], limits the reverse-bias drop to the typical 0.4V of a Schottky diode. This arrangement prevents the low condition
from circulating back across the barrier, [which avoids] causing the circuit to latch.
When [something pulls the right SDA bus low], the mirror image of the above
scenario occurs. When IC5 pulls the SDA line
low, it turns on the LED in IC2. When IC2's output transistor pulls [left] SDA low, it does so in such a way that it applies a
reverse bias to IC1's LED [keeping it turned off], with a current path via D1 (again, to limit the drop to 0.4 V) preventing a
recirculating condition. In short, when you take the left-side SDA low, the right side goes low. When you take the right side
low, the left side goes low. ... without latching."
[DAV: I've taken the liberty of replacing Steele's terminology "photodiode",
"forward biased", "inactive" with the
more-understandable-to-me terms "LED", "turned on", "turned off", even though I know the LED in a optoisolator doesn't emit
The only flaw is that most optoisolator chips have rise and fall times of at
least 10 us, meaning maximum bit rates below 50
24 août, 2009