1. Introduction and Overview
The Xicoolee MCP23017 IO Expansion Board utilizes an I2C interface to provide 16 additional general-purpose input/output (I/O) pins. This module is designed for compatibility with various development platforms, including Raspberry Pi (Zero, Zero W, Zero WH, 2B, 3B, 3B+, 4B), Arduino, and STM32 microcontrollers.
To facilitate development, C and Python demonstration codes are provided for Raspberry Pi, as well as demonstration codes for Arduino and STM32. These examples cover essential functionalities such as input testing, output testing, and interrupt testing, enabling users to quickly integrate the board into their projects.

Figure 1: Xicoolee MCP23017 IO Expansion Board
This image displays the Xicoolee MCP23017 IO Expansion Board, showcasing its compact design and pin headers. The board features the MCP23017 chip, multiple I/O pins, and a PH2.0 connector, ready for integration into various electronic projects.
2. Product Features
- Onboard 3-Digit DIP Switch: Conveniently set the I2C address for the module, allowing multiple devices on the same bus.
- I2C Interface: Utilizes the I2C communication protocol, minimizing the number of pins required from the host microcontroller.
- 3.3V/5V Level Compatibility: Supports both 3.3V and 5V operating voltage levels, ensuring broad compatibility with various development boards.
- PH2.0 Interface and 2.54mm Spacing Pad: Reserved for easy connection to other development boards and custom wiring.
- Open Source Demo Codes: Available for Raspberry Pi, Arduino, and STM32 development boards to assist with rapid prototyping and integration.
3. Specifications
| Parameter | Value |
|---|---|
| Dimensions | 45mm (Length) x 25mm (Width) |
| Control Chip | MCP23017 |
| Signal Interface | I2C |
| Supply Voltage | 3.3V / 5V |
| Expansion I/O | 16 |
| Interrupt Pins | INTA, INTB |

Figure 2: Features and Specifications Overview
This image provides a visual summary of the product's key features and detailed specifications, including dimensions, control chip, interface type, supply voltage, and interrupt pins. It also highlights the I2C interface, 3.3V/5V compatibility, and the inclusion of demo codes.
4. Interface Definition
Understanding the pin definitions is crucial for correct wiring and operation of the MCP23017 IO Expansion Board.
| Pin Name | Description |
|---|---|
| VCC | Power supply positive (3.3V or 5V) |
| GND | Power supply ground |
| SDA | I2C data line |
| SCL | I2C clock line |
| INTA | Interrupt pin for Port A |
| INTB | Interrupt pin for Port B |

Figure 3: Board Layout with Pin Designations
This image provides a clear top-down view of the MCP23017 board, highlighting the pin labels for VCC, GND, SDA, SCL, INTA, INTB, and the 16 I/O pins (PA0-PA7, PB0-PB7). The 3-digit DIP switch for I2C address configuration is also visible.
5. Setup
5.1. Connecting the Board
Connect the MCP23017 IO Expansion Board to your host microcontroller (e.g., Raspberry Pi, Arduino, STM32) using the provided PH2.0 6-pin connecting cable or by soldering to the 2.54mm spacing pads. Ensure the following connections are made:
- VCC: Connect to the 3.3V or 5V power supply output of your microcontroller.
- GND: Connect to the ground of your microcontroller.
- SDA: Connect to the I2C data line (SDA) of your microcontroller.
- SCL: Connect to the I2C clock line (SCL) of your microcontroller.
- INTA/INTB (Optional): Connect these interrupt pins to available GPIO pins on your microcontroller if interrupt functionality is required.

Figure 4: Board with PH2.0 Connecting Cable
This image shows the MCP23017 board connected with its PH2.0 6-pin cable, illustrating how it interfaces with other components. The cable simplifies the connection process for power and I2C communication.
5.2. Setting the I2C Address
The board features a 3-digit DIP switch to configure its I2C address. This allows for up to 8 different MCP23017 modules to be connected to the same I2C bus. Refer to the MCP23017 datasheet for specific address configurations based on the DIP switch settings. Typically, 'ON' corresponds to a logic '0' and 'OFF' to a logic '1' for address bits A0, A1, A2.

Figure 5: DIP Switch and PH2.0 Connector Details
This image provides a close-up view of the 3-position DIP switch, crucial for setting the I2C address of the MCP23017 module. It also shows the PH2.0 terminal and the 2.54mm pitch control pins, indicating options for connectivity.
6. Operating Instructions
6.1. Software Setup
To operate the MCP23017 board, you will need to use a compatible software library for your chosen microcontroller platform. Libraries are widely available for Raspberry Pi (Python), Arduino (C++), and STM32 (C).
- Raspberry Pi: Utilize Python libraries such as `Adafruit_CircuitPython_MCP230xx` or similar.
- Arduino: Use the `Adafruit MCP23017` library or other compatible libraries available through the Arduino IDE Library Manager.
- STM32: Refer to the provided C demonstration codes or community-developed libraries for STM32.
6.2. Basic I/O Operations
Once the library is installed and the board is correctly wired, you can perform basic I/O operations:
- Setting Pin Mode: Configure individual pins (PA0-PA7, PB0-PB7) as either input or output.
- Digital Write: Set an output pin to HIGH (logic 1) or LOW (logic 0).
- Digital Read: Read the state of an input pin (HIGH or LOW).
- Interrupts: Configure pins to trigger interrupts on state changes, which can be monitored via the INTA and INTB pins.
Refer to the specific demo codes for detailed examples on how to implement these operations.
7. Maintenance
The MCP23017 IO Expansion Board is a robust electronic component designed for long-term use. Minimal maintenance is required:
- Handling: Always handle the board by its edges to avoid touching the electronic components, especially the pins, to prevent electrostatic discharge (ESD) damage.
- Cleaning: If necessary, gently clean the board with a soft, dry brush or compressed air to remove dust. Avoid using liquids or abrasive materials.
- Storage: Store the board in a dry, anti-static environment when not in use.
- Power Supply: Ensure the power supply voltage is within the specified 3.3V/5V range to prevent damage to the board and connected components.
8. Troubleshooting
If you encounter issues with your MCP23017 IO Expansion Board, consider the following troubleshooting steps:
- No Communication (I2C):
- Verify all wiring connections (VCC, GND, SDA, SCL) are correct and secure.
- Check the I2C address set by the DIP switch matches the address used in your software code.
- Ensure your microcontroller's I2C bus is enabled and functioning correctly.
- Confirm that pull-up resistors are present on the SDA and SCL lines (the board includes 10K-ohm pull-up resistors).
- Incorrect I/O Behavior:
- Double-check that the pin mode (input/output) is correctly set in your software for each pin.
- Ensure the logic level (3.3V/5V) of your host microcontroller is compatible with the board's power supply.
- Test with the provided demo codes to rule out software configuration issues.
- Power Issues:
- Confirm that the VCC pin is receiving the correct voltage (3.3V or 5V) and GND is properly connected.
- Check for any short circuits on the board or connections.
- Interrupts Not Working:
- Ensure INTA/INTB pins are correctly connected to interrupt-capable GPIOs on your microcontroller.
- Verify interrupt configuration in your software (e.g., rising edge, falling edge, change).
9. Warranty and Support
For technical support, inquiries, or further assistance with your Xicoolee MCP23017 IO Expansion Board, please contact the manufacturer directly.
- Manufacturer: XICOOLEE
- Email: xicoolee@163.com
Please have your product model (SG-IO-E017) and any relevant details about your setup ready when contacting support.





