Hello everyone,
I’m working on a universal cable tester project using an ESP32 DevKit V1, a MCP23017 (I2C) expander, a ST7735 TFT display (128×160), and a rotary encoder.
My goal is to detect cable connections (40 Pins tester) by scanning continuity between the pins (GPA ↔ GPB). I start with 8 pin so with only one MCP for test
Here is my current wiring setup on the breadboard:
- ESP32 to TFT ST7735:
- CS → GPIO27
- DC → GPIO26
- RST → GPIO25
- MOSI → GPIO13
- SCLK → GPIO14
- VCC → 3.3V
- GND → common ground
- ESP32 to MCP23017 (I2C):
- VDD → 3.3V
- VSS → GND
- SDA → GPIO21
- SCL → GPIO22
- A0, A1, A2 → GND (→ I2C address = 0x20)
- RESET → 3.3V through 10 kΩ resistor
- 0.1 µF capacitor between VDD and GND (close to the chip)
- GPB0–GPB7 connected to GPA0–GPA7 (simulating cable links)
- 10 kΩ pull-ups from each GPB pin to 3.3V
- Rotary encoder:
- A → GPIO4
- B → GPIO2
- SW → GPIO15
- C → GND
- The last Pin → GND
All components are powered from the ESP32’s 3.3 V rail.
The wiring has been double-checked and there are no shorts.
I tried several sketches, including the following I2C + MCP23017 diagnostic code (see below).
It initializes I2C on GPIO 21/22, scans the bus, and attempts a raw I2C read from address 0x20 before running Adafruit’s MCP23017 library.
However, the scan always returns:
*** NO DEVICES FOUND! ***
Check: Pull-ups, address pins, RESET, power, etc.
I2C errors such as
I2C hardware NACK detected
also appear repeatedly in the serial monitor.
I’ve verified wiring, used external 4.7 kΩ pull-ups on SDA/SCL, and tried 100 kHz I2C clock speed. Still nothing is detected.
Here’s the sketch I used:
#include <Arduino.h>
#include <Wire.h>
#include <Adafruit_MCP23X17.h>
Adafruit_MCP23X17 mcp;
const uint8_t MCP_ADDR = 0x20; // A0=A1=A2=GND
void setup() {
Serial.begin(115200);
delay(500);
Serial.println("\n\n========== I2C DIAGNOSTIC START ==========");
Wire.begin(21, 22);
Wire.setClock(100000);
delay(100);
int found_count = 0;
for (uint8_t addr = 1; addr < 127; addr++) {
Wire.beginTransmission(addr);
byte error = Wire.endTransmission();
if (error == 0) {
found_count++;
Serial.printf("Found device at 0x%02X\n", addr);
}
}
if (found_count == 0) {
Serial.println("*** NO DEVICES FOUND! ***");
while (1) delay(1000);
}
if (!mcp.begin_I2C(MCP_ADDR)) {
Serial.println("*** LIBRARY INIT FAILED @0x20 ***");
while (1) delay(1000);
}
Serial.println("MCP23017 OK!");
}
void loop() {}
Does anyone have an idea why the MCP23017 isn’t detected at all on the I2C bus?
The next step, once it's working, is to multiply the MCP23017 to create sides A and B with 40 pins on each, and to be able to make a universal tester in which we will create adapters by making breakboards
Thank you! ![]()

