having problems with MCP23017

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jato1981
 
Posts: 2
Joined: Wed Mar 13, 2019 10:49 am

having problems with MCP23017

Post by jato1981 »

I'm trying to connect a MCP23017 to my Arduino board without any luck. I did this in the past many times but now it seems like something is going wrong.

I already tried to connect multiple MCP23017 chips but they all have the same issue.
I've tried connecting it to a Wemos D1 mini and a regular Arduino Uno board.

All have the same problems. Sometimes it works once and than it stops working and nothing seems to help.
I now connected the board to an Arduino Uno:

Arduino --> MCP
+5V --> Vdd
GND --> Vss
SDA --> SDA
SCL --> SCL

MCP:
RESET --> 10k resistor --> +5V
A0 --> GND
A1 --> GND
A2 --> GND

When I run the scanner sketch I get this result
I2C Scanner
Scanning...
I2C device found at address 0x27 !
done

Scanning...
I2C device found at address 0x27 !
done

Scanning...
I2C device found at address 0x20 !
I2C device found at address 0x27 !
done

Scanning...
I2C device found at address 0x27 !
done

Scanning...
I2C device found at address 0x27 !
done

Scanning...
I2C device found at address 0x20 !
done

Scanning...
I2C device found at address 0x27 !
done

Scanning...
I2C device found at address 0x27 !
done

Scanning...
I2C device found at address 0x20 !
done
and so on...
The address of the device changes and sometimes it even finds 2 devices at the same time.

What's going on here? I'm getting crazy trying to solve this.

Any suggestions?

User avatar
bidrohini
 
Posts: 202
Joined: Thu Oct 20, 2022 10:03 am

Re: having problems with MCP23017

Post by bidrohini »

I2C devices often need 4.7K ohm pull up resistors. https://tronixstuff.com/2011/08/26/ardu ... -tutorial/
Does your MCP23017 module already have these resistors on board?

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: having problems with MCP23017

Post by adafruit_support_mike »

Post a photo showing your hardware and connections and we'll take a look. 800x600 images usually work best.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”