Hi, thank you in advance for the help.
I am having a using a GPIO IO input pin with a pullup sampling through a voltage ladder that steps down 12-18v signals down to 3.3v. I need to sample with the option that the internal pullups are enabled for pulldown switches. I have attached the schematic.
A little bit of background. I am using a ESP32 with a MCP23017 i2c IO expander that runs of 3.3v as well. The MCP23017 will be receiving 12v signals from a motorcycle switches but due to the noisey power supply that motorcycles run off, the power can peak up to around 18v. I have a 18v zener diode, a voltage ladder and a 3.6v zener diode after that to protect the GPIO from any sudden power spikes or ESD. My problem is that my inputs in the future may not be 12v but instead short to ground.
Normally I would use the MCP23017 internal pullups and then have the inputs short to ground but the voltage ladder resistor is preventing the pullup as the resistor is much lower in the voltage ladder. I looked at adding additional pullup resistor at 25kohms but that would only give around a 1.0v signal to the IO when the button isn't pressed and a voltage of 0.78 when it is.
The MCP23017 requires a high signal of 0.8v above VDD but just having 0.2v headup between a HIGH and LOW input seems risky.
Is there a better solution than what I have to ideal protect the IO expander IOs from overvoltage while also allowing me to use a high signal or pulldown signal on the IO.
Thanks a lot for your help.