I have a “1-Channel General Purpose SPDT Relay Shield + 7 GPIO with IoT Interface” that has been in production with an embedded Particle Photon 2 without issue for a few years. The assembly is used to control a water pump as a function of a float switch in a storage tank. The application uses only a single GPIO terminal to monitor the float switch (the relay is not used).
Last year I bought a second unit to use as a test bed. Like the production unit, the new one also has an embedded Photon 2. Today I flashed that Photon with the exact same firnware that is running without issue on the production system in order to test some enhancements to the application before formal deployment.
In the process and before any changes to the firmware and with nothing connected to any GPIO terminal, I discovered that GPIO #3 always shows a closed circuit, i.e. the command “controller.readInputStatus(3)” always returns a “1”. All the other GPIO’s return “0” as expected. But the mystery continued when I could not get any of the other terminals to return a “1” when I connected each of them to either of the two ground terminals. In other words, none of the GPIO terminals is working as designed. One always returns "1’ and the other 6 always return a “0” regardless of any wiring connections or a complete absence thereof.
So the question: should I conclude that the relay shield is defective or is there something obvious to others - not to me - that would explain this behavior? I thought that it might have something to do with the Photon so I swapped it with another, brand new one and the issue persists.
Any fix short of replacement that anyone can suggest?



