Optocouplers, I2C bus basics

The inter-IC bus (I2C bus), a serial digital signal communication protocol developed by Philips Semiconductors, is being used in an increasing number of applications, including consumer appliances, communications equipment, and industrial equipment. In practically all cases, low voltage optocouplers are used to provide galvanic isolation in the 3.

By Junhua He June 1, 2006

The inter-IC bus (I2C bus), a serial digital signal communication protocol developed by Philips Semiconductors, is being used in an increasing number of applications, including consumer appliances, communications equipment, and industrial equipment. In practically all cases, low voltage optocouplers are used to provide galvanic isolation in the 3.3 V I2C bus interface. In a minimal configuration, three high-speed optocouplers are used to isolate the CLK, SDA_IN, and SDA_OUT bus signals.

The I2C bus requires only two wires and minimal hardware in the interface port. The two wires carry SDA data and SCL clocking, with every one data bit of SDA being read at each SCL clock high period.

Maximum propagation delay tP(MAX) is the greater of tPHL or tPLH. An optocoupler transmitting NRZ (non-return-to-zero) data requires that the data bit period t is at least greater than tP(MAX).

Parameters related to optocoupler propagation delay can affect data integrity and system reliability for applications that require isolating the I2C bus interface. Such applications include IEEE 802.3af-compliant power-over-Ethernet switches, and the analog-to-digital conversion interface to microcontrollers. Examples here refer to Agilent’s HCPL-063L dual-channel and HCPL-060L single-channel 15 megabit/s 3.3 V optocouplers.

In general, the I2C bus requires only two wires and minimal hardware in the interface port; interconnected devices are addressed through software. Data speed between the master and slave devices ranges from 100 kb/s for standard mode, through 400 kb/s for fast mode, to 3.4 Mb/s for high-speed mode. Two wires carry SDA data and SCL clocking, with every one data bit of SDA being read at each SCL clock high period. Data must remain stable during this period. The high-to-low or low-to-high state transition can only be completed when the clock signal on the SCL line is low, as the timing diagram shows.

Optocoupler propagation delay

Galvanic isolation in the I2C bus interface is required by the application environment to ensure error-free data transmission and isolate high voltage devices. Suitable optocouplers can provide this isolation. High-speed optocouplers, ranging from 100 kilobit/s to 50 megabit/s, are available for digital data interface isolation. The appropriate optocoupler for the I2C bus interface primarily depends on application speed and propagation delay requirements.

An optocoupler’s maximum high-to-low and low-to-high propagation delay (tPHL and tPLH) will indicate the device’s maximum data transmission rate, as the ‘Optocoupler propagation…’ graphic shows. Maximum propagation delay tP(MAX) is the greater of tPHL or tPLH. An optocoupler transmitting NRZ (non-return-to-zero) data requires that the data bit period t is at least greater than tP(MAX). So, the maximum data speed is:

FNRZ (MAX) =1/t

For a clock signal, which is RZ (return-to-zero) data, such as the I2C bus SCL, a clock cycle includes both the high and low period added together. For a normal, 50% duty cycle RZ clock signal, a safe rule for judging the expected RZ data rate is:

fRZ(MAX)

However, in the I2C bus clock cycle, the high period is permitted to be shorter than the low period. To transmit a less than 50% duty cycle signal over the optocoupler, the optocoupler’s maximum propagation delay tP(MAX) should be less than the high period. For example, when considering isolating an I2C bus at the fast mode clock frequency of 400 kHz and 50% duty cycle (equivalent to a 800 kilobit/s data rate), the maximum propagation delay of the optocoupler can’t exceed 1.25 ms. Since the I2C bus specification allows a fast mode clock high-time of as little as 0.6 ms, the optocoupler maximum propagation delay must be shorter than 0.6 ms, instead of 1.25 ms.

In high-speed optocouplers, the pulse width distortion (PWD) parameter is specified as the difference between tPHL and tPLH. Typically PWD on the order of 20% to 30% of the minimum pulse width is tolerable.

When data are transmitted synchronously over parallel signal lines, the optocoupler’s propagation delay skew (tPSK) is an important factor that may determine the maximum parallel data transmission rate. If the parallel data are being sent through two individual optocouplers or a single multi-channel optocoupler, differences in the propagation delays between channels will cause the data to arrive at the outputs of the optocouplers at different times. If this difference in propagation delay is large enough, it will limit the maximum rate at which parallel data can be sent through the optocouplers.

Propagation delay skew is defined as the difference between the minimum and maximum propagation delays for any group of optocoupler channels operating under the same conditions (such as the same drive current, supply voltage, output load, and operating temperature). The propagation delay skew of the optocouplers will result in uncertainty in data and signal lines.

Minimum pulse width

