Swiss Pi Extensions – Current Loop Interface
Current loop interfaces are still widely used in the industrial sector for reading sensors, despite the advent of digital alternatives. Current loops are simple and robust, and they have a long working range. Consequently, there are a lot of sensors available which use this technology.
The interface described here (see Figure 4) is built around HCNR200 linear optocouplers from Avago. The internal structure of these devices consists of two matched photodiodes and an LED. At the transmit end, one photodiode is used to provide feedback from the power emitted by the LED. The overall transmission characteristic is virtually linear because the current through the photodiode at the receive end is nearly the same as the current through the photodiode at the transmit end.
For this circuit we used a fairly direct copy of the typical application circuit on the Avago data sheet, with only a few minor changes. For instance, we replaced the LM158 opamps at the transmit end by LM358 devices. They cost a lot less and are more readily available than the LM158. The main difference is in the rated temperature range of the opamps: the LM158 is an extended range device for use from –55 to +125°C. The components used in the Raspberry Pi and the Swiss Pi are intended for commercial use with a temperature range of 0 to 70°C. In that situation there is not much reason to use the LM158.
At the receive end we replaced the LM158 devices by OPA2344PA opamps. Unlike the LMx58 opamps, the output of the OPA2344PA can easily reach 4 V with a supply voltage of 5 V. Unfortunately, in the near future these opamps will only be available in the SOIC-8 package. A possible alternative is the LM6142BIN/NOPB.
This board provides galvanically isolated current loop interfaces which can be used completely independently. The output voltage of the current loop interface is equal to Iin × (25 ¥ × 80.6 k¥)/(10 k¥ + 25 ¥), which is Iin × 201. The current range of 4 to 20 mA thus corresponds to an output voltage range of 0.804 to 4.02 V, which is within the A/D conversion range of the Swiss Pi.