I am using a wemos to monitor some doors via reed switches in a shed. Everything has been working fine on the bench but when installing it in the shed any length of cable run to the reed switches is causing issues. The reed switches are connected to the wemos digital pins via 3.6kohm resistors with a zener diode to ensure the voltage doesn't go too high (think I used 3.6V zeners). If I have even a single wire of the reed switch connected then the wemos refuses to start or appears to crash while running. I can no longer connect to it or see it on the network. I can push reset multiple times and it won't come back up. If I remove the wires to the reed switch and push reset then it comes up straight away. I'm guessing the cable is picking up some voltage and causing the wemos to crap itself.
Should I be added some sort of isolation, caps to filter out noise or maybe I would be better off using twisted pair?
Thanks
Should I be added some sort of isolation, caps to filter out noise or maybe I would be better off using twisted pair?
Thanks