1
\$\begingroup\$

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

signals[SIGNAL_VLV_1_OPEN].ioExpander->pinMode(signals[SIGNAL_VLV_1_OPEN].ioExpanderPin, INPUT); signals[SIGNAL_VLV_1_CLOSE].ioExpander->pinMode(signals[SIGNAL_VLV_1_CLOSE].ioExpanderPin, INPUT);

I have also pulled up both pins with the IO expander.

signals[SIGNAL_VLV_1_OPEN].ioExpander->pullUp(signals[SIGNAL_VLV_1_OPEN].ioExpanderPin, HIGH); signals[SIGNAL_VLV_1_CLOSE].ioExpander->pullUp(signals[SIGNAL_VLV_1_CLOSE].ioExpanderPin, HIGH);

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? enter image description here enter image description here

\$\endgroup\$
8
  • 1
    \$\begingroup\$ A schematic would be more helpful than PCB layout zoomed and cropped to contain only the chip. \$\endgroup\$
    – Justme
    Aug 24, 2020 at 20:39
  • 1
    \$\begingroup\$ Just added the IO expander schematic. \$\endgroup\$ Aug 24, 2020 at 21:03
  • 1
    \$\begingroup\$ It would help to show how the chip is connected to other devices. Zooming in on only the chip is just as helpful as showing no schematic at all. \$\endgroup\$
    – Justme
    Aug 24, 2020 at 21:06
  • 1
    \$\begingroup\$ I only added the schematic for the IO expander, the schematic for the board is separated into several schematic sheets. \$\endgroup\$ Aug 24, 2020 at 21:17
  • 1
    \$\begingroup\$ the device draws too much current? \$\endgroup\$
    – dandavis
    Aug 24, 2020 at 21:54

1 Answer 1

1
\$\begingroup\$

You might have a bad ground that is causing the MCP23017 to reset. Next time that happens again, check if the port registers were reset to their power on value meaning the whole port will be set as an input instead of output.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.