Hello, I am wondering if it is possible to use multiple identical I2C relay control boards connected in series. One feature of the NCD relay boards that they have a static, default I2C address, which makes it easy to program them. However, when I connected my microcontroller (in this case, a Raspberry Pi 3) to one 8-Channel Relay Control Board using I2C, and then connected this board to another 8-Channel I2C Relay Control Board and used the “i2cdetect” command, the system only detected one, and I’m assuming that this is related to the fact that the two boards have the same default I2C address (0x20). Is what I’m trying to do possible, or should I just return these two 8-Channel Relay Control Boards and purchase a 16-Channel Relay Control Board? If it is possible, how might I change the address of one of the devices so that both can be identified?
Use the A0, A1, and A2 jumpers on the relay boards to alter their I2C address. I recommend installing the A0 jumper on the second board in the chain. That will change it’s I2C address to 21.
If you have any other questions please let us know.
Thank you for your help with this! Being able to change the addresses is going to be greatly beneficial to our project. We plan to string three 8-Channel I2C relay boards together in total (16 outputs and 8 inputs, to read the state of flow switches). My next question is are there any special precautions that I should take when chaining together four or more I2C devices, such as activating pull-up resistors? I’ve read about noise/signal integrity becoming a potential problem, but as I’m very new to using I2C I do not know whether or not I should worry about it.
You really only need the SDA and SCL lines pulled high in one spot. You do not want to install pull up jumpers on all boards as that could pull the line high to hard and the processor would not be able to pull them down when needed. I’d recommend not installing the pull up jumpers on any of the boards as the I2C adapter on the Pi already pulls the lines high. You should not have any trouble attaching up to 7 boards(maximum number of I2C buss addresses on MCP23008s).
Thank you for your help with this! We will will connect all of our I2C devices in series (instead of splitting them between two Raspberry Pis).