Page 1 of 1

MCP23017 I2C Input/Output

Posted: 03 Jul 2016, 13:28
by robob
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

Re: MCP23017 I2C Input/Output

Posted: 03 Jul 2016, 18:57
by kr0815
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

Re: MCP23017 I2C Input/Output

Posted: 04 Jul 2016, 21:34
by robob
Thank you. Works ;-)