MKR NB 1500 - Cloud connection failure caused by I2C !

Hello, I'm testing an MKR NB 1500 in combination with an I2C communication to an MKR WiFi 1010. I took the following steps:
STEP 1: Connected the MKR NB 1500 to the Arduino IoT cloud using the standard generated sketch.
RESULT: Connects and no further issues found.
STEP 2: Loaded the "bare mininum" sketch on the MKR WiFi 1010 and connected this board using the GND and VIN pins.
RESULT: The MKR NB 1500 still connect correctly, and no issues have been found.
STEP 3: Connecting the SCL and SDA pins between the two boards.
RESULT: The MKR NB 1500 no longer connects to the Arduino IoT cloud.

In my thoughts, the I2C bus is not used at all. The Wire Lib is NOT included in both sketches. How can this influence the communication to the Arduino IoT cloud?

Can someone suggest what I'm doing wrong?

Below is the standard sketch of the MKR NB 1500:

/* 
  Sketch generated by the Arduino IoT Cloud Thing "Untitled"
  https://create.arduino.cc/cloud/things/58cdfa83-494c-44e7-974b-738d7c6ef568 

  Arduino IoT Cloud Variables description

  The following variables are automatically generated and updated when changes are made to the Thing

  - No variables have been created, add cloud variables on the Thing Setup page
    to see them declared here

  Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
  which are called when their values are changed from the Dashboard.
  These functions are generated with the Thing and added at the end of this sketch.
*/

#include "thingProperties.h"

void setup() {
  // Initialize serial and wait for port to open:
  Serial.begin(9600);
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is found
  delay(1500); 

  // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  
  /*
     The following function allows you to obtain more information
     related to the state of network and IoT Cloud connection and errors
     the higher number the more granular information you’ll get.
     The default is 0 (only errors).
     Maximum is 4
 */
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();
  // Your code here 
  
  
}

Some thoughts. Have you tried connecting only SCL and trying it, then try just SDA?

When you connect the I2C wires together one board must be set as a master and the other board a slave.

Hello twesthoff,

Yes, I tried all possible combinations of SCL and SDA. As soon as you connect the two boards the cloud connection fails. If you disconnect it works again.

I use a multi-board combination with I2C comms for several years in other combinations (piggyback MKR 1010WiFi/MRK ZERO, MKR 1010WiFi/MKR 1010WiFi, Nano/Nano various combinations). Very powerful and very reliable.

In the meantime, the Arduino support team is reviewing the issue as well. Lets see what they find.

And you set one of the boards to be a slave, so two output pins from each board aren't fighting each other? Just checking. If you had other successful boards as you said, you had done so, I guess.

I'm using the MKR NB 1500 with the MKR Connector Carrier board. There is problems with the MKR Vin power when powered by the Vin on the Connector Carrier board.It gets all whacked up when you disconnect the USB cable. Not sure if that could be a problem.

Hey twesthoff,

No problem with I2C comms between MKR boards. I get the feeling that GSM communication on the MKR NB 1500 is changing the I2C speed. I found a post where someone stated the I2C coms were set to 1GHz by the GSM module. Vague...

I also believe Arduino was able to reproduce the issue. They came back to me with questions about the power supply. They mentioned that the power supply by a USB cable was not enough to power an MRK NB1500 in combination with another board. This is what the Arduino guy asked me:

"I have been testing this combo and a few issues were indeed found. However I was able to keep USB communication with the platform, are you also able to keep the wired connection? In my case, I found that indeed the USB alone did not provide enough current for the wireless connection plus the 1010. Can you test the OTA on a power bench?"

Could this be the issue you are facing?

I did some tests with the two boards and the MKR carrier and found no issues.

I never had an issue with the MKR carrier board. One of my normal set-ups is as below:


I use them for high-speed sampling and storage. One of them just passed the 5.308.208.549 samples without a single issue. I guess that shows how reliable these MKR boards can be.

The only thing I do between the two MKR boards is remove the VCC and the 5V pin of the upper board. In the system in the picture, I even swap the I2C master between the boards.

My power problem is according to Arduino tech support "normal" they said the circuit is meant to work that way. Only the MKR NB 1500 and one other MKR board do that. The rest work as I would have expected. Looking at the schematics it is true. I would never have thought anyone would have designed a board that way though.

I'm using the same carrier connector board as you are. I am powering the board with 12V at the screw terminal Vin and Gnd, and with USB to program/upload etc. All work fine until you disconnect the USB cable. Then all of the Grove connectors on the carrier board lose their 5V. BUT, that's how they designed it to work!

This can be remedied by adding a jumper from Vin to 5V on the strip connector of the MKR NB 1500 board. However, if you connect the USB power back up you might have problems because the 5V from the USB will be directly connected to the output of the 5V regulator on the Carrier connector board. If exactly the same voltage, no problem, but mine were a few tenths of a volt different. I didn't want to risk damage so I used an adapter that blocked the USB voltage and all works great now. (In my opinion it shouldn't work that way though.)

On the MKR NB 1500 the I2C works fine. It is not used by the LTE module. The module uses a serial port to talk to the Arduino at 115200 baud.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.