MCP23017 I2C Input/Output

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
robob
New user
Posts: 8
Joined: 26 Jun 2016, 21:18

MCP23017 I2C Input/Output

#1 Post by robob » 03 Jul 2016, 13:28

Hi all

I have my esp configured to use I2C with a MCP23017. My question is how could I use a MCPGPIO as "high" sensor?

Currently I connect a switch to GND and when closed to the GPIO of the MCP. That works and I can send the data to domoticz.
But I would like to use the switch on +3,3V instead of GND. Means if I put 3,3V to the GPIO, it should trigger the switch to domoticz.

I think I have to configure the MCP23017 somehow, but I cannot find the solution.

Hope you understand the probem ;-)

Roman

kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

Re: MCP23017 I2C Input/Output

#2 Post by kr0815 » 03 Jul 2016, 18:57

The MCP23017 has a internal pull-up to 3,3V of about 100 KOhm
If you want to have it permanently low, you need to add a pull-down resistor between GPIO and Ground.
Try with 4.7 or 10 KOhm

robob
New user
Posts: 8
Joined: 26 Jun 2016, 21:18

Re: MCP23017 I2C Input/Output

#3 Post by robob » 04 Jul 2016, 21:34

Thank you. Works ;-)

Post Reply

Who is online

Users browsing this forum: No registered users and 33 guests