In general, the absolute minimum pulse width that can be sent through parallel optocouplers is twice the propagation delay skew. A conservative design should use a slightly longer pulse width to ensure that any additional uncertainties caused elsewhere in the circuit do not cause problems. The I2C bus clock signal high period is the shortest pulse; so twice the optocoupler’s propagation delay skew should not exceed the I2C clock high period.

The I2C bus protocol is level sensitive for the SCL and SDA signals: SDA should be stable at the high or low level during the SCL high period. An I2C bus device must internally provide a data hold time (tHD; DAT) to bridge the undefined period between high and low levels of the falling edge of the SCL signal. Since an optocoupler will create uncertainty in both the SDA and SCL signals, the data hold time should be set greater than tPSK. The value of tPSK should also be considered in the SDA data set-up time (tSU;DAT).

The I2C bus protocol also requires that the output stages of transmitter devices connected to the bus be open-drain or open-collector types to perform the wired-AND function. Optocouplers with open-collector outputs, such as Agilent’s HCPL-063L, are simple to directly connect to the I2C bus line. The HCPL-063L has a maximum propagation delay of 90 ns, which shows the capability of transmitting high-speed data, and a maximum propagation delay skew as low as 40 ns, which will provide sufficient time to permit the I2C bus data hold/set up time.

Power over Ethernet

Applications that require isolating the I2C bus interface include IEEE 802.3af-compliant power-over-Ethernet switches. Here’s an example using Agilent’s HCPL-063L dual-channel and HCPL-060L single-channel 15 MBd 3.3 V optocouplers.

An emerging industry standard, IEEE 802.3af enables distributing power-over-Ethernet cable. This network continues the same architecture as IEEE 802.3 Ethernet, but provides that either a spare pair or a signal pair of wires in the cable that can carry -48 V dc to supply powered devices such as IP phones, web cameras, and wireless LAN access points. A power sourcing equipment (PSE) module is used to provide -48 V dc at the switch or hub.

802.3af-compliant PSEs may be connected in two locations with respect to the link segment. The midspan connection implements the PSE technology outside of an existing Ethernet switch; the endspan (or endpoint/DTE PSE) connection implements PSE inside the switch itself. Some vendors have already integrated end-span PSE in their switches, but most have selected midspan PSE.

PSE hot swap controllers or power management chips incorporate the I2C bus protocol to communicate with a host microcontroller. Agilent HCPL-063L is specified with an isolation voltage of 3,750 Vrms for one minute (per UL 1577), which will enable a power over Ethernet (POE) switch to meet telecommunications equipment safety standards such as IEC 60950. The 15 kV/ms common-mode transient immunity of the HCPL-063L will prevent transient voltage noise from the power hot swap circuit from disrupting the host controller side circuit.

Optocouplers inherently feature high electromagnetic interference immunity through optical coupling and isolation boundary, which helps make equipment reliable and capable of meeting EMI standards.

Online Extra

Application examples: Optocouplers, I2C

Parameters related to optocoupler propagation delay can affect data integrity and system reliability for applications that require isolating the I2C bus interface. Applications that require isolating the I2C bus interface include IEEE 802.3af-compliant power-over-Ethernet switches and the analog-to-digital conversion interface to microcontrollers.

IEEE 802.3af provides that either a spare pair or a signal pair of wires in the cable can carry -48 V dc to supply powered devices such as IP phones, web cameras, and wireless LAN access points. A power sourcing equipment (PSE) module is used to provide -48 V dc at the switch or hub. A PSE distributes power into the Ethernet network and also provides a power management function. The 802.3af specification requires electrical isolation of the PSE and powered device consistent with the requirements of the physical layers of 10/100BASE-T Ethernet.

The diagram shows a PSE module in a POE switch.

Analog-to-digital converter Here’s another example using Agilent ’s HCPL-063L dual-channel and HCPL-060L single-channel 15 MBd 3.3 V optocouplers. Industrial and medical instruments may require optical isolation between mixed-signal and digital circuits. If a medial instrument sensor/probe is subjected to high voltage, safety electrical insulation is needed between the analog sensor and the microcontroller/ digital signal processor. Most isolation is intended to break any ground loop between the digital and analog circuitry, because non-isolated grounds can result in high background noise in the system and affect A/D conversion accuracy.

The I2C bus provides a convenient interface between an A/D chip and microcontroller, and A/D converters that incorporate an internal I2C interface are now available on the market.

One dual-channel optocoupler, such as an HCPL-063L, can isolate the transmit clock and SDA_OUT from the MCU/master to ADC/slave, and one single-channel optocoupler, such as an HCPL-060L transmits SDA_IN from the ADC/slave to MCU/master. An isolated dc/dc converter could derive power from the digital system to supply the A/D converter and VDD1-GND1 of the other side of two optocouplers.

Author Information

Junhua He is an applications engineer with Avago Technologies,