I'm writing firmware on a particle argon board that needs to use the MCP23017 IO expander to detect if two pins are grounded or not for a valve actuator. The two pins are configured as
I have also pulled up both pins with the IO expander.
I have verified both pins were mapped correctly.
When the valve actuator fully closes it grounds
SIGNAL_VLV_1_CLOSE, and un-grounds
SIGNAL_VLV_1_OPEN, and vice versa when the valve actuator fully opens. However when I'm testing the device, after one command of open or close the IO expander no longer properly pulls up the signal instead the signal floats around 30mV to 200mV which is not enough for the particle board to recognize it as a digital high. I also have buttons on the command module that were configured in the same way as the pins shown above, but they don't experience the same issues. What could be the possible reasons causing the IO expander to not properly pull up the signal?