Problem with migration of I2C 4-20mA Current Receiver ( PR33-15 ) from Arduino Uno to Arduino Due

The installation consists of several water level sensors 4-20mA connected to the 4-20mA Current Receiver PR33-15. The setup with the Arduino Uno has the I2C-Shield PR 14-3 on top of the Arduino Uno, the I2C-Shield is connected to the receiver PR33-15 with I2C-cable. The sketch for Arduino Uno includes the MCP3428.h - library and works without problem.

Given the limitations of the Arduino Uno, I want to migrate the installation of the sensors to Arduino Due, accordingly replace the I2C-shield with the PR37-10 for the Due and connect the PR33-15 receiver with I2C-cable, the I2C-OUT1 at the PR37-10 to the I2C-IN at the PR33-15 receiver . The jumpers on the I2C-shield according to the wiring diagram placed to use the I2C-port 1. Unfortunately the sketch does not work, as soon as the MCP3428 is declared with the instruction: MCP3428 MCP(0); The execution of the sketch hangs, as soon as the declaration of the MCP3428 is carried out.

Is there any incompatiblity of the hardware above or is there any setup-mistake concerning the connection of receiver and I2C-shield ? What about the library MCP3428.h, is this one correct with the Arduino Due ? Is the declaration of MCP3428 with: “MCP3428 MCP(0);” correct ?

Hi Will,
It should work.
can you share a picture of the setup?


You are absolutely right, the reason is a bit strange:

The sketch to read the sensor values follows the structure of the example sketch of the MCP3428. The declaration of MCP3428 in the example sketch is located in the section for declaring the variables. Further definition and call of MCP3428 is positioned in the loop function. This works fine with Arduino Uno, but not with Arduino Due. If I place the declaration here in the loop function before the other MCP-instructions, the sketch works without problem !