Daisy chain NCD I2C boards

I’ve been using an NCD8Relay Photon board successfully for awhile now, and want to extend it using the NCD 9634 8 OC Dimmer board. I’ve connected the dimmer board via I2C cable from the Relay board, but have been unsuccessful in getting the dimmer board to respond.

  • The 8 relay board is on address 0x20, working fine.
  • I set the dimmer board jumper A0, which should make it address 0x41.
  • When I run the particle-i2c-scan, I see devices at 0x01, 0x03, 0x20, and 0x70.
    So thinking that somehow the address for the dimmer is actually 0x70 instead of 0x41 per the documentation, I try writing simple code to set an LED connected to the dimmer board channel 1, but the led remains off. Then I run the particle-i2c-scan after that, and the device at 0x70 is no longer found until I POR the boards.
    Does anyone know what the devices at 0x01, 0x03, and 0x70 might be? And is there anything special I need to do when daisy chaining I2C boards?

I’m basically running the following lines of code in setup, and status reports transmission failed (not shown).

#define ADDRESS 0x41 // Also tried 0x70
Wire.begin();

Wire.beginTransmission(ADDRESS);
Wire.write(0); // Mode1 register
Wire.write(0);
Wire.endTransmission();

Wire.beginTransmission(ADDRESS);
Wire.write(1); // Mode2 register
Wire.write(0x16); // Osc on, diable AI, subaddrs, allcall
Wire.endTransmission();

Wire.beginTransmission(ADDRESS);
Wire.write(2); // 2 + led #
Wire.write(128); // 1/2 brightness
status = Wire.endTransmission();

Hi,

Try running this code on the Photon module and then monitor it’s serial output. This code scans the I2C bus for devices and then prints out the I2C bus addresses it discovers devices on:

unsigned long scanInterval = 10000;
unsigned long lastScan;

void setup() {
    //Set the speed of the I2C port on the Photon and start it.
    Wire.begin(); 
}

void loop() {
    if(millis() > lastScan + scanInterval){
        lastScan = millis();
        bool devicesFound = false;
        String newDevices = "Devices at: ";
        //Step through all 127 possible I2C addresses to scan for devices on the I2C bus.
        for(int i = 1; i < 128; i++){
            //Make a general call to device at the current address to see if anything responds.
            Wire.beginTransmission(i);
            byte status = Wire.endTransmission();
            if(status == 0){
                //Device found so append it to our device list event string
                newDevices.concat(i);
                newDevices.concat(", ");
                devicesFound = true;
            }
        
        }
        if(devicesFound){
            Serial.println(newDevices);
        }else{
            Serial.println("No Devices Found");
        }
    }
}

Thank you. Yes, that is basically the same code that a ran earlier, and it is reporting devices on addresses 1, 3, 32, and 112. The relay board is at address 32 (0x20), but I don’t know what 1, 3, and 112 are. The PCA9634 board is jumpered to be on 0x41 (65).
Following a POR to the boards, the addresses reported are 1, 3, 32, and 112.
After trying to write to address 112, it no longer responds, and the above code reports just 1, 3, and 32.

Hi,

I have not personally used the board you have there but looking at it and the Datasheet there appear to be 7 address jumpers which means it has an address range of 0-127. If not jumpers are installed then I believe it’s address would be 0. If you have the A0 jumper installed then I believe it’s address would be 1. I’m not sure why however you would be seeing other addresses. Looking at the Datasheet for the PCA9634 here I see it has software programmable address capabilities. I wonder if that 112 address is being used for that(only briefly looked at the Datasheet).

Would it be possible for you to provide a photo of your complete hardware setup powered up? Maybe we can find something there.

Thank you very much for the help. I think I have it all figured out now. The address jumpers do not work as documented by NCD, but are direct addresses as you suggested. In addition, I had mistakenly thought that LEDs would be connected to the pairs of screw connectors on the board, but actually the 2nd connector of each pair is just ground, and the LED needs to be connected to a + power source. Not sure why NCD didn’t make things easy by putting a +12 volt connect next to each PWM switched ground connector, but I know how things need to be hooked up now. Again, thanks for the help.

We tried to make sure the product had a wide use case which means users may want to utilize different voltages for their LEDs. If we provided a 12VDC output only then users could not for instance use 5VDC LEDs. In this way you can use a wide range of voltage sources for the LEDs.

Please let us know if you have any other questions.