QWIIC QUAD RELAY Not Scanning

Hello,

I’m trying to get my new QWIIC Quad relay to conenct to the I2C buss of my SAMD21 Pro RF. The issue is unless I have other QWIIC devices connected to the I2C bus the relay does not register. I have proven this by using the scan example in the QWIIC Relay example library and as per the attachments when I have two buttons on the bus i get the addresses of the buttons and the relay. When I remove the buttons and only have the relay and run the scan example again it doesn’t see anything and freezes at the text “Scanning…” on the serial monitor.

Thoughts?

Addresses-

button 0x10

button1 0x11

quadRelay 0x13

The code I used for scanning is below-

#include <SPI.h>
#include <Wire.h> //include Wire.h library

void setup()
{
  Serial.begin(115200); // The baudrate of Serial monitor is set in 9600 
  SerialUSB.begin(115200);
  while (!SerialUSB); // Waiting for Serial Monitor
  Serial.println("\nI2C Scanner");
  Wire.begin(); // Wire communication begin
  
}

void loop()
{
  byte error, address; //variable for error and I2C address
  int nDevices;

  SerialUSB.println("Scanning...");

  nDevices = 0;
  for (address = 1; address < 127; address++ )
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    error = Wire.endTransmission();

    if (error == 0)
    {
      SerialUSB.print("I2C device found at address 0x");
      if (address < 16)
        Serial.print("0");
      SerialUSB.print(address, HEX);
      SerialUSB.println("  !");
      nDevices++;
    }
    else if (error == 4)
    {
      SerialUSB.print("Unknown error at address 0x");
      if (address < 16)
        SerialUSB.print("0");
      SerialUSB.println(address, HEX);
    }
  }
  if (nDevices == 0)
    SerialUSB.println("No I2C devices found\n");
  else
    SerialUSB.println("done\n");

  delay(5000); // wait 5 seconds for the next I2C scan
}/code]

Must be a matter of adding pull-up resistors to both SCL and SDA lines. The resistor values between 4k7 and 10K will do the job.

Looking at the schematics the Quad Relay does not have them on the board.

Paul,

I did what you said with 4.7k resistors and I’m back up and running. I recall now back when I was working on Fire & Gas systems as an electrician that 4.7K ohm end of line resistors were needed for addressable smoke detectors. It all makes sense now.

Much appreciated.